From 3570576eb0baae34b2f187ddf264a8a1a4c460a6 Mon Sep 17 00:00:00 2001 From: Mayurkumar Vandra Date: Sun, 1 Mar 2015 13:38:17 -0500 Subject: [PATCH] Including Exception Test --- Creational/StaticFactory/Tests/StaticFactoryTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Creational/StaticFactory/Tests/StaticFactoryTest.php b/Creational/StaticFactory/Tests/StaticFactoryTest.php index e8bb7a5..f0304ca 100644 --- a/Creational/StaticFactory/Tests/StaticFactoryTest.php +++ b/Creational/StaticFactory/Tests/StaticFactoryTest.php @@ -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(""); + } }