You are here

protected function CacheableMetadataCalculationTest::resetState in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php \Drupal\Tests\views\Kernel\CacheableMetadataCalculationTest::resetState()
  2. 9 core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php \Drupal\Tests\views\Kernel\CacheableMetadataCalculationTest::resetState()

Resets the state so we are ready for a new test.

File

core/modules/views/tests/src/Kernel/CacheableMetadataCalculationTest.php, line 109

Class

CacheableMetadataCalculationTest
Tests that cacheability metadata is only calculated when needed.

Namespace

Drupal\Tests\views\Kernel

Code

protected function resetState() {
  $this->state
    ->set('views_test_cacheable_metadata_has_been_accessed', FALSE);
}