public function testAllowsToRetrieveService()
 {
     $slug = 'foo';
     $service = 'bar';
     $application = $this->getApplicationMock();
     $application->expects($this->once())->method('offsetGet')->with($this->identicalTo($slug))->willReturn($service);
     $containerAware = new ContainerAwareFake();
     $containerAware->setApplication($application);
     $this->assertSame($service, $containerAware->getService($slug));
 }
 public function testAllowsToRetrieveService()
 {
     $slug = 'foo';
     $service = 'bar';
     $application = $this->getApplicationMock();
     $application->shouldReceive('offsetGet')->once()->with($slug)->andReturn($service);
     $containerAware = new ContainerAwareFake();
     $containerAware->setApplication($application);
     $this->assertSame($service, $containerAware->getService($slug));
 }