public function ReadOnlyConfigWhitelistTest::testWhitelist in Configuration Read-only mode 8
Ensure that the whitelist allows a read-only form to become saveable.
File
- tests/
src/ Functional/ ReadOnlyConfigWhitelistTest.php, line 30
Class
- ReadOnlyConfigWhitelistTest
- Tests read-only module config whitelist functionality.
Namespace
Drupal\Tests\config_readonly\FunctionalCode
public function testWhitelist() {
$assert_session = $this
->assertSession();
$this
->createContentType([
'type' => 'article1',
'name' => 'Article1',
]);
$this
->createContentType([
'type' => 'article2',
'name' => 'Article2',
]);
$this
->turnOnReadOnlySetting();
$this
->drupalGet('admin/structure/types/manage/article1');
// Warning shown on edit node type page.
$assert_session
->pageTextContains('This form will not be saved because the configuration active store is read-only.');
$this
->drupalGet('admin/structure/types/manage/article2');
// Warning not show on edit node type page.
$assert_session
->pageTextNotContains('This form will not be saved because the configuration active store is read-only.');
}