diff --git a/tests/src/Kernel/AccessTest.php b/tests/src/Kernel/AccessTest.php index 4e8a9ed..a8456a9 100644 --- a/tests/src/Kernel/AccessTest.php +++ b/tests/src/Kernel/AccessTest.php @@ -319,7 +319,7 @@ class AccessTest extends KernelTestBase { self::assertSame($expected_content, $build['content']); $expected_cache = [ 'contexts' => ['user'], - 'tags' => ['tag_from_blockAccess'], + 'tags' => ['tag_from_blockAccess', 'tag_twig_tweak_test_foo_plugin'], 'max-age' => 35, ]; self::assertSame($expected_cache, $build['#cache']); diff --git a/tests/twig_tweak_test/src/Plugin/Block/FooBlock.php b/tests/twig_tweak_test/src/Plugin/Block/FooBlock.php index 88028c4..37b1ec8 100644 --- a/tests/twig_tweak_test/src/Plugin/Block/FooBlock.php +++ b/tests/twig_tweak_test/src/Plugin/Block/FooBlock.php @@ -41,4 +41,11 @@ class FooBlock extends BlockBase { ]; } + /** + * {@inheritdoc} + */ + public function getCacheTags() { + return ['tag_twig_tweak_test_foo_plugin']; + } + }