/** * Tests setting a default answer for only the __call magic method */ public function testDefaultAnswerForStubsOfCall() { $mock = Phake::mock('PhakeTest_MagicClass'); Phake::whenCallMethodWith(Phake::anyParameters())->isCalledOn($mock)->thenReturn(42); $this->assertEquals(42, $mock->foo()); }