You are here

public function DefinitionTest::testArguments in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/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

vendor/symfony/dependency-injection/Tests/DefinitionTest.php, line 81

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

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');
}