Skip to content

Commit 1e7276f

Browse files
committed
up
1 parent 3897800 commit 1e7276f

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

tests/RoadRunnerStoreTest.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function testSave(): void
1616
$rrLock = $this->createMock(RrLock::class);
1717
$rrLock->expects(self::once())
1818
->method('lock')
19-
->with('resource-name');
19+
->with('resource-name', '*');
2020
$store = new RoadRunnerStore($rrLock);
2121
$store->save(new Key('resource-name'));
2222
}
@@ -26,7 +26,7 @@ public function testExists(): void
2626
$rrLock = $this->createMock(RrLock::class);
2727
$rrLock->expects(self::once())
2828
->method('exists')
29-
->with('resource-name');
29+
->with('resource-name', '*');
3030
$store = new RoadRunnerStore($rrLock);
3131
$store->exists(new Key('resource-name'));
3232
}
@@ -40,4 +40,24 @@ public function testPutOffExpiration(): void
4040
$store = new RoadRunnerStore($rrLock);
4141
$store->putOffExpiration(new Key('resource-name'), 3600.0);
4242
}
43+
44+
public function testDelete(): void
45+
{
46+
$rrLock = $this->createMock(RrLock::class);
47+
$rrLock->expects(self::once())
48+
->method('forceRelease')
49+
->with('resource-name');
50+
$store = new RoadRunnerStore($rrLock);
51+
$store->delete(new Key('resource-name'));
52+
}
53+
54+
public function testSaveRead(): void
55+
{
56+
$rrLock = $this->createMock(RrLock::class);
57+
$rrLock->expects(self::once())
58+
->method('lockRead')
59+
->with('resource-name', '*');
60+
$store = new RoadRunnerStore($rrLock);
61+
$store->saveRead(new Key('resource-name'));
62+
}
4363
}

0 commit comments

Comments
 (0)