You are here

final class RunnerVersion in Drupal 9

Same name and namespace in other branches
  1. 8 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

Expanded class hierarchy of RunnerVersion

4 files declare their use of RunnerVersion
ComposerIntegrationTest.php in core/tests/Drupal/Tests/ComposerIntegrationTest.php
HtmlOutputPrinter.php in core/tests/Drupal/Tests/Listeners/HtmlOutputPrinter.php
PhpUnitCompatibilityTrait.php in core/tests/Drupal/Tests/PhpUnitCompatibilityTrait.php
PhpUnitWarningsTest.php in core/tests/Drupal/Tests/PhpUnitWarningsTest.php

File

core/tests/Drupal/TestTools/PhpUnitCompatibility/RunnerVersion.php, line 12

Namespace

Drupal\TestTools\PhpUnitCompatibility
View 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

Namesort descending Modifiers Type Description Overrides
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.