Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / language / tests / src / Functional / Update / LanguageSelectWidgetUpdateTest.php
1 <?php
2
3 namespace Drupal\Tests\language\Functional\Update;
4
5 use Drupal\Core\Entity\Entity\EntityFormDisplay;
6 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
7
8 /**
9  * Tests the update path for the language_select widget.
10  *
11  * @group Update
12  */
13 class LanguageSelectWidgetUpdateTest extends UpdatePathTestBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   protected function setDatabaseDumpFiles() {
19     $this->databaseDumpFiles = [
20       __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.filled.standard.php.gz',
21     ];
22   }
23
24   /**
25    * Tests language_post_update_language_select_widget().
26    */
27   public function testLanguagePostUpdateLanguageSelectWidget() {
28     // Tests before the update.
29     $content_before = EntityFormDisplay::load('node.page.default')->get('content');
30     $this->assertEqual([], $content_before['langcode']['settings']);
31
32     // Run the update.
33     $this->runUpdates();
34
35     // Tests after the update.
36     $content_after = EntityFormDisplay::load('node.page.default')->get('content');
37     $this->assertEqual(['include_locked' => TRUE], $content_after['langcode']['settings']);
38   }
39
40 }