comparison core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
16 16
17 public function testFoo() { 17 public function testFoo() {
18 $this->drupalGet('/default_format_test/human'); 18 $this->drupalGet('/default_format_test/human');
19 $this->assertSame('format:html', $this->getSession()->getPage()->getContent()); 19 $this->assertSame('format:html', $this->getSession()->getPage()->getContent());
20 $this->assertSame('MISS', $this->drupalGetHeader('X-Drupal-Cache')); 20 $this->assertSame('MISS', $this->drupalGetHeader('X-Drupal-Cache'));
21 $this->drupalGet('/default_format_test/human');
22 $this->assertSame('format:html', $this->getSession()->getPage()->getContent());
23 $this->assertSame('HIT', $this->drupalGetHeader('X-Drupal-Cache'));
21 24
22 $this->drupalGet('/default_format_test/machine'); 25 $this->drupalGet('/default_format_test/machine');
23 $this->assertSame('format:json', $this->getSession()->getPage()->getContent()); 26 $this->assertSame('format:json', $this->getSession()->getPage()->getContent());
24 $this->assertSame('MISS', $this->drupalGetHeader('X-Drupal-Cache')); 27 $this->assertSame('MISS', $this->drupalGetHeader('X-Drupal-Cache'));
28 $this->drupalGet('/default_format_test/machine');
29 $this->assertSame('format:json', $this->getSession()->getPage()->getContent());
30 $this->assertSame('HIT', $this->drupalGetHeader('X-Drupal-Cache'));
25 } 31 }
26 32
27 public function testMultipleRoutesWithSameSingleFormat() { 33 public function testMultipleRoutesWithSameSingleFormat() {
28 $this->drupalGet('/default_format_test/machine'); 34 $this->drupalGet('/default_format_test/machine');
29 $this->assertSame('format:json', $this->getSession()->getPage()->getContent()); 35 $this->assertSame('format:json', $this->getSession()->getPage()->getContent());