RestExportAuthCorrectionUpdateTest.php in Drupal 8
File
core/modules/rest/tests/src/Functional/Update/RestExportAuthCorrectionUpdateTest.php
View source
<?php
namespace Drupal\Tests\rest\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
class RestExportAuthCorrectionUpdateTest extends UpdatePathTestBase {
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
__DIR__ . '/../../../fixtures/update/rest-export-with-authentication-correction.php',
];
}
public function testUpdate() {
$this
->runUpdates();
$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');
}
}