From bc53ca951eae23e336d6cc18b1e8327faa2c87af Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Mon, 14 May 2018 14:26:12 +0100 Subject: [PATCH] Issue #2924753 by vaplas, alexpott, borisson_, xjm: Random fail in ExposedFormUITest --- core/modules/views_ui/tests/src/Functional/UITestBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/views_ui/tests/src/Functional/UITestBase.php b/core/modules/views_ui/tests/src/Functional/UITestBase.php index 684b91f89da6..db8577371412 100644 --- a/core/modules/views_ui/tests/src/Functional/UITestBase.php +++ b/core/modules/views_ui/tests/src/Functional/UITestBase.php @@ -76,8 +76,8 @@ protected function drupalGet($path, array $options = [], array $headers = []) { $url = $this->buildUrl($path, $options); // Ensure that each nojs page is accessible via ajax as well. - if (strpos($url, 'nojs') !== FALSE) { - $url = str_replace('nojs', 'ajax', $url); + if (strpos($url, '/nojs/') !== FALSE) { + $url = preg_replace('|/nojs/|', '/ajax/', $url, 1); $result = $this->drupalGet($url, $options); $this->assertSession()->statusCodeEquals(200); $this->assertEquals('application/json', $this->getSession()->getResponseHeader('Content-Type')); -- GitLab