diff --git a/core/modules/rest/src/Tests/Views/StyleSerializerTest.php b/core/modules/rest/src/Tests/Views/StyleSerializerTest.php index 6e04d6b96e..53d038bb8d 100644 --- a/core/modules/rest/src/Tests/Views/StyleSerializerTest.php +++ b/core/modules/rest/src/Tests/Views/StyleSerializerTest.php @@ -373,12 +373,12 @@ public function testResponseFormatConfiguration() { // Should return a 406. Emulates a sample Firefox header. $this->drupalGet('test/serialize/field', [], ['Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8']); - $this->assertHeader('content-type', 'text/html; charset=UTF-8'); + $this->assertHeader('content-type', 'text/plain; charset=UTF-8'); $this->assertResponse(406, 'A 406 response was returned when a browser accept header was requested.'); // Should return a 406. $this->drupalGetWithFormat('test/serialize/field', 'html'); - $this->assertHeader('content-type', 'text/html; charset=UTF-8'); + $this->assertHeader('content-type', 'text/plain; charset=UTF-8'); $this->assertResponse(406, 'A 406 response was returned when HTML was requested.'); // Should return a 200. @@ -407,7 +407,7 @@ public function testResponseFormatConfiguration() { $this->assertResponse(200, 'A 200 response was returned when XML was requested'); // Should return a 406 for HTML. $this->drupalGetWithFormat('test/serialize/field', 'html'); - $this->assertHeader('content-type', 'text/html; charset=UTF-8'); + $this->assertHeader('content-type', 'text/plain; charset=UTF-8'); $this->assertResponse(406, 'A 406 response was returned when HTML was requested.'); } diff --git a/core/modules/views/src/Tests/Wizard/BasicTest.php b/core/modules/views/src/Tests/Wizard/BasicTest.php index 7394991d23..245a0d1441 100644 --- a/core/modules/views/src/Tests/Wizard/BasicTest.php +++ b/core/modules/views/src/Tests/Wizard/BasicTest.php @@ -161,8 +161,9 @@ public function testViewsWizardAndListing() { $this->drupalPostForm('admin/structure/views/add', $view4, t('Save and edit')); $this->assertRaw(t('The view %view has been saved.', ['%view' => $view4['label']])); - // Check that the REST export path works. - $this->drupalGet($view4['rest_export[path]']); + // Check that the REST export path works. JSON will work, as all core + // formats will be allowed. JSON and XML by default. + $this->drupalGetJSON($view4['rest_export[path]']); $this->assertResponse(200); $data = Json::decode($this->content); $this->assertEqual(count($data), 1, 'Only the node of type page is exported.');