diff --git a/tests/src/Functional/ChangeSourceTest.php b/tests/src/Functional/ChangeSourceTest.php
index 07151f6..e10fe49 100644
--- a/tests/src/Functional/ChangeSourceTest.php
+++ b/tests/src/Functional/ChangeSourceTest.php
@@ -4,6 +4,7 @@ namespace Drupal\Tests\translation_form\Functional;
 
 use Drupal\Tests\node\Functional\NodeTestBase;
 use Drupal\language\Entity\ConfigurableLanguage;
+use Drupal\Component\Render\FormattableMarkup;
 use Drupal\Core\Url;
 
 /**
@@ -58,7 +59,7 @@ class ChangeSourceTest extends NodeTestBase {
     // picked up.
     \Drupal::service('content_translation.manager')->setEnabled('node', 'article', TRUE);
     drupal_static_reset();
-    \Drupal::entityManager()->clearCachedDefinitions();
+    \Drupal::entityTypeManager()->clearCachedDefinitions();
     \Drupal::service('router.builder')->rebuild();
     \Drupal::service('entity.definition_update_manager')->applyUpdates();
 
@@ -77,17 +78,17 @@ class ChangeSourceTest extends NodeTestBase {
     $node = $this->drupalCreateNode(['type' => 'article', 'langcode' => 'en']);
 
     // Create a translation in German.
-    $this->drupalGet($node->urlInfo('drupal:content-translation-overview'));
+    $this->drupalGet($node->toUrl('drupal:content-translation-overview'));
     $this->clickLink('Add');
     $this->drupalPostForm(NULL, [], t('Save (this translation)'));
 
     // Create a translation in French.
-    $this->drupalGet($node->urlInfo('drupal:content-translation-overview'));
+    $this->drupalGet($node->toUrl('drupal:content-translation-overview'));
     $this->clickLink('Add');
     $this->drupalPostForm(NULL, [], t('Save (this translation)'));
 
     // Go to edit page for French language and change source language.
-    $this->drupalGet($node->urlInfo('drupal:content-translation-overview'));
+    $this->drupalGet($node->toUrl('drupal:content-translation-overview'));
     $this->clickLink('Edit', 1);
     $edit = [
       'source_langcode[source]' => 'de',
@@ -95,9 +96,9 @@ class ChangeSourceTest extends NodeTestBase {
     $this->drupalPostForm(NULL, $edit, t('Save (this translation)'));
 
     // Check source language for tranlsate for node.
-    $this->drupalGet($node->urlInfo('drupal:content-translation-overview'));
+    $this->drupalGet($node->toUrl('drupal:content-translation-overview'));
     $elements = $this->xpath('//tbody/tr[2]/td[3]/text()');
-    $this->assertEquals($elements[0]->getText(), t('German'), format_string('Source language is correct for %language translation.', ['%language' => 'French']));
+    $this->assertEquals($elements[0]->getText(), t('German'), new FormattableMarkup('Source language is correct for %language translation.', ['%language' => 'French']));
   }
 
 }
