class RunnerVersion
Same name in other branches
- 9 core/tests/Drupal/TestTools/PhpUnitCompatibility/RunnerVersion.php \Drupal\TestTools\PhpUnitCompatibility\RunnerVersion
- 8.9.x core/tests/Drupal/TestTools/PhpUnitCompatibility/RunnerVersion.php \Drupal\TestTools\PhpUnitCompatibility\RunnerVersion
- 10 core/tests/Drupal/TestTools/PhpUnitCompatibility/RunnerVersion.php \Drupal\TestTools\PhpUnitCompatibility\RunnerVersion
Helper class to determine information about running PHPUnit version.
This class contains static methods only and is not meant to be instantiated.
Hierarchy
- class \Drupal\TestTools\PhpUnitCompatibility\RunnerVersion
Expanded class hierarchy of RunnerVersion
1 file declares its use of RunnerVersion
- PhpUnitCompatibilityTrait.php in core/
tests/ Drupal/ Tests/ PhpUnitCompatibilityTrait.php
File
-
core/
tests/ Drupal/ TestTools/ PhpUnitCompatibility/ RunnerVersion.php, line 14
Namespace
Drupal\TestTools\PhpUnitCompatibilityView source
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];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
RunnerVersion::getMajor | public static | function | Returns the major version of the PHPUnit runner being used. |
RunnerVersion::__construct | private | function | This class should not be instantiated. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.