public function testThatMockedServicesAreAccessible()
 {
     $mock1 = $this->container->mock('test.service_1', 'stdClass');
     $mock2 = $this->container->mock('test.service_2', 'stdClass');
     $mockedServices = $this->container->getMockedServices();
     $this->assertEquals(array('test.service_1' => $mock1, 'test.service_2' => $mock2), $mockedServices);
 }
Пример #2
0
 public function unmockAll()
 {
     $mockedServices = $this->container->getMockedServices();
     foreach ($mockedServices as $mockedServiceId => $mockedService) {
         $this->container->unmock($mockedServiceId);
     }
 }