You are here

public function DependencyTest::testIncompatiblePhpVersionDependency in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testIncompatiblePhpVersionDependency()
  2. 10 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 102

Class

DependencyTest
Enable module without dependency enabled.

Namespace

Drupal\Tests\system\Functional\Module

Code

public function testIncompatiblePhpVersionDependency() {
  $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]');
}