mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-17 20:21:15 +02:00
Merge pull request #120 from mayurvandra/master
Including Exception Test
This commit is contained in:
@@ -30,7 +30,7 @@ class DirectorTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Here we test the build process. Notice that the client don't know
|
* 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
|
* @dataProvider getBuilder
|
||||||
*/
|
*/
|
||||||
|
@@ -27,4 +27,12 @@ class StaticFactoryTest extends \PHPUnit_Framework_TestCase
|
|||||||
$obj = StaticFactory::factory($type);
|
$obj = StaticFactory::factory($type);
|
||||||
$this->assertInstanceOf('DesignPatterns\Creational\StaticFactory\FormatterInterface', $obj);
|
$this->assertInstanceOf('DesignPatterns\Creational\StaticFactory\FormatterInterface', $obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException InvalidArgumentException
|
||||||
|
*/
|
||||||
|
public function testException()
|
||||||
|
{
|
||||||
|
StaticFactory::factory("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user