Skip to content

Commit f6ebfa8

Browse files
committed
Ignore Redis on tests
1 parent 83156c3 commit f6ebfa8

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ vendor/
22
.phpunit.cache/
33
coverage/
44
.DS_Store
5+
tests/storage/framework/cache/
6+
tests/storage/framework/sessions/
7+
tests/storage/framework/views/
8+
tests/storage/logs/

tests/Unit/Drivers/MemoizationTest.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)