Exemplo n.º 1
0
 /**
  * Testing newly created function.
  */
 public function testMockNewFunction()
 {
     $this->test_function_name = 'new_random_function_' . uniqid();
     $this->object = new PHPUnit_Extensions_MockFunction($this->test_function_name, $this->test_scope_object);
     // Return normally, only checks the call.
     $this->object->expects($this->any())->will($this->returnValue('OK'));
     $this->assertSame('OK', $this->test_scope_object->callFunction($this->test_function_name, array()));
     $this->object->restore();
 }