3 namespace Drupal\rest\Tests\Update;
5 use Drupal\system\Tests\Update\UpdatePathTestBase;
8 * Ensures that update hook is run properly for REST Export config.
12 class RestExportAuthUpdateTest extends UpdatePathTestBase {
17 protected function setDatabaseDumpFiles() {
18 $this->databaseDumpFiles = [
19 __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
20 __DIR__ . '/../../../tests/fixtures/update/rest-export-with-authentication.php',
25 * Ensures that update hook is run for rest module.
27 public function testUpdate() {
30 // Get particular view.
31 $view = \Drupal::entityTypeManager()->getStorage('view')->load('rest_export_with_authorization');
32 $displays = $view->get('display');
33 $this->assertIdentical($displays['rest_export_1']['display_options']['auth']['basic_auth'], 'basic_auth', 'Basic authentication is set as authentication method.');