コード例 #1
0
ファイル: PhpDumperTest.php プロジェクト: khalid05/symfony
 public function testOverrideServiceWhenUsingADumpedContainer()
 {
     require_once self::$fixturesPath . '/php/services9.php';
     require_once self::$fixturesPath . '/includes/foo.php';
     $container = new \ProjectServiceContainer();
     $container->set('bar', $bar = new \stdClass());
     $container->setParameter('foo_bar', 'foo_bar');
     $this->assertEquals($bar, $container->getBarService(), '->set() overrides an already defined service');
     $this->assertEquals($bar, $container->get('bar'), '->set() overrides an already defined service');
 }