Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * 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);
 }