You are here

public function DependencyTest::testIncompatibleCoreVersionDependency 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::testIncompatibleCoreVersionDependency()
  2. 9 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testIncompatibleCoreVersionDependency()

Tests enabling a module that depends on a module with an incompatible core version.

File

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

Class

DependencyTest
Enable module without dependency enabled.

Namespace

Drupal\Tests\system\Functional\Module

Code

public function testIncompatibleCoreVersionDependency() {

  // Test that the system_incompatible_core_version_dependencies_test is
  // marked as having an incompatible dependency.
  $this
    ->drupalGet('admin/modules');
  $this
    ->assertSession()
    ->pageTextContains('System core incompatible semver test (incompatible with this version of Drupal core)');
  $this
    ->assertSession()
    ->elementTextEquals('xpath', '//tr[@data-drupal-selector="edit-modules-system-incompatible-core-version-dependencies-test"]//span[@class="admin-missing"]', 'incompatible with');
  $this
    ->assertSession()
    ->fieldDisabled('modules[system_incompatible_core_version_dependencies_test][enable]');
}