You are here

public function DependencyTest::testIncompatiblePhpVersionDependency in Drupal 10

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. 9 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 145

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]');
}