function DependencyTest::testIncompatiblePhpVersionDependency

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testIncompatiblePhpVersionDependency()
  2. 8.9.x core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testIncompatiblePhpVersionDependency()
  3. 11.x core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testIncompatiblePhpVersionDependency()

Tests failing PHP version requirements.

File

core/modules/system/tests/src/Functional/Module/DependencyTest.php, line 167

Class

DependencyTest
Enable module without dependency enabled.

Namespace

Drupal\Tests\system\Functional\Module

Code

public function testIncompatiblePhpVersionDependency() : void {
    $this->drupalGet('admin/modules');
    $this->assertSession()
        ->pageTextContains('This module requires PHP version 6502.* and is incompatible with PHP version ' . phpversion() . '.');
    $this->assertSession()
        ->fieldDisabled('modules[system_incompatible_php_version_test][enable]');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.