public function DefinitionTest::testSetArgument in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dependency-injection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testSetArgument()
@covers Symfony\Component\DependencyInjection\Definition::replaceArgument
File
- vendor/
symfony/ dependency-injection/ Tests/ DefinitionTest.php, line 271
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testSetArgument() {
$def = new Definition('stdClass');
$def
->addArgument('foo');
$this
->assertSame(array(
'foo',
), $def
->getArguments());
$this
->assertSame($def, $def
->replaceArgument(0, 'moo'));
$this
->assertSame(array(
'moo',
), $def
->getArguments());
$def
->addArgument('moo');
$def
->replaceArgument(0, 'foo')
->replaceArgument(1, 'bar');
$this
->assertSame(array(
'foo',
'bar',
), $def
->getArguments());
}