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.
14 class LanguageSelectWidgetUpdateTest extends UpdatePathTestBase {
19 protected function setDatabaseDumpFiles() {
20 $this->databaseDumpFiles = [
21 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.filled.standard.php.gz',
26 * Tests language_post_update_language_select_widget().
28 public function testLanguagePostUpdateLanguageSelectWidget() {
29 // Tests before the update.
30 $content_before = EntityFormDisplay::load('node.page.default')->get('content');
31 $this->assertEqual([], $content_before['langcode']['settings']);
36 // Tests after the update.
37 $content_after = EntityFormDisplay::load('node.page.default')->get('content');
38 $this->assertEqual(['include_locked' => TRUE], $content_after['langcode']['settings']);