File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -447,17 +447,23 @@ public function testDeferredSaveWithoutCommit()
447447 return ;
448448 }
449449
450- $ item = $ this ->cache ->getItem ('key ' );
451- $ item ->set ('4711 ' );
452- $ this ->cache ->saveDeferred ($ item );
453-
454- $ this ->cache = null ;
450+ $ this ->prepareDeferredSaveWithoutCommit ();
455451 gc_collect_cycles ();
456452
457453 $ cache = $ this ->createCachePool ();
458454 $ this ->assertTrue ($ cache ->getItem ('key ' )->isHit (), 'A deferred item should automatically be committed on CachePool::__destruct(). ' );
459455 }
460456
457+ private function prepareDeferredSaveWithoutCommit ()
458+ {
459+ $ cache = $ this ->cache ;
460+ $ this ->cache = null ;
461+
462+ $ item = $ cache ->getItem ('key ' );
463+ $ item ->set ('4711 ' );
464+ $ cache ->saveDeferred ($ item );
465+ }
466+
461467 public function testCommit ()
462468 {
463469 if (isset ($ this ->skippedTests [__FUNCTION__ ])) {
You can’t perform that action at this time.
0 commit comments