public function PHP_CodeCoverageTest::testGetLinesToBeCovered

@covers PHP_CodeCoverage::getLinesToBeCovered @covers PHP_CodeCoverage::resolveCoversToReflectionObjects @dataProvider getLinesToBeCoveredProvider

File

drupal/core/vendor/phpunit/php-code-coverage/Tests/PHP/CodeCoverageTest.php, line 301

Class

PHP_CodeCoverageTest
Tests for the PHP_CodeCoverage class.

Code

public function testGetLinesToBeCovered($test, $lines) {
  if (strpos($test, 'Namespace') === 0) {
    $expected = array(
      TEST_FILES_PATH . 'NamespaceCoveredClass.php' => $lines,
    );
  }
  else {
    if ($test === 'CoverageNoneTest') {
      $expected = array();
    }
    else {
      if ($test === 'CoverageNothingTest') {
        $expected = false;
      }
      else {
        if ($test === 'CoverageFunctionTest') {
          $expected = array(
            TEST_FILES_PATH . 'CoveredFunction.php' => $lines,
          );
        }
        else {
          $expected = array(
            TEST_FILES_PATH . 'CoveredClass.php' => $lines,
          );
        }
      }
    }
  }
  $this
    ->assertEquals($expected, $this->getLinesToBeCovered
    ->invoke($this->coverage, $test, 'testSomething'));
}