We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7734bf commit 463673dCopy full SHA for 463673d
tests/CacheTest.php
@@ -24,6 +24,16 @@ public function it_stores_and_retrieves_values(): void
24
$this->assertPromiseFulfillsWith($this->cache->get('key'), 'test');
25
}
26
27
+ /** @test */
28
+ public function it_stores_values_with_ttl(): void
29
+ {
30
+ $this->waitForPromise($this->cache->set('key', 'test', 1));
31
+
32
+ sleep(1);
33
34
+ $this->assertPromiseRejectsWith($this->cache->get('key'), Exception::class);
35
+ }
36
37
/** @test */
38
public function it_rejects_promise_when_retrieving_non_existing_key(): void
39
{
0 commit comments