public function RestExportAuthCorrectionUpdateTest::testUpdate in Drupal 8
Ensures that update hook is run for "rest" module.
File
- core/
modules/ rest/ tests/ src/ Functional/ Update/ RestExportAuthCorrectionUpdateTest.php, line 27
Class
- RestExportAuthCorrectionUpdateTest
- Ensures that update hook is run properly for REST Export config.
Namespace
Drupal\Tests\rest\Functional\UpdateCode
public function testUpdate() {
$this
->runUpdates();
// Get particular view.
$view = \Drupal::entityTypeManager()
->getStorage('view')
->load('rest_export_with_authorization_correction');
$displays = $view
->get('display');
$this
->assertIdentical($displays['rest_export_1']['display_options']['auth'], [
'cookie',
], 'Cookie is used for authentication');
}