Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / ckeditor / tests / src / Functional / CKEditorAdminTest.php
index 1ec222746e3fa9d5133f66323b8663bd65f07d4a..aeba60fd7545bc0cd125153ebedca0060c5e6ef9 100644 (file)
@@ -216,6 +216,19 @@ class CKEditorAdminTest extends BrowserTestBase {
     $editor = Editor::load('filtered_html');
     $this->assertTrue($editor instanceof Editor, 'An Editor config entity exists.');
     $this->assertEqual($expected_settings, $editor->getSettings());
+
+    $this->drupalGet('admin/config/content/formats/add');
+    // Now attempt to add another filter format with the same editor and same
+    // machine name.
+    $edit = [
+      'format' => 'filtered_html',
+      'name' => 'Filtered HTML',
+      'editor[editor]' => 'ckeditor',
+    ];
+    $this->submitForm($edit, 'editor_configure');
+    $this->submitForm($edit, 'Save configuration');
+    $this->assertResponse(200);
+    $this->assertText('The machine-readable name is already in use. It must be unique.');
   }
 
   /**