Example #1
0
 public function testStaticCallIsRecorded()
 {
     $mock = $this->getMock('Phake_IMock');
     $mockClass = get_class($mock);
     $ref = array();
     $this->handler->invoke($mockClass, 'foo', array(), $ref);
     Phake::verify($this->callRecorder)->recordCall(new Phake_CallRecorder_Call($mockClass, 'foo', array()));
 }
Example #2
0
 public function testCallIsRecorded()
 {
     $mock = $this->getMock('Phake_IMock');
     $callRecorder = Phake::mock('Phake_CallRecorder_Recorder');
     Phake::when($this->mockReader)->getCallRecorder($this->anything())->thenReturn($callRecorder);
     $ref = array();
     $this->handler->invoke($mock, 'foo', array(), $ref);
     Phake::verify($callRecorder)->recordCall(new Phake_CallRecorder_Call($mock, 'foo', array(), $this->mockReader));
 }