diff --git a/core/modules/taxonomy/src/Tests/TaxonomyHelperTestTrait.php b/core/modules/taxonomy/src/Tests/TaxonomyHelperTestTrait.php
new file mode 100644
index 0000000..275a05e
--- /dev/null
+++ b/core/modules/taxonomy/src/Tests/TaxonomyHelperTestTrait.php
@@ -0,0 +1,63 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\taxonomy\Tests\TaxonomyHelperTestTrait.
+ */
+
+namespace Drupal\taxonomy\Tests;
+
+use Drupal\Component\Utility\Unicode;
+use Drupal\Core\Language\LanguageInterface;
+use Drupal\taxonomy\Entity\Vocabulary;
+
+/**
+ * Provides common helper methods for Taxonomy module tests.
+ */
+trait TaxonomyHelperTestTrait {
+
+  /**
+   * Returns a new vocabulary with random properties.
+   */
+  function createVocabulary() {
+    // Create a vocabulary.
+    $vocabulary = entity_create('taxonomy_vocabulary', array(
+      'name' => $this->randomMachineName(),
+      'description' => $this->randomMachineName(),
+      'vid' => Unicode::strtolower($this->randomMachineName()),
+      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
+      'weight' => mt_rand(0, 10),
+    ));
+    $vocabulary->save();
+    return $vocabulary;
+  }
+
+  /**
+   * Returns a new term with random properties in vocabulary $vid.
+   *
+   * @param \Drupal\taxonomy\Entity\Vocabulary $vocabulary
+   *   The vocabulary object.
+   * @param array $values
+   *   (optional) An array of values to set, keyed by property name. If the
+   *   entity type has bundles, the bundle key has to be specified.
+   *
+   * @return \Drupal\taxonomy\Entity\Term
+   *   The new taxonomy term object.
+   */
+  function createTerm(Vocabulary $vocabulary, $values = array()) {
+    $filter_formats = filter_formats();
+    $format = array_pop($filter_formats);
+    $term = entity_create('taxonomy_term', $values + array(
+      'name' => $this->randomMachineName(),
+      'description' => array(
+        'value' => $this->randomMachineName(),
+        // Use the first available text format.
+        'format' => $format->id(),
+      ),
+      'vid' => $vocabulary->id(),
+      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
+    ));
+    $term->save();
+    return $term;
+  }
+}
diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
index c2720ec..7496567 100644
--- a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
+++ b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php
@@ -7,16 +7,16 @@
 
 namespace Drupal\taxonomy\Tests;
 
-use Drupal\Component\Utility\Unicode;
-use Drupal\Core\Language\LanguageInterface;
 use Drupal\simpletest\WebTestBase;
-use Drupal\taxonomy\Entity\Vocabulary;
+use Drupal\taxonomy\Tests\TaxonomyHelperTestTrait;
 
 /**
  * Provides common helper methods for Taxonomy module tests.
  */
 abstract class TaxonomyTestBase extends WebTestBase {
 
+  use TaxonomyHelperTestTrait;
+
   /**
    * Modules to enable.
    *
@@ -36,49 +36,4 @@ protected function setUp() {
       $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
     }
   }
-
-  /**
-   * Returns a new vocabulary with random properties.
-   */
-  function createVocabulary() {
-    // Create a vocabulary.
-    $vocabulary = entity_create('taxonomy_vocabulary', array(
-      'name' => $this->randomMachineName(),
-      'description' => $this->randomMachineName(),
-      'vid' => Unicode::strtolower($this->randomMachineName()),
-      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
-      'weight' => mt_rand(0, 10),
-    ));
-    $vocabulary->save();
-    return $vocabulary;
-  }
-
-  /**
-   * Returns a new term with random properties in vocabulary $vid.
-   *
-   * @param \Drupal\taxonomy\Entity\Vocabulary $vocabulary
-   *   The vocabulary object.
-   * @param array $values
-   *   (optional) An array of values to set, keyed by property name. If the
-   *   entity type has bundles, the bundle key has to be specified.
-   *
-   * @return \Drupal\taxonomy\Entity\Term
-   *   The new taxonomy term object.
-   */
-  function createTerm(Vocabulary $vocabulary, $values = array()) {
-    $filter_formats = filter_formats();
-    $format = array_pop($filter_formats);
-    $term = entity_create('taxonomy_term', $values + array(
-      'name' => $this->randomMachineName(),
-      'description' => array(
-        'value' => $this->randomMachineName(),
-        // Use the first available text format.
-        'format' => $format->id(),
-      ),
-      'vid' => $vocabulary->id(),
-      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
-    ));
-    $term->save();
-    return $term;
-  }
 }
diff --git a/core/modules/taxonomy/src/Tests/TermUnitTest.php b/core/modules/taxonomy/src/Tests/TermUnitTest.php
index 3f302b2..8937172 100644
--- a/core/modules/taxonomy/src/Tests/TermUnitTest.php
+++ b/core/modules/taxonomy/src/Tests/TermUnitTest.php
@@ -8,13 +8,16 @@
 namespace Drupal\taxonomy\Tests;
 
 use Drupal\taxonomy\Entity\Term;
+use Drupal\taxonomy\Tests\TaxonomyHelperTestTrait;
 
 /**
  * Unit tests for taxonomy term functions.
  *
  * @group taxonomy
  */
-class TermUnitTest extends TaxonomyTestBase {
+class TermUnitTest extends KernelTestBase {
+
+  use TaxonomyHelperTestTrait;
 
   function testTermDelete() {
     $vocabulary = $this->createVocabulary();
