diff --git a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php
index 196fa25..47566fd 100644
--- a/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php
+++ b/core/modules/content_translation/src/Tests/ContentTranslationContextualLinksTest.php
@@ -72,20 +72,12 @@ protected function setUp() {
     $this->bundle = $this->randomMachineName();
     $this->contentType = $this->drupalCreateContentType(array('type' => $this->bundle));
 
-    // Enable translation for the current entity type and ensure the change is
-    // picked up.
-    \Drupal::service('content_translation.manager')->setEnabled('node', $this->bundle, TRUE);
-    drupal_static_reset();
-    \Drupal::entityManager()->clearCachedBundles();
-    \Drupal::service('router.builder')->rebuild();
-
     // Add a translatable field to the content type.
     entity_create('field_storage_config', array(
       'field_name' => 'field_test_text',
       'entity_type' => 'node',
       'type' => 'text',
       'cardinality' => 1,
-      'translatable' => TRUE,
     ))->save();
     entity_create('field_config', array(
       'entity_type' => 'node',
@@ -124,6 +116,17 @@ public function testContentTranslationContextualLinks() {
     $this->drupalCreateNode(array('type' => $this->bundle, 'title' => $title, 'langcode' => 'en'));
     $node = $this->drupalGetNodeByTitle($title);
 
+    // Set up the node type and field to be translatable through the UI.
+    $this->drupalLogin($this->rootUser);
+    $edit = array(
+      'entity_types[node]' => TRUE,
+      'settings[node][' . $this->bundle . '][settings][language][language_alterable]' => TRUE,
+      'settings[node][' . $this->bundle . '][translatable]' => TRUE,
+      'settings[node][' . $this->bundle . '][fields][field_test_text]' => TRUE,
+    );
+    $this->drupalPostForm('admin/config/regional/content-language', $edit, t('Save configuration'));
+    $this->drupalLogout();
+
     // Check that the translate link appears on the node page.
     $this->drupalLogin($this->translator);
     $translate_link = 'node/' . $node->id() . '/translations';
