Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'Phake.php';
- require_once 'PhakeClass.php';
- class PhakeClassTest extends PHPUnit_Framework_TestCase
- {
- public function testMockingOfMagicCallMethod()
- {
- $expected = 'magicCalled';
- $obj = Phake::Mock('PhakeClass');
- Phake::when($obj)->magicCall()->thenReturn($expected);
- $value = $obj->magicCall();
- $this->assertEquals($expected, $value);
- }
- }
Add Comment
Please, Sign In to add comment