protected function PHP_CodeCoverage_TestCase::getCoverageForBankAccountForLastTwoTests in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/php-code-coverage/tests/TestCase.php \PHP_CodeCoverage_TestCase::getCoverageForBankAccountForLastTwoTests()
1 call to PHP_CodeCoverage_TestCase::getCoverageForBankAccountForLastTwoTests()
- PHP_CodeCoverageTest::testMerge in vendor/
phpunit/ php-code-coverage/ tests/ PHP/ CodeCoverageTest.php - @covers PHP_CodeCoverage::getData @covers PHP_CodeCoverage::merge
File
- vendor/
phpunit/ php-code-coverage/ tests/ TestCase.php, line 168
Class
- PHP_CodeCoverage_TestCase
- Abstract base class for test case classes.
Code
protected function getCoverageForBankAccountForLastTwoTests() {
$data = $this
->getXdebugDataForBankAccount();
$stub = $this
->getMock('PHP_CodeCoverage_Driver_Xdebug');
$stub
->expects($this
->any())
->method('stop')
->will($this
->onConsecutiveCalls($data[2], $data[3]));
$coverage = new PHP_CodeCoverage($stub, new PHP_CodeCoverage_Filter());
$coverage
->start(new BankAccountTest('testBalanceCannotBecomeNegative2'));
$coverage
->stop(true, array(
TEST_FILES_PATH . 'BankAccount.php' => range(20, 25),
));
$coverage
->start(new BankAccountTest('testDepositWithdrawMoney'));
$coverage
->stop(true, array(
TEST_FILES_PATH . 'BankAccount.php' => array_merge(range(6, 9), range(20, 25), range(27, 32)),
));
return $coverage;
}