getFooService() protected method

This service is autowired.
protected getFooService ( ) : Foo
return Foo A Foo instance
コード例 #1
0
ファイル: PhpDumperTest.php プロジェクト: rsky/symfony
 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->getFooService()->bar, '->set() overrides an already defined service');
 }