X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews_ui%2Fsrc%2FTests%2FViewEditTest.php;fp=web%2Fcore%2Fmodules%2Fviews_ui%2Fsrc%2FTests%2FViewEditTest.php;h=819a4391bb6566ed9910564c7bac9e8caada5efa;hp=08c5cfe862b02a1fde2cb6b30110acc623a1fe03;hb=bfbba508964731508b9bd6d5835c2edc858db95b;hpb=cb9a80db11fc6b014e5b1e693a5a391c95eb5d9a diff --git a/web/core/modules/views_ui/src/Tests/ViewEditTest.php b/web/core/modules/views_ui/src/Tests/ViewEditTest.php index 08c5cfe86..819a4391b 100644 --- a/web/core/modules/views_ui/src/Tests/ViewEditTest.php +++ b/web/core/modules/views_ui/src/Tests/ViewEditTest.php @@ -64,6 +64,12 @@ class ViewEditTest extends UITestBase { $this->assertIdentical($displays['test_1']['id'], 'test_1', 'New display ID matches the display ID key.'); $this->assertFalse(array_key_exists('attachment_1', $displays), 'Old display ID not found.'); + // Set to the same machine name and save the View. + $edit = ['display_id' => 'test_1']; + $this->drupalPostForm('admin/structure/views/nojs/display/test_view/test_1/display_id', $edit, 'Apply'); + $this->drupalPostForm(NULL, [], 'Save'); + $this->assertLink(t('test_1')); + // Test the form validation with invalid IDs. $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.');