Exemplo n.º 1
0
 public function unmockAll()
 {
     $mockedServices = $this->container->getMockedServices();
     foreach ($mockedServices as $mockedServiceId => $mockedService) {
         $this->container->unmock($mockedServiceId);
     }
 }
 public function testThatMockCanBeRemovedAndContainerFallsBackToTheOriginalService()
 {
     $mock = $this->container->mock('test.service_1', 'stdClass');
     $this->container->unmock('test.service_1');
     $this->assertTrue($this->container->has('test.service_1'));
     $this->assertEquals($this->services['test.service_1'], $this->container->get('test.service_1'));
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function mockService($serviceId, $className)
 {
     return $this->container->mock($serviceId, $className);
 }