|
@@ -95,6 +95,16 @@ class DefinitionTest extends \PHPUnit_Framework_TestCase
|
|
|
$this->assertEquals(array(array('foo', array('foo'))), $def->getMethodCalls(), '->removeMethodCall() removes a method to call');
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @expectedException Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
|
|
|
+ * @expectedExceptionMessage Method name cannot be empty.
|
|
|
+ */
|
|
|
+ public function testExceptionOnEmptyMethodCall()
|
|
|
+ {
|
|
|
+ $def = new Definition('stdClass');
|
|
|
+ $def->addMethodCall('');
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @covers Symfony\Component\DependencyInjection\Definition::setFile
|
|
|
* @covers Symfony\Component\DependencyInjection\Definition::getFile
|