PHPUnit_Util_Test::getLinesToBeCovered PHP Метод

getLinesToBeCovered() публичный статический Метод

public static getLinesToBeCovered ( string $className, string $methodName ) : array | boolean
$className string
$methodName string
Результат array | boolean
    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');
    }

Usage Example

Пример #1
0
 /**
  * Check if the method has valid @covers and @uses tags
  *
  * @param string $class
  * @param string $method
  *
  * @return bool
  */
 public static function isValidMethod($class, $method)
 {
     try {
         Test::getLinesToBeCovered($class, $method);
     } catch (CodeCoverageException $e) {
         return false;
     }
     return true;
 }
All Usage Examples Of PHPUnit_Util_Test::getLinesToBeCovered