public function DependencyTest::testIncompatibleCoreVersionDependency in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/Module/DependencyTest.php \Drupal\Tests\system\Functional\Module\DependencyTest::testIncompatibleCoreVersionDependency()
- 10 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 89
Class
- DependencyTest
- Enable module without dependency enabled.
Namespace
Drupal\Tests\system\Functional\ModuleCode
public 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)', [
'@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[system_incompatible_core_version_dependencies_test][enable]"]');
$this
->assertCount(1, $checkbox, 'Checkbox for the module is disabled.');
}