class ChainAdapterTest extends AdapterTestCase
{ public function createCachePool(int
$defaultLifetime = 0, string
$testMethod = null
): CacheItemPoolInterface
{ if ('testGetMetadata' ===
$testMethod) { return new ChainAdapter([new FilesystemAdapter('a',
$defaultLifetime),
new FilesystemAdapter('b',
$defaultLifetime)],
$defaultLifetime);
} return new ChainAdapter([new ArrayAdapter($defaultLifetime),
new ExternalAdapter($defaultLifetime),
new FilesystemAdapter('',
$defaultLifetime)],
$defaultLifetime);
} public static function tearDownAfterClass(): void
{ (new Filesystem())->
remove(sys_get_temp_dir().'/symfony-cache'
);
} public function testEmptyAdaptersException() { $this->
expectException(InvalidArgumentException::
class);
$this->
expectExceptionMessage('At least one adapter must be specified.'
);