Guest User

Untitled

a guest
Jul 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. <?php
  2.  
  3. require_once 'Phake.php';
  4. require_once 'PhakeClass.php';
  5.  
  6. class PhakeClassTest extends PHPUnit_Framework_TestCase
  7. {
  8. public function testMockingOfMagicCallMethod()
  9. {
  10. $expected = 'magicCalled';
  11. $obj = Phake::Mock('PhakeClass');
  12. Phake::when($obj)->magicCall()->thenReturn($expected);
  13.  
  14. $value = $obj->magicCall();
  15. $this->assertEquals($expected, $value);
  16. }
  17. }
Add Comment
Please, Sign In to add comment