protected function PHP_CodeCoverage_TestCase::getCoverageForBankAccount in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/php-code-coverage/tests/TestCase.php \PHP_CodeCoverage_TestCase::getCoverageForBankAccount()
3 calls to PHP_CodeCoverage_TestCase::getCoverageForBankAccount()
- PHP_CodeCoverageTest::testCollect in vendor/
phpunit/ php-code-coverage/ tests/ PHP/ CodeCoverageTest.php - @covers PHP_CodeCoverage::start @covers PHP_CodeCoverage::stop @covers PHP_CodeCoverage::append @covers PHP_CodeCoverage::applyListsFilter @covers PHP_CodeCoverage::initializeFilesThatAreSeenTheFirstTime @covers…
- PHP_CodeCoverageTest::testMerge2 in vendor/
phpunit/ php-code-coverage/ tests/ PHP/ CodeCoverageTest.php - @covers PHP_CodeCoverage::getData @covers PHP_CodeCoverage::merge
- PHP_CodeCoverage_Report_CloverTest::testCloverForBankAccountTest in vendor/
phpunit/ php-code-coverage/ tests/ PHP/ CodeCoverage/ Report/ CloverTest.php - @covers PHP_CodeCoverage_Report_Clover
File
- vendor/
phpunit/ php-code-coverage/ tests/ TestCase.php, line 70
Class
- PHP_CodeCoverage_TestCase
- Abstract base class for test case classes.
Code
protected function getCoverageForBankAccount() {
$data = $this
->getXdebugDataForBankAccount();
$stub = $this
->getMock('PHP_CodeCoverage_Driver_Xdebug');
$stub
->expects($this
->any())
->method('stop')
->will($this
->onConsecutiveCalls($data[0], $data[1], $data[2], $data[3]));
$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),
));
$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;
}