add test for non-function loader in plugin factory.
This commit is contained in:
parent
74df61cd6c
commit
aca6af3fec
|
@ -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\\';
|
||||
|
|
Loading…
Reference in a new issue