/** * Tests setting a stub on a static method in the stubbable object */ public function testStaticCall() { $this->proxy = new Phake_Proxies_StubberProxy(get_class($this->stubbable), new Phake_Matchers_Factory()); $answerBinder = $this->proxy->foo(); $this->assertThat($answerBinder, $this->isInstanceOf('Phake_Proxies_AnswerBinderProxy')); $this->assertAttributeInstanceOf('Phake_Stubber_AnswerBinder', 'binder', $answerBinder); }
/** * Tests setting a stub on a method in the stubbable object */ public function testCall() { $answerBinder = $this->proxy->foo(); $this->assertThat($answerBinder, $this->isInstanceOf('Phake_Proxies_AnswerBinderProxy')); $this->assertAttributeInstanceOf('Phake_Stubber_AnswerBinder', 'binder', $answerBinder); }