diff --git a/src/Symfony/Component/Cache/Tests/Psr16CacheTest.php b/src/Symfony/Component/Cache/Tests/Psr16CacheTest.php index cd4375c441fc0..5c11b1f4c5445 100644 --- a/src/Symfony/Component/Cache/Tests/Psr16CacheTest.php +++ b/src/Symfony/Component/Cache/Tests/Psr16CacheTest.php @@ -14,6 +14,7 @@ use Cache\IntegrationTests\SimpleCacheTest; use Psr\SimpleCache\CacheInterface; use Symfony\Component\Cache\Adapter\FilesystemAdapter; +use Symfony\Component\Cache\Adapter\TagAwareAdapter; use Symfony\Component\Cache\PruneableInterface; use Symfony\Component\Cache\Psr16Cache; @@ -173,6 +174,22 @@ protected function isPruned(CacheInterface $cache, string $name): bool return !file_exists($getFileMethod->invoke($pool, $name)); } + + public function testGetMultipleWithTagAwareAdapter() + { + if (isset($this->skippedTests[__FUNCTION__])) { + $this->markTestSkipped($this->skippedTests[__FUNCTION__]); + } + + $cache = new Psr16Cache(new TagAwareAdapter(new FilesystemAdapter())); + + $cache->set('foo', 'foo-val'); + $cache->set('bar', 'bar-val'); + $cache->set('baz', 'baz-val'); + $cache->set('qux', 'qux-val'); + + $this->assertEquals(['foo' => 'foo-val', 'bar' => 'bar-val', 'baz' => 'baz-val', 'qux' => 'qux-val'], $cache->getMultiple(['foo', 'bar', 'baz', 'qux'])); + } } class NotUnserializable