public function DefaultFormatTest::testFoo in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php \Drupal\FunctionalTests\Routing\DefaultFormatTest::testFoo()
- 9 core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php \Drupal\FunctionalTests\Routing\DefaultFormatTest::testFoo()
File
- core/
tests/ Drupal/ FunctionalTests/ Routing/ DefaultFormatTest.php, line 22
Class
- DefaultFormatTest
- @group routing
Namespace
Drupal\FunctionalTests\RoutingCode
public function testFoo() {
$this
->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');
}