You are here

public static function PHPUnit_Util_Test::getLinesToBeCovered in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Util/Test.php \PHPUnit_Util_Test::getLinesToBeCovered()

@since Method available since Release 4.0.0

Parameters

string $className:

string $methodName:

Return value

array|bool

Throws

PHPUnit_Framework_CodeCoverageException

12 calls to PHPUnit_Util_Test::getLinesToBeCovered()
PHPUnit_Framework_TestResult::run in vendor/phpunit/phpunit/src/Framework/TestResult.php
Runs a TestCase.
Util_TestTest::testFunctionParenthesesAreAllowed in vendor/phpunit/phpunit/tests/Util/TestTest.php
@covers PHPUnit_Util_Test::getLinesToBeCovered @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
Util_TestTest::testFunctionParenthesesAreAllowedWithWhitespace in vendor/phpunit/phpunit/tests/Util/TestTest.php
@covers PHPUnit_Util_Test::getLinesToBeCovered @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed
Util_TestTest::testGetLinesToBeCovered in vendor/phpunit/phpunit/tests/Util/TestTest.php
@covers PHPUnit_Util_Test::getLinesToBeCovered @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed @covers PHPUnit_Util_Test::resolveElementToReflectionObjects @dataProvider getLinesToBeCoveredProvider
Util_TestTest::testGetLinesToBeCovered2 in vendor/phpunit/phpunit/tests/Util/TestTest.php
@covers PHPUnit_Util_Test::getLinesToBeCovered @covers PHPUnit_Util_Test::getLinesToBeCoveredOrUsed @covers PHPUnit_Util_Test::resolveElementToReflectionObjects @expectedException PHPUnit_Framework_CodeCoverageException

... See full list

File

vendor/phpunit/phpunit/src/Util/Test.php, line 74

Class

PHPUnit_Util_Test
Test helpers.

Code

public static function getLinesToBeCovered($className, $methodName) {
  $annotations = self::parseTestMethodAnnotations($className, $methodName);
  if (isset($annotations['class']['coversNothing']) || isset($annotations['method']['coversNothing'])) {
    return false;
  }
  return self::getLinesToBeCoveredOrUsed($className, $methodName, 'covers');
}