mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-02-23 17:22:41 +01:00
Merge pull request #120 from mayurvandra/master
Including Exception Test
This commit is contained in:
commit
12145c5605
@ -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
|
||||
*/
|
||||
|
@ -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("");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user