You are here

public function PhpDumperTest::testOverrideServiceWhenUsingADumpedContainerAndServiceIsUsedFromAnotherOne in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php \Symfony\Component\DependencyInjection\Tests\Dumper\PhpDumperTest::testOverrideServiceWhenUsingADumpedContainerAndServiceIsUsedFromAnotherOne()

File

vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php, line 195

Class

PhpDumperTest

Namespace

Symfony\Component\DependencyInjection\Tests\Dumper

Code

public function testOverrideServiceWhenUsingADumpedContainerAndServiceIsUsedFromAnotherOne() {
  require_once self::$fixturesPath . '/php/services9.php';
  require_once self::$fixturesPath . '/includes/foo.php';
  require_once self::$fixturesPath . '/includes/classes.php';
  $container = new \ProjectServiceContainer();
  $container
    ->set('bar', $bar = new \stdClass());
  $this
    ->assertSame($bar, $container
    ->get('foo')->bar, '->set() overrides an already defined service');
}