示例#1
0
 public function testGet()
 {
     $bla = new stdClass();
     $this->_mockContainer->shouldReceive('get')->once()->with('foo', \Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE)->andReturn($bla);
     $result = $this->_sut->get('foo');
     $this->assertSame($bla, $result);
 }
示例#2
0
 public function __construct()
 {
     $this->_delegateContainerBuilder = new \Symfony\Component\DependencyInjection\ContainerBuilder();
     parent::__construct($this->_delegateContainerBuilder);
     /**
      * Turn off resource tracking.
      */
     $this->_delegateContainerBuilder->setResourceTracking(false);
     /**
      * Add ourself as the first compiler pass.
      */
     $this->_tubePressCompilerPasses[] = $this;
 }