You are here

public static function RunnerVersion::getMajor in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/TestTools/PhpUnitCompatibility/RunnerVersion.php \Drupal\TestTools\PhpUnitCompatibility\RunnerVersion::getMajor()

Returns the major version of the PHPUnit runner being used.

Return value

int The major version of the PHPUnit runner being used.

10 calls to RunnerVersion::getMajor()
ComposerIntegrationTest::testVendorCleanup in core/tests/Drupal/Tests/ComposerIntegrationTest.php
Tests the vendor cleanup utilities do not have obsolete packages listed.
HtmlOutputPrinter.php in core/tests/Drupal/Tests/Listeners/HtmlOutputPrinter.php
PhpUnitCompatibilityTrait.php in core/tests/Drupal/Tests/PhpUnitCompatibilityTrait.php
PhpUnitWarningsTest::testAssertArraySubset in core/tests/Drupal/Tests/PhpUnitWarningsTest.php
Tests assertArraySubset.
PhpUnitWarningsTest::testAssertAttribute in core/tests/Drupal/Tests/PhpUnitWarningsTest.php
Tests assertion methods accessing class attributes.

... See full list

File

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

Class

RunnerVersion
Helper class to determine information about running PHPUnit version.

Namespace

Drupal\TestTools\PhpUnitCompatibility

Code

public static function getMajor() {
  return (int) explode('.', Version::id())[0];
}