diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyTermViewTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyTermViewTest.php index 75ca205..e1aa1de 100644 --- a/core/modules/taxonomy/src/Tests/Views/TaxonomyTermViewTest.php +++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyTermViewTest.php @@ -9,6 +9,7 @@ use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Language\Language; +use Drupal\language\Entity\ConfigurableLanguage; use Drupal\user\Entity\Role; /** @@ -89,8 +90,8 @@ public function testTaxonomyTermView() { $this->assertText($node->label()); \Drupal::moduleHandler()->install(array('language', 'content_translation')); - $language = new Language(array('id' => 'ur')); - language_save($language); + $language = ConfigurableLanguage::createFromLangcode('ur'); + $language->save(); // Enable translation for the article content type and ensure the change is // picked up. content_translation_set_config('node', 'article', 'enabled', TRUE);