-
-
Save nickvergessen/22a03a44374c945c6ef322a35bff5145 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns a test double for the specified class. | |
* | |
* @param string $originalClassName | |
* | |
* @return PHPUnit_Framework_MockObject_MockObject | |
* | |
* @throws PHPUnit_Framework_Exception | |
* | |
* @since Method available since Release 5.4.0 | |
*/ | |
protected function createMock($originalClassName) { | |
if (is_callable('parent::createMock')) { | |
return parent::createMock($originalClassName); | |
} | |
return $this->getMockBuilder($originalClassName) | |
->disableOriginalConstructor() | |
->disableOriginalClone() | |
->disableArgumentCloning() | |
->disallowMockingUnknownTypes() | |
->getMock(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment