File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 22.phpunit.cache /
33coverage /
44.DS_Store
5+ tests /storage /framework /cache /
6+ tests /storage /framework /sessions /
7+ tests /storage /framework /views /
8+ tests /storage /logs /
Original file line number Diff line number Diff line change @@ -119,11 +119,22 @@ public function test_memo_with_remember()
119119
120120 public function test_memo_with_different_stores ()
121121 {
122- $ memoRedis = SmartCache::memo ('redis ' );
122+ // Test that memoization works with different cache stores
123+ // Use stores that don't require external services (file, array)
124+
125+ // Test with file store
123126 $ memoFile = SmartCache::memo ('file ' );
124-
125- $ this ->assertInstanceOf (\SmartCache \SmartCache::class, $ memoRedis );
126127 $ this ->assertInstanceOf (\SmartCache \SmartCache::class, $ memoFile );
128+
129+ $ memoFile ->put ('file_test ' , 'file_value ' , 60 );
130+ $ this ->assertEquals ('file_value ' , $ memoFile ->get ('file_test ' ));
131+
132+ // Test with array store
133+ $ memoArray = SmartCache::memo ('array ' );
134+ $ this ->assertInstanceOf (\SmartCache \SmartCache::class, $ memoArray );
135+
136+ $ memoArray ->put ('array_test ' , 'array_value ' , 60 );
137+ $ this ->assertEquals ('array_value ' , $ memoArray ->get ('array_test ' ));
127138 }
128139
129140 public function test_memo_performance_improvement ()
You can’t perform that action at this time.
0 commit comments