You are here

public function PHP_CodeCoverageTest::testCollect in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php \PHP_CodeCoverageTest::testCollect()

@covers PHP_CodeCoverage::start @covers PHP_CodeCoverage::stop @covers PHP_CodeCoverage::append @covers PHP_CodeCoverage::applyListsFilter @covers PHP_CodeCoverage::initializeFilesThatAreSeenTheFirstTime @covers PHP_CodeCoverage::applyCoversAnnotationFilter @covers PHP_CodeCoverage::getTests

File

vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php, line 262

Class

PHP_CodeCoverageTest
Tests for the PHP_CodeCoverage class.

Code

public function testCollect() {
  $coverage = $this
    ->getCoverageForBankAccount();
  $this
    ->assertEquals($this
    ->getExpectedDataArrayForBankAccount(), $coverage
    ->getData());
  if (version_compare(PHPUnit_Runner_Version::id(), '4.7', '>=')) {
    $size = 'unknown';
  }
  else {
    $size = 'small';
  }
  $this
    ->assertEquals(array(
    'BankAccountTest::testBalanceIsInitiallyZero' => array(
      'size' => $size,
      'status' => null,
    ),
    'BankAccountTest::testBalanceCannotBecomeNegative' => array(
      'size' => $size,
      'status' => null,
    ),
    'BankAccountTest::testBalanceCannotBecomeNegative2' => array(
      'size' => $size,
      'status' => null,
    ),
    'BankAccountTest::testDepositWithdrawMoney' => array(
      'size' => $size,
      'status' => null,
    ),
  ), $coverage
    ->getTests());
}