[TESTS] Fix Core/CacheTest

This commit is contained in:
Diogo Peralta Cordeiro 2022-03-07 13:44:49 +00:00
parent 88ace68627
commit 813e66e83e
No known key found for this signature in database
GPG Key ID: 18D2D35001FBFAB0

View File

@ -140,10 +140,10 @@ class CacheTest extends KernelTestCase
static::assertSame(['quux', 'foo', 'bar'], Cache::getList($key, function ($i) { $this->assertFalse('should not be called'); }, pool: 'file'));
Cache::listPushLeft($key, 'foobar', max_count: 2, pool: 'file');
static::assertSame(['foobar', 'quux'], Cache::getList($key, function ($i) { $this->assertFalse('should not be called'); }, pool: 'file'));
Cache::listPushRight($key, 'foo');
static::assertSame(['foobar', 'quux', 'foo'], Cache::getList($key, function ($i) { $this->assertFalse('should not be called'); }));
Cache::listPushRight($key, 'bar', max_count: 2);
static::assertSame(['foo', 'bar'], Cache::getList($key, function ($i) { $this->assertFalse('should not be called'); }));
Cache::listPushRight($key, 'foo', pool: 'file');
static::assertSame(['foobar', 'quux', 'foo'], Cache::getList($key, function ($i) { $this->assertFalse('should not be called'); }, pool: 'file'));
Cache::listPushRight($key, 'bar', max_count: 2, pool: 'file');
static::assertSame(['foo', 'bar'], Cache::getList($key, function ($i) { $this->assertFalse('should not be called'); }, pool: 'file'));
static::assertTrue(Cache::deleteList($key, pool: 'file'));
}
}