Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / views_ui / tests / src / Functional / UITestBase.php
index 684b91f89da69dab121a40fb7379979bd1a09565..db857737141225ac825d428a21a5bf77b085bd8f 100644 (file)
@@ -76,8 +76,8 @@ abstract class UITestBase extends ViewTestBase {
     $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'));