RunnerVersion.php
Same filename in other branches
Namespace
Drupal\TestTools\PhpUnitCompatibilityFile
-
core/
tests/ Drupal/ TestTools/ PhpUnitCompatibility/ RunnerVersion.php
View source
<?php
namespace Drupal\TestTools\PhpUnitCompatibility;
use PHPUnit\Runner\Version;
/**
* Helper class to determine information about running PHPUnit version.
*
* This class contains static methods only and is not meant to be instantiated.
*/
final class RunnerVersion {
/**
* This class should not be instantiated.
*/
private function __construct() {
}
/**
* Returns the major version of the PHPUnit runner being used.
*
* @return int
* The major version of the PHPUnit runner being used.
*/
public static function getMajor() {
return (int) explode('.', Version::id())[0];
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
RunnerVersion | Helper class to determine information about running PHPUnit version. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.