You are here

protected function ResponsivePreviewTestBase::assertResponsivePreviewCachesTagAndContexts in Responsive Theme Preview 8

Asserts whether responsive preview cache metadata is present.

2 calls to ResponsivePreviewTestBase::assertResponsivePreviewCachesTagAndContexts()
ResponsivePreviewBlockTest::testBlock in tests/src/Functional/ResponsivePreviewBlockTest.php
Tests responsive preview block.
ResponsivePreviewToolbarTest::testToolbarIntegration in tests/src/Functional/ResponsivePreviewToolbarTest.php
Tests that the toolbar integration works properly.

File

tests/src/Functional/ResponsivePreviewTestBase.php, line 73

Class

ResponsivePreviewTestBase
Responsive preview base test class.

Namespace

Drupal\Tests\responsive_preview\Functional

Code

protected function assertResponsivePreviewCachesTagAndContexts() {
  $this
    ->assertSession()
    ->responseHeaderContains('X-Drupal-Cache-Tags', 'config:responsive_preview_device_list');

  /*
   * @todo Bring back when
   * https://www.drupal.org/project/drupal/issues/2962320 is fixed.
   * $this->assertSession()
   * ->responseHeaderContains('X-Drupal-Cache-Contexts', 'route.is_admin');
   */
}