You are here

public function DefinitionTest::testReplaceArgumentShouldCheckBounds in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testReplaceArgumentShouldCheckBounds()

@expectedException \OutOfBoundsException

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php, line 305

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testReplaceArgumentShouldCheckBounds() {
  $def = new Definition('stdClass');
  $def
    ->addArgument('foo');
  $def
    ->replaceArgument(1, 'bar');
}