Skip to content
Snippets Groups Projects
Commit 05ffa70c authored by cilefen's avatar cilefen
Browse files

Issue #2567861 by Antti J. Salminen, ZeiP, madhavvyas, kekkis, johnennew,...

Issue #2567861 by Antti J. Salminen, ZeiP, madhavvyas, kekkis, johnennew, boaloysius, Yogesh Pawar, Munavijayalakshmi, chx, alexpott: Add test for enabling modules with incompatible PHP version dependency
parent de122da6
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,16 @@ public function testIncompatibleCoreVersionDependency() {
$this->assert(count($checkbox) == 1, 'Checkbox for the module is disabled.');
}
/**
* Tests failing PHP version requirements.
*/
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->assert(count($checkbox) == 1, 'Checkbox for the module is disabled.');
}
/**
* Tests enabling a module that depends on a module which fails hook_requirements().
*/
......
name: 'System incompatible PHP version test'
type: module
description: 'Support module for testing system dependencies.'
package: Testing
version: VERSION
core: 8.x
php: 6502
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment