X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Ftests%2Fsrc%2FFunctional%2FForm%2FModulesListFormWebTest.php;h=52e4160cda9084f6d289c54ee9feda7d5c00b0b0;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=dc63e64d72d8cf623d6202d26f828082dca1c7a6;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php b/web/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php index dc63e64d7..52e4160cd 100644 --- a/web/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php +++ b/web/core/modules/system/tests/src/Functional/Form/ModulesListFormWebTest.php @@ -51,4 +51,29 @@ class ModulesListFormWebTest extends BrowserTestBase { $this->assertText('simpletest'); } + public function testModulesListFormWithInvalidInfoFile() { + $broken_info_yml = <<drupalLogin( + $this->drupalCreateUser( + ['administer modules', 'administer permissions'] + ) + ); + $this->drupalGet('admin/modules'); + $this->assertSession()->statusCodeEquals(200); + + // Confirm that the error message is shown. + $this->assertSession() + ->pageTextContains('Modules could not be listed due to an error: Missing required keys (core) in ' . $path . '/broken.info.yml'); + + // Check that the module filter text box is available. + $this->assertTrue($this->xpath('//input[@name="text"]')); + } + }