protected function PHP_CodeCoverage_TestCase::getCoverageForBankAccountForFirstTwoTests in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-code-coverage/tests/TestCase.php \PHP_CodeCoverage_TestCase::getCoverageForBankAccountForFirstTwoTests()
1 call to PHP_CodeCoverage_TestCase::getCoverageForBankAccountForFirstTwoTests()
- 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 132
Class
- PHP_CodeCoverage_TestCase
- Abstract base class for test case classes.
Code
protected function getCoverageForBankAccountForFirstTwoTests() {
$data = $this
->getXdebugDataForBankAccount();
$stub = $this
->getMock('PHP_CodeCoverage_Driver_Xdebug');
$stub
->expects($this
->any())
->method('stop')
->will($this
->onConsecutiveCalls($data[0], $data[1]));
$coverage = new PHP_CodeCoverage($stub, new PHP_CodeCoverage_Filter());
$coverage
->start(new BankAccountTest('testBalanceIsInitiallyZero'), true);
$coverage
->stop(true, array(
TEST_FILES_PATH . 'BankAccount.php' => range(6, 9),
));
$coverage
->start(new BankAccountTest('testBalanceCannotBecomeNegative'));
$coverage
->stop(true, array(
TEST_FILES_PATH . 'BankAccount.php' => range(27, 32),
));
return $coverage;
}