protected function PHPUnit_Framework_TestCase::verifyMockObjects in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/TestCase.php \PHPUnit_Framework_TestCase::verifyMockObjects()
Verifies the mock object expectations.
@since Method available since Release 3.5.0
1 call to PHPUnit_Framework_TestCase::verifyMockObjects()
- PHPUnit_Framework_TestCase::runBare in vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php - Runs the bare test sequence.
File
- vendor/
phpunit/ phpunit/ src/ Framework/ TestCase.php, line 974
Class
- PHPUnit_Framework_TestCase
- A TestCase defines the fixture to run multiple tests.
Code
protected function verifyMockObjects() {
foreach ($this->mockObjects as $mockObject) {
if ($mockObject
->__phpunit_hasMatchers()) {
$this->numAssertions++;
}
$mockObject
->__phpunit_verify();
}
if ($this->prophet !== null) {
try {
$this->prophet
->checkPredictions();
} catch (Throwable $t) {
/* Intentionally left empty */
} catch (Exception $e) {
/* Intentionally left empty */
}
foreach ($this->prophet
->getProphecies() as $objectProphecy) {
foreach ($objectProphecy
->getMethodProphecies() as $methodProphecies) {
foreach ($methodProphecies as $methodProphecy) {
$this->numAssertions += count($methodProphecy
->getCheckedPredictions());
}
}
}
if (isset($e)) {
throw $e;
}
}
}