function WebTestBase::assertNoCacheTag
Asserts whether an expected cache tag was absent in the last response.
Parameters
string $cache_tag: The cache tag to check.
File
-
core/
modules/ simpletest/ src/ WebTestBase.php, line 2065
Class
- WebTestBase
- Test case for typical Drupal tests.
Namespace
Drupal\simpletestCode
protected function assertNoCacheTag($cache_tag) {
$cache_tags = explode(' ', $this->drupalGetHeader('X-Drupal-Cache-Tags'));
$this->assertFalse(in_array($cache_tag, $cache_tags), "'" . $cache_tag . "' is absent in the X-Drupal-Cache-Tags header.");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.