2
PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE)
5
require __DIR__ . '/../../vendor/autoload.php';
7
$generator = new PHPUnit_Framework_MockObject_Generator;
9
$mock = $generator->generate(
30
class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject
32
private $__phpunit_invocationMocker;
33
private $__phpunit_originalObject;
35
public function __clone()
37
$this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
40
public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
42
return $this->__phpunit_getInvocationMocker()->expects($matcher);
45
public function method()
47
$any = new PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount;
48
$expects = $this->expects($any);
49
return call_user_func_array(array($expects, 'method'), func_get_args());
52
public function __phpunit_setOriginalObject($originalObject)
54
$this->__phpunit_originalObject = $originalObject;
57
public function __phpunit_getInvocationMocker()
59
if ($this->__phpunit_invocationMocker === NULL) {
60
$this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
63
return $this->__phpunit_invocationMocker;
66
public function __phpunit_hasMatchers()
68
return $this->__phpunit_getInvocationMocker()->hasMatchers();
71
public function __phpunit_verify()
73
$this->__phpunit_getInvocationMocker()->verify();
74
$this->__phpunit_invocationMocker = NULL;