assertInstanceOf( 'DesignPatterns\Creational\StaticFactory\FormatNumber', StaticFactory::factory('number') ); } public function testCanCreateStringFormatter() { $this->assertInstanceOf( 'DesignPatterns\Creational\StaticFactory\FormatString', StaticFactory::factory('string') ); } /** * @expectedException \InvalidArgumentException */ public function testException() { StaticFactory::factory('object'); } }