function ModulesListFormWebTest::testModulesListFormWithEmptyDescriptionInfoFile
Same name in other branches
- 10 core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php \Drupal\Tests\system\Functional\Form\ModulesListFormWebTest::testModulesListFormWithEmptyDescriptionInfoFile()
Tests the module form with a module with an empty description in info.yml.
File
-
core/
modules/ system/ tests/ src/ Functional/ Form/ ModulesListFormWebTest.php, line 130
Class
Namespace
Drupal\Tests\system\Functional\FormCode
public function testModulesListFormWithEmptyDescriptionInfoFile() : void {
$path = \Drupal::getContainer()->getParameter('site.path') . "/modules/missing_description";
mkdir($path, 0777, TRUE);
$file_path = "{$path}/missing_description.info.yml";
$yml = <<<BROKEN
name: Module with empty description
type: module
core_version_requirement: '*'
description:
BROKEN;
file_put_contents($file_path, $yml);
$this->drupalGet('admin/modules');
$this->assertSession()
->statusCodeEquals(200);
$this->assertSession()
->pageTextContains("Module with empty description");
// Check that the module filter text box is available.
$this->assertSession()
->elementExists('xpath', '//input[@name="text"]');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.