diff --git a/core/modules/views_ui/src/Tests/ViewEditTest.php b/core/modules/views_ui/src/Tests/ViewEditTest.php
index 1dd7e0e..636349e 100644
--- a/core/modules/views_ui/src/Tests/ViewEditTest.php
+++ b/core/modules/views_ui/src/Tests/ViewEditTest.php
@@ -70,6 +70,10 @@ public function testMachineNameOption() {
     $machine_name_edit_url = 'admin/structure/views/nojs/display/test_view/test_1/display_id';
     $error_text = t('Display name must be letters, numbers, or underscores only.');
 
+    // Test that potential invalid display ID requests are detected
+    $this->drupalGet('admin/structure/views/ajax/handler/test_view/fake_display_name/filter/title');
+    $this->assertText('Invalid display id fake_display_name');
+
     $edit = array('display_id' => 'test 1');
     $this->drupalPostForm($machine_name_edit_url, $edit, 'Apply');
     $this->assertText($error_text);
