Skip to content
Snippets Groups Projects

Resolve #2910445 "Add a warning"

Merged Jakob P requested to merge issue/config_readonly-2910445:2910445-add-a-warning into 8.x-1.x
Files
2
@@ -141,4 +141,24 @@ class ReadOnlyConfigTest extends ReadOnlyConfigTestBase {
$this->assertSession()->pageTextContains($this->message);
}
/**
* Test the status page to ensure the correct message is displayed.
*
* @see https://www.drupal.org/project/config_readonly/issues/2910445
*/
public function testModuleStatusPage() {
// Verify if we can successfully access file system route.
$status_url = Url::fromRoute('system.status');
$this->drupalGet($status_url);
$this->assertSession()->statusCodeEquals(200);
// Status page displays REQUIREMENT_WARNING because read-only is disabled.
$this->assertSession()->pageTextContains("The Config Read-only module is enabled but not active.");
// Switch forms to read-only.
$this->turnOnReadOnlySetting();
$this->drupalGet($status_url);
// Status page displays REQUIREMENT_INFO because read-only is enabled.
$this->assertSession()->pageTextContains("The Config Read-only module is enabled and active.");
}
}
Loading