2 PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', FALSE)
7 public function __clone()
12 require_once 'PHPUnit/Autoload.php';
13 require_once 'Text/Template.php';
15 $mock = PHPUnit_Framework_MockObject_Generator::generate(
25 class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject
27 private static $__phpunit_staticInvocationMocker;
28 private $__phpunit_invocationMocker;
30 public function __clone()
32 $this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationMocker();
35 public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
37 return $this->__phpunit_getInvocationMocker()->expects($matcher);
40 public static function staticExpects(PHPUnit_Framework_MockObject_Matcher_Invocation $matcher)
42 return self::__phpunit_getStaticInvocationMocker()->expects($matcher);
45 public function __phpunit_getInvocationMocker()
47 if ($this->__phpunit_invocationMocker === NULL) {
48 $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
51 return $this->__phpunit_invocationMocker;
54 public static function __phpunit_getStaticInvocationMocker()
56 if (self::$__phpunit_staticInvocationMocker === NULL) {
57 self::$__phpunit_staticInvocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker;
60 return self::$__phpunit_staticInvocationMocker;
63 public function __phpunit_hasMatchers()
65 return self::__phpunit_getStaticInvocationMocker()->hasMatchers() ||
66 $this->__phpunit_getInvocationMocker()->hasMatchers();
69 public function __phpunit_verify()
71 self::__phpunit_getStaticInvocationMocker()->verify();
72 $this->__phpunit_getInvocationMocker()->verify();
75 public function __phpunit_cleanup()
77 self::$__phpunit_staticInvocationMocker = NULL;
78 $this->__phpunit_invocationMocker = NULL;