RunnerVersion.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\TestTools\PhpUnitCompatibilityFile
core/tests/Drupal/TestTools/PhpUnitCompatibility/RunnerVersion.phpView 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
Name | Description |
---|---|
RunnerVersion | Helper class to determine information about running PHPUnit version. |