drupalGet('/default_format_test/human'); $this->assertSame('format:html', $this->getSession()->getPage()->getContent()); $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'MISS'); $this->drupalGet('/default_format_test/human'); $this->assertSame('format:html', $this->getSession()->getPage()->getContent()); $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'HIT'); $this->drupalGet('/default_format_test/machine'); $this->assertSame('format:json', $this->getSession()->getPage()->getContent()); $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'MISS'); $this->drupalGet('/default_format_test/machine'); $this->assertSame('format:json', $this->getSession()->getPage()->getContent()); $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', 'HIT'); } public function testMultipleRoutesWithSameSingleFormat(): void { $this->drupalGet('/default_format_test/machine'); $this->assertSame('format:json', $this->getSession()->getPage()->getContent()); } }