X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Frest%2Fsrc%2FTests%2FUpdate%2FRestExportAuthCorrectionUpdateTest.php;fp=web%2Fcore%2Fmodules%2Frest%2Fsrc%2FTests%2FUpdate%2FRestExportAuthCorrectionUpdateTest.php;h=aeca71f621def92f1ce091a809c5050e71a62e1d;hp=0000000000000000000000000000000000000000;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/rest/src/Tests/Update/RestExportAuthCorrectionUpdateTest.php b/web/core/modules/rest/src/Tests/Update/RestExportAuthCorrectionUpdateTest.php new file mode 100644 index 000000000..aeca71f62 --- /dev/null +++ b/web/core/modules/rest/src/Tests/Update/RestExportAuthCorrectionUpdateTest.php @@ -0,0 +1,36 @@ +databaseDumpFiles = [ + __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', + __DIR__ . '/../../../tests/fixtures/update/rest-export-with-authentication-correction.php', + ]; + } + + /** + * Ensures that update hook is run for "rest" module. + */ + 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'); + } + +}