@@ -41,7 +41,7 @@ public function testAcquireNoBlocking()
41
41
->method ('save ' );
42
42
$ store
43
43
->method ('exists ' )
44
- ->willReturnOnConsecutiveCalls (true , false );
44
+ ->willReturn (true , false );
45
45
46
46
$ this ->assertTrue ($ lock ->acquire (false ));
47
47
}
@@ -57,7 +57,7 @@ public function testAcquireNoBlockingWithPersistingStoreInterface()
57
57
->method ('save ' );
58
58
$ store
59
59
->method ('exists ' )
60
- ->willReturnOnConsecutiveCalls (true , false );
60
+ ->willReturn (true , false );
61
61
62
62
$ this ->assertTrue ($ lock ->acquire (false ));
63
63
}
@@ -73,7 +73,7 @@ public function testAcquireBlockingWithPersistingStoreInterface()
73
73
->method ('save ' );
74
74
$ store
75
75
->method ('exists ' )
76
- ->willReturnOnConsecutiveCalls (true , false );
76
+ ->willReturn (true , false );
77
77
78
78
$ this ->assertTrue ($ lock ->acquire (true ));
79
79
}
@@ -95,7 +95,7 @@ public function testAcquireBlockingRetryWithPersistingStoreInterface()
95
95
});
96
96
$ store
97
97
->method ('exists ' )
98
- ->willReturnOnConsecutiveCalls (true , false );
98
+ ->willReturn (true , false );
99
99
100
100
$ this ->assertTrue ($ lock ->acquire (true ));
101
101
}
@@ -112,7 +112,7 @@ public function testAcquireReturnsFalse()
112
112
->willThrowException (new LockConflictedException ());
113
113
$ store
114
114
->method ('exists ' )
115
- ->willReturnOnConsecutiveCalls (true , false );
115
+ ->willReturn (true , false );
116
116
117
117
$ this ->assertFalse ($ lock ->acquire (false ));
118
118
}
@@ -129,7 +129,7 @@ public function testAcquireReturnsFalseStoreInterface()
129
129
->willThrowException (new LockConflictedException ());
130
130
$ store
131
131
->method ('exists ' )
132
- ->willReturnOnConsecutiveCalls (true , false );
132
+ ->willReturn (true , false );
133
133
134
134
$ this ->assertFalse ($ lock ->acquire (false ));
135
135
}
@@ -148,7 +148,7 @@ public function testAcquireBlockingWithBlockingStoreInterface()
148
148
->method ('waitAndSave ' );
149
149
$ store
150
150
->method ('exists ' )
151
- ->willReturnOnConsecutiveCalls (true , false );
151
+ ->willReturn (true , false );
152
152
153
153
$ this ->assertTrue ($ lock ->acquire (true ));
154
154
}
@@ -168,7 +168,7 @@ public function testAcquireSetsTtl()
168
168
->with ($ key , 10 );
169
169
$ store
170
170
->method ('exists ' )
171
- ->willReturnOnConsecutiveCalls (true , false );
171
+ ->willReturn (true , false );
172
172
173
173
$ lock ->acquire ();
174
174
}
@@ -185,7 +185,7 @@ public function testRefresh()
185
185
->with ($ key , 10 );
186
186
$ store
187
187
->method ('exists ' )
188
- ->willReturnOnConsecutiveCalls (true , false );
188
+ ->willReturn (true , false );
189
189
190
190
$ lock ->refresh ();
191
191
}
@@ -202,7 +202,7 @@ public function testRefreshCustom()
202
202
->with ($ key , 20 );
203
203
$ store
204
204
->method ('exists ' )
205
- ->willReturnOnConsecutiveCalls (true , false );
205
+ ->willReturn (true , false );
206
206
207
207
$ lock ->refresh (20 );
208
208
}
@@ -216,7 +216,7 @@ public function testIsAquired()
216
216
$ store
217
217
->method ('exists ' )
218
218
->with ($ key )
219
- ->willReturnOnConsecutiveCalls (true , false );
219
+ ->willReturn (true , false );
220
220
221
221
$ this ->assertTrue ($ lock ->isAcquired ());
222
222
}
@@ -269,8 +269,8 @@ public function testReleaseOnDestruction()
269
269
270
270
$ store
271
271
->method ('exists ' )
272
- ->willReturnOnConsecutiveCalls (true , false )
273
- ;
272
+ ->willReturn (true , false );
273
+
274
274
$ store
275
275
->expects ($ this ->once ())
276
276
->method ('delete ' )
@@ -288,8 +288,8 @@ public function testNoAutoReleaseWhenNotConfigured()
288
288
289
289
$ store
290
290
->method ('exists ' )
291
- ->willReturnOnConsecutiveCalls (true , false )
292
- ;
291
+ ->willReturn (true , false );
292
+
293
293
$ store
294
294
->expects ($ this ->never ())
295
295
->method ('delete ' )
@@ -315,7 +315,8 @@ public function testReleaseThrowsExceptionWhenDeletionFail()
315
315
$ store
316
316
->expects ($ this ->never ())
317
317
->method ('exists ' )
318
- ->with ($ key );
318
+ ->with ($ key )
319
+ ->willReturn (true );
319
320
320
321
$ lock ->release ();
321
322
}
@@ -456,7 +457,7 @@ public function testAcquireReadNoBlockingWithSharedLockStoreInterface()
456
457
->method ('saveRead ' );
457
458
$ store
458
459
->method ('exists ' )
459
- ->willReturnOnConsecutiveCalls (true , false );
460
+ ->willReturn (true , false );
460
461
461
462
$ this ->assertTrue ($ lock ->acquireRead (false ));
462
463
}
@@ -560,7 +561,7 @@ public function testAcquireReadBlockingWithBlockingSharedLockStoreInterface()
560
561
->method ('waitAndSaveRead ' );
561
562
$ store
562
563
->method ('exists ' )
563
- ->willReturnOnConsecutiveCalls (true , false );
564
+ ->willReturn (true , false );
564
565
565
566
$ this ->assertTrue ($ lock ->acquireRead (true ));
566
567
}
@@ -582,7 +583,7 @@ public function testAcquireReadBlockingWithSharedLockStoreInterface()
582
583
});
583
584
$ store
584
585
->method ('exists ' )
585
- ->willReturnOnConsecutiveCalls (true , false );
586
+ ->willReturn (true , false );
586
587
587
588
$ this ->assertTrue ($ lock ->acquireRead (true ));
588
589
}
@@ -598,7 +599,7 @@ public function testAcquireReadBlockingWithBlockingLockStoreInterface()
598
599
->method ('waitAndSave ' );
599
600
$ store
600
601
->method ('exists ' )
601
- ->willReturnOnConsecutiveCalls (true , false );
602
+ ->willReturn (true , false );
602
603
603
604
$ this ->assertTrue ($ lock ->acquireRead (true ));
604
605
}
@@ -620,7 +621,7 @@ public function testAcquireReadBlockingWithPersistingStoreInterface()
620
621
});
621
622
$ store
622
623
->method ('exists ' )
623
- ->willReturnOnConsecutiveCalls (true , false );
624
+ ->willReturn (true , false );
624
625
625
626
$ this ->assertTrue ($ lock ->acquireRead (true ));
626
627
}
0 commit comments