public function DefinitionTest::testArguments

@covers Symfony\Component\DependencyInjection\Definition::setArguments @covers Symfony\Component\DependencyInjection\Definition::getArguments @covers Symfony\Component\DependencyInjection\Definition::addArgument

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php, line 70

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