protected function WebTestBase::assertCacheTag in SimpleTest 8.3
Asserts whether an expected cache tag was present in the last response.
Parameters
string $expected_cache_tag: The expected cache tag.
File
- src/
WebTestBase.php, line 2054
Class
- WebTestBase
- Test case for typical Drupal tests.
Namespace
Drupal\simpletestCode
protected function assertCacheTag($expected_cache_tag) {
$cache_tags = explode(' ', $this
->drupalGetHeader('X-Drupal-Cache-Tags'));
$this
->assertTrue(in_array($expected_cache_tag, $cache_tags), "'" . $expected_cache_tag . "' is present in the X-Drupal-Cache-Tags header.");
}