|
4 | 4 |
|
5 | 5 | namespace Hypervel\Tests\Cache\Redis\Operations\AllTag; |
6 | 6 |
|
7 | | -use Carbon\Carbon; |
8 | | -use Hypervel\Testbench\TestCase; |
9 | | -use Hypervel\Tests\Cache\Redis\Concerns\MocksRedisConnections; |
| 7 | +use Hypervel\Tests\Cache\Redis\RedisCacheTestCase; |
10 | 8 |
|
11 | 9 | /** |
12 | 10 | * Tests for the Add operation (intersection tags). |
|
17 | 15 | * @internal |
18 | 16 | * @coversNothing |
19 | 17 | */ |
20 | | -class AddTest extends TestCase |
| 18 | +class AddTest extends RedisCacheTestCase |
21 | 19 | { |
22 | | - use MocksRedisConnections; |
23 | | - |
24 | 20 | /** |
25 | 21 | * @test |
26 | 22 | */ |
27 | 23 | public function testAddWithTagsReturnsTrueWhenKeyAdded(): void |
28 | 24 | { |
29 | | - Carbon::setTestNow('2000-01-01 00:00:00'); |
30 | | - |
31 | 25 | $connection = $this->mockConnection(); |
32 | 26 | $client = $connection->_mockClient; |
33 | 27 |
|
@@ -65,8 +59,6 @@ public function testAddWithTagsReturnsTrueWhenKeyAdded(): void |
65 | 59 | */ |
66 | 60 | public function testAddWithTagsReturnsFalseWhenKeyExists(): void |
67 | 61 | { |
68 | | - Carbon::setTestNow('2000-01-01 00:00:00'); |
69 | | - |
70 | 62 | $connection = $this->mockConnection(); |
71 | 63 | $client = $connection->_mockClient; |
72 | 64 |
|
@@ -97,8 +89,6 @@ public function testAddWithTagsReturnsFalseWhenKeyExists(): void |
97 | 89 | */ |
98 | 90 | public function testAddWithMultipleTags(): void |
99 | 91 | { |
100 | | - Carbon::setTestNow('2000-01-01 00:00:00'); |
101 | | - |
102 | 92 | $connection = $this->mockConnection(); |
103 | 93 | $client = $connection->_mockClient; |
104 | 94 |
|
@@ -170,8 +160,6 @@ public function testAddWithEmptyTagsSkipsPipeline(): void |
170 | 160 | */ |
171 | 161 | public function testAddInClusterModeUsesSequentialCommands(): void |
172 | 162 | { |
173 | | - Carbon::setTestNow('2000-01-01 00:00:00'); |
174 | | - |
175 | 163 | [$store, $clusterClient] = $this->createClusterStore(); |
176 | 164 |
|
177 | 165 | // Should NOT use pipeline in cluster mode |
@@ -204,8 +192,6 @@ public function testAddInClusterModeUsesSequentialCommands(): void |
204 | 192 | */ |
205 | 193 | public function testAddInClusterModeReturnsFalseWhenKeyExists(): void |
206 | 194 | { |
207 | | - Carbon::setTestNow('2000-01-01 00:00:00'); |
208 | | - |
209 | 195 | [$store, $clusterClient] = $this->createClusterStore(); |
210 | 196 |
|
211 | 197 | // Sequential ZADD (still happens even if key exists) |
@@ -263,8 +249,6 @@ public function testAddEnforcesMinimumTtlOfOne(): void |
263 | 249 | */ |
264 | 250 | public function testAddWithNumericValue(): void |
265 | 251 | { |
266 | | - Carbon::setTestNow('2000-01-01 00:00:00'); |
267 | | - |
268 | 252 | $connection = $this->mockConnection(); |
269 | 253 | $client = $connection->_mockClient; |
270 | 254 |
|
|
0 commit comments