Updated Drupal to 8.6. This goes with the following updates because it's possible...
[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  * @group legacy
14  */
15 class FileUsageTemporaryDeletionConfigurationUpdateTest extends UpdatePathTestBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   protected static $modules = ['file'];
21
22   /**
23    * {@inheritdoc}
24    */
25   protected function setDatabaseDumpFiles() {
26     $this->databaseDumpFiles = [
27       __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
28     ];
29   }
30
31   /**
32    * Tests that make_unused_managed_files_temporary conditions are correct.
33    *
34    * Verify that the before and after conditions for the variable are correct.
35    */
36   public function testUpdateHookN() {
37     $this->assertIdentical($this->config('file.settings')->get('make_unused_managed_files_temporary'), NULL);
38     $this->runUpdates();
39     $this->assertIdentical($this->config('file.settings')->get('make_unused_managed_files_temporary'), FALSE);
40     $this->assertResponse('200');
41   }
42
43 }