CacheInvalidatorStorage example


class CacheInvalidatorStorageTest extends TestCase
{
    /** * @DisabledFeatures("v6.6.0.0") */
    public function testStorage(): void
    {
        $storage = new CacheInvalidatorStorage(new ArrayAdapter());

        static::assertSame($storage->loadAndDelete()[]);

        $storage->store(['foo', 'bar']);

        static::assertSame(['foo', 'bar']$storage->loadAndDelete());
        static::assertSame([]$storage->loadAndDelete());
    }
}
Home | Imprint | This part of the site doesn't use cookies.