function ReadOnlyModeUpdateTest::testBcReadOnlyModeSettingAdded
Tests jsonapi_update_8701().
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ Update/ ReadOnlyModeUpdateTest.php, line 37
Class
- ReadOnlyModeUpdateTest
- Tests that existing sites have the new read-only mode to "off".
Namespace
Drupal\Tests\jsonapi\Functional\UpdateCode
public function testBcReadOnlyModeSettingAdded() {
// Make sure we have the expected values before the update.
$jsonapi_settings = $this->config('jsonapi.settings');
$this->assertFalse(array_key_exists('read_only', $jsonapi_settings->getRawData()));
$this->runUpdates();
// Make sure we have the expected values after the update.
$jsonapi_settings = $this->config('jsonapi.settings');
$this->assertTrue(array_key_exists('read_only', $jsonapi_settings->getRawData()));
$this->assertFalse($jsonapi_settings->get('read_only'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.