Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as PHP by aramirez ( 14 years ago )
// You are mocking time function into $this->object scope.
$flux_capacitor = new PHPUnit_Extensions_MockFunction( 'time', $this->object );
$einsteins_clock = time() + 60;
$flux_capacitor->expects( $this->atLeastOnce() )->will( $this->returnValue( $einsteins_clock ) );

// I need mock class_exist and I am not able to pass the scope:
$mock_class_exists = new PHPUnit_Extensions_MockFunction( 'class_exists' );
$mock_class_exists->expects( $this->once() )->will( $this->returnValue( false ) )

 

Revise this Paste

Your Name: Code Language: