You are here

function DependencyTest::testIncompatibleCoreVersionDependency in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Module/DependencyTest.php \Drupal\system\Tests\Module\DependencyTest::testIncompatibleCoreVersionDependency()

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

File

core/modules/system/src/Tests/Module/DependencyTest.php, line 87
Contains \Drupal\system\Tests\Module\DependencyTest.

Class

DependencyTest
Enable module without dependency enabled.

Namespace

Drupal\system\Tests\Module

Code

function testIncompatibleCoreVersionDependency() {

  // Test that the system_incompatible_core_version_dependencies_test is
  // marked as having an incompatible dependency.
  $this
    ->drupalGet('admin/modules');
  $this
    ->assertRaw(t('@module (<span class="admin-missing">incompatible with</span> this version of Drupal core)', array(
    '@module' => 'System incompatible core version test',
  )), 'A module that depends on a module with an incompatible core version is marked as such.');
  $checkbox = $this
    ->xpath('//input[@type="checkbox" and @disabled="disabled" and @name="modules[Testing][system_incompatible_core_version_dependencies_test][enable]"]');
  $this
    ->assert(count($checkbox) == 1, 'Checkbox for the module is disabled.');
}