public function PHPUnit_Framework_TestCase::getMockForAbstractClass in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/TestCase.php \PHPUnit_Framework_TestCase::getMockForAbstractClass()
Returns a mock object for the specified abstract class with all abstract methods of the class mocked. Concrete methods are not mocked by default. To mock concrete methods, use the 7th parameter ($mockedMethods).
@since Method available since Release 3.4.0
Parameters
string $originalClassName:
array $arguments:
string $mockClassName:
bool $callOriginalConstructor:
bool $callOriginalClone:
bool $callAutoload:
array $mockedMethods:
bool $cloneArguments:
Return value
PHPUnit_Framework_MockObject_MockObject
Throws
1 call to PHPUnit_Framework_TestCase::getMockForAbstractClass()
- Twig_Tests_TemplateTest::testDisplayBlocksAcceptTemplateOnlyAsBlocks in vendor/
twig/ twig/ test/ Twig/ Tests/ TemplateTest.php - @expectedException LogicException
File
- vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php, line 1367
Class
- PHPUnit_Framework_TestCase
- A TestCase defines the fixture to run multiple tests.
Code
public function getMockForAbstractClass($originalClassName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = false) {
$mockObject = $this
->getMockObjectGenerator()
->getMockForAbstractClass($originalClassName, $arguments, $mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload, $mockedMethods, $cloneArguments);
$this->mockObjects[] = $mockObject;
return $mockObject;
}