Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / file / tests / src / Functional / Update / FileUsageTemporaryDeletionConfigurationUpdateTest.php
1 <?php
2
3 namespace Drupal\Tests\file\Functional\Update;
4
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
6
7 /**
8  * Tests the upgrade path for setting the file usage deletion configuration.
9  *
10  * @see https://www.drupal.org/node/2801777
11  *
12  * @group Update
13  */
14 class FileUsageTemporaryDeletionConfigurationUpdateTest extends UpdatePathTestBase {
15
16   /**
17    * {@inheritdoc}
18    */
19   protected static $modules = ['file'];
20
21   /**
22    * {@inheritdoc}
23    */
24   protected function setDatabaseDumpFiles() {
25     $this->databaseDumpFiles = [
26       __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
27     ];
28   }
29
30   /**
31    * Tests that make_unused_managed_files_temporary conditions are correct.
32    *
33    * Verify that the before and after conditions for the variable are correct.
34    */
35   public function testUpdateHookN() {
36     $this->assertIdentical($this->config('file.settings')->get('make_unused_managed_files_temporary'), NULL);
37     $this->runUpdates();
38     $this->assertIdentical($this->config('file.settings')->get('make_unused_managed_files_temporary'), FALSE);
39     $this->assertResponse('200');
40   }
41
42 }