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); }