diff -u b/core/modules/views_ui/src/Tests/UITestBase.php b/core/modules/views_ui/src/Tests/UITestBase.php --- b/core/modules/views_ui/src/Tests/UITestBase.php +++ b/core/modules/views_ui/src/Tests/UITestBase.php @@ -2,8 +2,6 @@ namespace Drupal\views_ui\Tests; -@trigger_error('\Drupal\views_ui\Tests\UITestBase is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.x. Instead, use \Drupal\Tests\views_ui\Functional\UITestBase', E_USER_DEPRECATED); - use Drupal\views\Tests\ViewTestBase; /** @@ -53,6 +51,8 @@ 'administer permissions', ]); $this->drupalLogin($this->fullAdminUser); + + @trigger_error('\Drupal\views_ui\Tests\UITestBase is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.x. Instead, use \Drupal\Tests\views_ui\Functional\UITestBase', E_USER_DEPRECATED); } /** diff -u b/core/modules/views_ui/tests/src/Functional/UITestBase.php b/core/modules/views_ui/src/Tests/UITestBase.php --- b/core/modules/views_ui/tests/src/Functional/UITestBase.php +++ b/core/modules/views_ui/src/Tests/UITestBase.php @@ -1,11 +1,14 @@ enableViewsTestModule(); @@ -48,6 +51,8 @@ 'administer permissions', ]); $this->drupalLogin($this->fullAdminUser); + + @trigger_error('\Drupal\views_ui\Tests\UITestBase is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.x. Instead, use \Drupal\Tests\views_ui\Functional\UITestBase', E_USER_DEPRECATED); } /** @@ -78,9 +83,9 @@ // Ensure that each nojs page is accessible via ajax as well. if (strpos($url, 'nojs') !== FALSE) { $url = str_replace('nojs', 'ajax', $url); - $result = $this->drupalGet($url, $options); - $this->assertSession()->statusCodeEquals(200); - $this->assertEquals('application/json', $this->getSession()->getResponseHeader('Content-Type')); + $result = $this->drupalGet($url, $options, $headers); + $this->assertResponse(200); + $this->assertHeader('Content-Type', 'application/json'); $this->assertTrue(json_decode($result), 'Ensure that the AJAX request returned valid content.'); }