Mercurial > hg > isophonics-drupal-site
comparison core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | |
children | af1871eacc83 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\FunctionalTests\Routing; | |
4 | |
5 use Drupal\Tests\BrowserTestBase; | |
6 | |
7 /** | |
8 * @group routing | |
9 */ | |
10 class DefaultFormatTest extends BrowserTestBase { | |
11 | |
12 /** | |
13 * {@inheritdoc} | |
14 */ | |
15 public static $modules = ['system', 'default_format_test']; | |
16 | |
17 public function testFoo() { | |
18 $this->drupalGet('/default_format_test/human'); | |
19 $this->assertSame('format:html', $this->getSession()->getPage()->getContent()); | |
20 $this->assertSame('MISS', $this->drupalGetHeader('X-Drupal-Cache')); | |
21 | |
22 $this->drupalGet('/default_format_test/machine'); | |
23 $this->assertSame('format:json', $this->getSession()->getPage()->getContent()); | |
24 $this->assertSame('MISS', $this->drupalGetHeader('X-Drupal-Cache')); | |
25 } | |
26 | |
27 public function testMultipleRoutesWithSameSingleFormat() { | |
28 $this->drupalGet('/default_format_test/machine'); | |
29 $this->assertSame('format:json', $this->getSession()->getPage()->getContent()); | |
30 } | |
31 | |
32 } |