You are here

public function DependencyTest::testIncompatiblePhpVersionDependency in Drupal 8

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

Class

DependencyTest
Enable module without dependency enabled.

Namespace

Drupal\Tests\system\Functional\Module

Code

public function testIncompatiblePhpVersionDependency() {
  $this
    ->drupalGet('admin/modules');
  $this
    ->assertRaw('This module requires PHP version 6502.* and is incompatible with PHP version ' . phpversion() . '.', 'User is informed when the PHP dependency requirement of a module is not met.');
  $checkbox = $this
    ->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="modules[system_incompatible_php_version_test][enable]"]');
  $this
    ->assertCount(1, $checkbox, 'Checkbox for the module is disabled.');
}