public function DefinitionTest::testArguments in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testArguments()
@covers Symfony\Component\DependencyInjection\Definition::setArguments @covers Symfony\Component\DependencyInjection\Definition::getArguments @covers Symfony\Component\DependencyInjection\Definition::addArgument
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ DefinitionTest.php, line 81
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testArguments() {
$def = new Definition('stdClass');
$this
->assertSame($def, $def
->setArguments(array(
'foo',
)), '->setArguments() implements a fluent interface');
$this
->assertEquals(array(
'foo',
), $def
->getArguments(), '->getArguments() returns the arguments');
$this
->assertSame($def, $def
->addArgument('bar'), '->addArgument() implements a fluent interface');
$this
->assertEquals(array(
'foo',
'bar',
), $def
->getArguments(), '->addArgument() adds an argument');
}