3 namespace Drupal\Tests\language\Functional\Update;
5 use Drupal\Core\Entity\Entity\EntityFormDisplay;
6 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
9 * Tests the update path for the language_select widget.
13 class LanguageSelectWidgetUpdateTest extends UpdatePathTestBase {
18 protected function setDatabaseDumpFiles() {
19 $this->databaseDumpFiles = [
20 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.filled.standard.php.gz',
25 * Tests language_post_update_language_select_widget().
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']);
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']);