You are here

public function HelpTopicTwigTest::testCacheInfo in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php \Drupal\Tests\help_topics\Unit\HelpTopicTwigTest::testCacheInfo()

@covers ::getCacheContexts @covers ::getCacheTags @covers ::getCacheMaxAge

File

core/modules/help_topics/tests/src/Unit/HelpTopicTwigTest.php, line 82

Class

HelpTopicTwigTest
Unit test for the HelpTopicTwig class.

Namespace

Drupal\Tests\help_topics\Unit

Code

public function testCacheInfo() {
  $this
    ->assertEquals([], $this->helpTopic
    ->getCacheContexts());
  $this
    ->assertEquals([
    'core.extension',
  ], $this->helpTopic
    ->getCacheTags());
  $this
    ->assertEquals(Cache::PERMANENT, $this->helpTopic
    ->getCacheMaxAge());
}