You are here

protected function WebformAssertLegacyTrait::assertCacheTag in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Traits/WebformAssertLegacyTrait.php \Drupal\Tests\webform\Traits\WebformAssertLegacyTrait::assertCacheTag()

Asserts whether an expected cache tag was present in the last response.

Parameters

string $expected_cache_tag: The expected cache tag.

File

tests/src/Traits/WebformAssertLegacyTrait.php, line 644

Class

WebformAssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\Tests\webform\Traits

Code

protected function assertCacheTag($expected_cache_tag) {
  $this
    ->assertSession()
    ->responseHeaderContains('X-Drupal-Cache-Tags', $expected_cache_tag);
}