diff --git a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
index 1c174d4..f4dabcb 100644
--- a/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
+++ b/core/modules/taxonomy/src/Tests/VocabularyCrudTest.php
@@ -8,6 +8,7 @@
 namespace Drupal\taxonomy\Tests;
 
 use Drupal\Component\Utility\Unicode;
+use Drupal\Core\Language\LanguageInterface;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\taxonomy\Entity\Vocabulary;
 
@@ -174,6 +175,26 @@ function testTaxonomyVocabularyChangeMachineName() {
   }
 
   /**
+   * Tests that vocabulary with same machine name can not be created.
+   */
+  function testTaxonomyVocabularySameMachineName() {
+    Vocabulary::create(array(
+      'name' => $this->randomMachineName(),
+      'description' => $this->randomMachineName(),
+      'vid' => 'machine_name',
+      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
+      'weight' => mt_rand(0, 10),
+    ))->save();
+    Vocabulary::create(array(
+      'name' => $this->randomMachineName(),
+      'description' => $this->randomMachineName(),
+      'vid' => 'machine_name',
+      'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
+      'weight' => mt_rand(0, 10),
+    ))->save();
+  }
+
+  /**
    * Test uninstall and reinstall of the taxonomy module.
    */
   function testUninstallReinstall() {
