Merge pull request #120 from mayurvandra/master

Including Exception Test
This commit is contained in:
Dominik Liebler 2015-03-02 18:44:39 +01:00
commit 12145c5605
2 changed files with 9 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class DirectorTest extends \PHPUnit_Framework_TestCase
/**
* Here we test the build process. Notice that the client don't know
* anything about the contrete builder.
* anything about the concrete builder.
*
* @dataProvider getBuilder
*/

View File

@ -27,4 +27,12 @@ class StaticFactoryTest extends \PHPUnit_Framework_TestCase
$obj = StaticFactory::factory($type);
$this->assertInstanceOf('DesignPatterns\Creational\StaticFactory\FormatterInterface', $obj);
}
/**
* @expectedException InvalidArgumentException
*/
public function testException()
{
StaticFactory::factory("");
}
}