File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -200,6 +200,24 @@ public function testDeleteItemsWithIncorrectKeyShouldThrowAnException($char)
200200 $ this ->pool ->deleteItems ([$ item ->getKey ()]);
201201 }
202202
203+ public function testSimpleTempdirCacheWriteOnWindows ()
204+ {
205+ $ pool = new FileSystemCacheItemPool (sys_get_temp_dir () . '/google_cache/ ' );
206+ $ cacheKey = sprintf (
207+ 'session_cache.%s.%s.%s.%s ' ,
208+ 'myawesomeproject ' ,
209+ 'myinstance ' ,
210+ '21995090 ' ,
211+ '' ,
212+ );
213+ $ cacheItem = $ pool ->getItem ($ cacheKey );
214+ $ cacheItem ->set ('foo ' );
215+ $ pool ->save ($ cacheItem );
216+
217+ $ retrievedItem = $ pool ->getItem ($ cacheKey );
218+ $ this ->assertEquals ('foo ' , $ retrievedItem ->get ());
219+ }
220+
203221 private function getNewItem (null |string $ key = null ): TypedItem
204222 {
205223 $ item = new TypedItem ($ key ?? 'NewItem ' );
You can’t perform that action at this time.
0 commit comments