10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4bfce3 commit 91331e1Copy full SHA for 91331e1
src/Symfony/Component/Cache/Tests/Adapter/ArrayAdapterTest.php
@@ -102,4 +102,17 @@ public function testEnum()
102
103
$this->assertSame(TestEnum::Foo, $cache->getItem('foo')->get());
104
}
105
+
106
+ public function testExpiryCleanupOnError()
107
+ {
108
+ $cache = new ArrayAdapter();
109
110
+ $item = $cache->getItem('foo');
111
+ $this->assertTrue($cache->save($item->set('bar')));
112
+ $this->assertTrue($cache->hasItem('foo'));
113
114
+ $item->set(static fn () => null);
115
+ $this->assertFalse($cache->save($item));
116
+ $this->assertFalse($cache->hasItem('foo'));
117
+ }
118
0 commit comments