예제 #1
0
파일: Mocker.php 프로젝트: loic425/Sylius
 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'));
 }