Exemplo n.º 1
0
 /**
  * @test
  */
 public function function_switch_off_and_on_return_correct_value()
 {
     $value = 'non date value';
     $mockFunction = new PHPUnit_Extensions_MockFunction('date', $this);
     $mockFunction->expects($this->any())->will($this->returnValue($value));
     $mockFunction->restore();
     $mockFunction->mock();
     $this->assertEquals($value, date());
 }