diff --git a/Tests/PHPCI/Plugin/Util/FactoryTest.php b/Tests/PHPCI/Plugin/Util/FactoryTest.php index be5c5f6f..3265e07c 100644 --- a/Tests/PHPCI/Plugin/Util/FactoryTest.php +++ b/Tests/PHPCI/Plugin/Util/FactoryTest.php @@ -37,10 +37,16 @@ class FactoryTest extends \PHPUnit_Framework_TestCase { public function testRegisterResourceThrowsExceptionWithoutTypeAndName() { - $this->setExpectedException("InvalidArgumentException"); + $this->setExpectedException('InvalidArgumentException', 'Type or Name must be specified'); $this->testedFactory->registerResource($this->resourceLoader, null, null); } + public function testRegisterResourceThrowsExceptionIfLoaderIsntFunction() + { + $this->setExpectedException('InvalidArgumentException', '$loader is expected to be a function'); + $this->testedFactory->registerResource(array("dummy"), "TestName", "TestClass"); + } + public function testBuildPluginWorksWithConstructorlessPlugins() { $namespace = '\\PHPCI\\Plugin\\Tests\\Util\\';