Ejemplo n.º 1
0
 /**
  * Tear down class mocker
  *
  * @return void
  */
 public function tearDown()
 {
     $this->classMocker->disable();
     $this->classMocker = null;
 }
Ejemplo n.º 2
0
 /**
  * Test PHPUnit expects method
  *
  * @return void
  * @test
  */
 public function testExpectationMethods()
 {
     $fwMocker = new ClassMocker();
     $fwMocker->mock('Expect_*');
     $fwMocker->enable();
     $test = new \Expect_Something();
     $test->expects($this->once())->method('hello')->will($this->returnValue('Hello World'));
     $this->assertEquals('Hello World', $test->hello());
     $fwMocker->disable();
 }