+ /**
+ * Verifies REST export views work on the same path as a page display.
+ */
+ public function testSharedPagePath() {
+ // Test with no format as well as html explicitly.
+ $this->drupalGet('test/serialize/shared');
+ $this->assertResponse(200);
+ $this->assertHeader('content-type', 'text/html; charset=UTF-8');
+
+ $this->drupalGet('test/serialize/shared', ['query' => ['_format' => 'html']]);
+ $this->assertResponse(200);
+ $this->assertHeader('content-type', 'text/html; charset=UTF-8');
+
+ $this->drupalGet('test/serialize/shared', ['query' => ['_format' => 'json']]);
+ $this->assertResponse(200);
+ $this->assertHeader('content-type', 'application/json');
+
+ $this->drupalGet('test/serialize/shared', ['query' => ['_format' => 'xml']]);
+ $this->assertResponse(200);
+ $this->assertHeader('content-type', 'text/xml; charset=UTF-8');
+ }
+