class ProxyAdapterTest extends AdapterTestCase
{ protected $skippedTests =
[ 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayAdapter is not.',
'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayAdapter is not.',
'testPrune' => 'ProxyAdapter just proxies',
];
public function createCachePool(int
$defaultLifetime = 0, string
$testMethod = null
): CacheItemPoolInterface
{ if ('testGetMetadata' ===
$testMethod) { return new ProxyAdapter(new FilesystemAdapter(), '',
$defaultLifetime);
} return new ProxyAdapter(new ArrayAdapter(), '',
$defaultLifetime);
} public function testProxyfiedItem() { $this->
expectException(\Exception::
class);
$this->
expectExceptionMessage('OK bar'
);
$item =
new CacheItem();
$pool =
new ProxyAdapter(new TestingArrayAdapter($item));