public function DiffAdminFormsTest::testRequirements in Diff 8
Tests the module requirements.
File
- tests/
src/ Functional/ DiffAdminFormsTest.php, line 62
Class
- DiffAdminFormsTest
- Tests the Diff admin forms.
Namespace
Drupal\Tests\diff\FunctionalCode
public function testRequirements() {
module_load_install('diff');
$requirements = diff_requirements('runtime');
$this
->assertEqual($requirements['html_diff_advanced']['title'], 'Diff');
$has_htmlDiffAdvanced = class_exists('\\HtmlDiffAdvanced');
if (!$has_htmlDiffAdvanced) {
// The plugin is disabled dependencies are missing.
$this
->assertEqual($requirements['html_diff_advanced']['value'], 'Visual inline layout');
}
else {
// The plugin is enabled by default if dependencies are met.
$this
->assertEqual($requirements['html_diff_advanced']['value'], 'Installed correctly');
}
}