disable() 공개 메소드

Disable this mock.
또한 보기: Mock::enable()
또한 보기: Mock::disableAll()
public disable ( )
예제 #1
0
 protected function tearDown()
 {
     if (!empty($this->mock)) {
         $this->mock->disable();
         unset($this->mock);
     }
 }
예제 #2
0
 /**
  * Tests the example from the documentation.
  *
  * @expectedException Exception
  */
 public function testExample4()
 {
     $function = function () {
         throw new \Exception();
     };
     $mock = new Mock(__NAMESPACE__, "time", $function);
     $mock->enable();
     try {
         time();
     } finally {
         $mock->disable();
     }
 }
예제 #3
0
 protected function tearDown()
 {
     if (isset($this->mock)) {
         $this->mock->disable();
     }
 }