Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Merge [3515].

  • Loading branch information...
commit e8c6b3fe4daaa987e4a05a4a74de273a5f404b64 1 parent b761e6e
@sebastianbergmann authored
View
4 PHPUnit/Framework/MockObject/Matcher.php
@@ -128,7 +128,7 @@ public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
}
if ($this->afterMatchBuilderId !== NULL) {
- $builder = $invocation->object->getInvocationMocker()->lookupId($this->afterMatchBuilderId);
+ $builder = $invocation->object->__phpunit_getInvocationMocker()->lookupId($this->afterMatchBuilderId);
if (!$builder) {
throw new RuntimeException(
@@ -179,7 +179,7 @@ public function invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
public function matches(PHPUnit_Framework_MockObject_Invocation $invocation)
{
if ($this->afterMatchBuilderId !== NULL) {
- $builder = $invocation->object->getInvocationMocker()->lookupId($this->afterMatchBuilderId);
+ $builder = $invocation->object->__phpunit_getInvocationMocker()->lookupId($this->afterMatchBuilderId);
if (!$builder) {
throw new RuntimeException(
View
12 PHPUnit/Framework/MockObject/Mock.php
@@ -246,14 +246,14 @@ protected function generateClassDefinition(ReflectionClass $class)
if ($class->isInterface()) {
$code .= sprintf(
- "%s implements %s%s, PHPUnit_Framework_MockObject_MockObject {\n",
+ "%s implements %s%s {\n",
$this->mockClassName,
!empty($this->namespaceName) ? $this->namespaceName . '::' : '',
$this->className
);
} else {
$code .= sprintf(
- "%s extends %s%s implements PHPUnit_Framework_MockObject_MockObject {\n",
+ "%s extends %s%s {\n",
$this->mockClassName,
!empty($this->namespaceName) ? $this->namespaceName . '::' : '',
$this->className
@@ -368,13 +368,13 @@ protected function generateMockApi(ReflectionClass $class)
" private \$invocationMocker;\n\n" .
"%s" .
"%s" .
- " public function getInvocationMocker() {\n" .
- " return \$this->invocationMocker;\n" .
- " }\n\n" .
" public function expects(PHPUnit_Framework_MockObject_Matcher_Invocation \$matcher) {\n" .
" return \$this->invocationMocker->expects(\$matcher);\n" .
" }\n\n" .
- " public function verify() {\n" .
+ " public function __phpunit_getInvocationMocker() {\n" .
+ " return \$this->invocationMocker;\n" .
+ " }\n\n" .
+ " public function __phpunit_verify() {\n" .
" \$this->invocationMocker->verify();\n" .
" }\n",
View
2  PHPUnit/Framework/MockObject/MockObject.php
@@ -74,7 +74,7 @@
* and stubs.
* @return PHPUnit_Framework_MockObject_InvocationMocker
*/
- public function getInvocationMocker();
+ public function /*__phpunit_*/getInvocationMocker();
/**
* Registers a new expectation in the mock object and returns the match
View
2  PHPUnit/Framework/MockObject/Verifiable.php
@@ -70,6 +70,6 @@
*
* @throw PHPUnit_Framework_ExpectationFailedException
*/
- public function verify();
+ public function /*__phpunit_*/verify();
}
?>
View
2  PHPUnit/Framework/TestCase.php
@@ -406,7 +406,7 @@ public function runBare()
// Verify Mock Object conditions.
foreach ($this->mockObjects as $mockObject) {
$this->numAssertions++;
- $mockObject->verify();
+ $mockObject->__phpunit_verify();
}
$this->status = PHPUnit_Runner_BaseTestRunner::STATUS_PASSED;
Please sign in to comment.
Something went wrong with that request. Please try again.