public function PluginIdTest::testCacheTags in Plugin 8.2
@covers ::getCacheTags @covers ::getCacheableMetadata
File
- tests/
src/ Unit/ Plugin/ views/ filter/ PluginIdTest.php, line 117
Class
- PluginIdTest
- @coversDefaultClass \Drupal\plugin\Plugin\views\filter\PluginId
Namespace
Drupal\Tests\plugin\Unit\Plugin\views\filterCode
public function testCacheTags() {
$plugin_manager_cache_tags = [
'bar',
'foo',
];
$plugin_manager = $this
->prophesize(CacheableDependencyPluginManagerInterface::class);
$plugin_manager
->getCacheContexts()
->willReturn([]);
$plugin_manager
->getCacheTags()
->willReturn($plugin_manager_cache_tags);
$plugin_manager
->getCacheMaxAge()
->willReturn(0);
$this->pluginType
->getPluginManager()
->willReturn($plugin_manager
->reveal());
$this
->assertEquals($plugin_manager_cache_tags, $this->sut
->getCacheTags());
}