function 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($this->helpTopic
    ->getCacheTags(), [
    'core.extension',
  ]);
  $this->assertEquals($this->helpTopic
    ->getCacheMaxAge(), Cache::PERMANENT);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.