@@ -39,7 +39,7 @@ public function testAcquireNoBlocking()
39
39
->method ('save ' );
40
40
$ store
41
41
->method ('exists ' )
42
- ->willReturnOnConsecutiveCalls (true , false );
42
+ ->willReturn (true , false );
43
43
44
44
$ this ->assertTrue ($ lock ->acquire (false ));
45
45
}
@@ -55,7 +55,7 @@ public function testAcquireNoBlockingWithPersistingStoreInterface()
55
55
->method ('save ' );
56
56
$ store
57
57
->method ('exists ' )
58
- ->willReturnOnConsecutiveCalls (true , false );
58
+ ->willReturn (true , false );
59
59
60
60
$ this ->assertTrue ($ lock ->acquire (false ));
61
61
}
@@ -71,7 +71,7 @@ public function testAcquireBlockingWithPersistingStoreInterface()
71
71
->method ('save ' );
72
72
$ store
73
73
->method ('exists ' )
74
- ->willReturnOnConsecutiveCalls (true , false );
74
+ ->willReturn (true , false );
75
75
76
76
$ this ->assertTrue ($ lock ->acquire (true ));
77
77
}
@@ -93,7 +93,7 @@ public function testAcquireBlockingRetryWithPersistingStoreInterface()
93
93
});
94
94
$ store
95
95
->method ('exists ' )
96
- ->willReturnOnConsecutiveCalls (true , false );
96
+ ->willReturn (true , false );
97
97
98
98
$ this ->assertTrue ($ lock ->acquire (true ));
99
99
}
@@ -110,7 +110,7 @@ public function testAcquireReturnsFalse()
110
110
->willThrowException (new LockConflictedException ());
111
111
$ store
112
112
->method ('exists ' )
113
- ->willReturnOnConsecutiveCalls (true , false );
113
+ ->willReturn (true , false );
114
114
115
115
$ this ->assertFalse ($ lock ->acquire (false ));
116
116
}
@@ -127,7 +127,7 @@ public function testAcquireReturnsFalseStoreInterface()
127
127
->willThrowException (new LockConflictedException ());
128
128
$ store
129
129
->method ('exists ' )
130
- ->willReturnOnConsecutiveCalls (true , false );
130
+ ->willReturn (true , false );
131
131
132
132
$ this ->assertFalse ($ lock ->acquire (false ));
133
133
}
@@ -146,7 +146,7 @@ public function testAcquireBlockingWithBlockingStoreInterface()
146
146
->method ('waitAndSave ' );
147
147
$ store
148
148
->method ('exists ' )
149
- ->willReturnOnConsecutiveCalls (true , false );
149
+ ->willReturn (true , false );
150
150
151
151
$ this ->assertTrue ($ lock ->acquire (true ));
152
152
}
@@ -166,7 +166,7 @@ public function testAcquireSetsTtl()
166
166
->with ($ key , 10 );
167
167
$ store
168
168
->method ('exists ' )
169
- ->willReturnOnConsecutiveCalls (true , false );
169
+ ->willReturn (true , false );
170
170
171
171
$ lock ->acquire ();
172
172
}
@@ -183,7 +183,7 @@ public function testRefresh()
183
183
->with ($ key , 10 );
184
184
$ store
185
185
->method ('exists ' )
186
- ->willReturnOnConsecutiveCalls (true , false );
186
+ ->willReturn (true , false );
187
187
188
188
$ lock ->refresh ();
189
189
}
@@ -200,7 +200,7 @@ public function testRefreshCustom()
200
200
->with ($ key , 20 );
201
201
$ store
202
202
->method ('exists ' )
203
- ->willReturnOnConsecutiveCalls (true , false );
203
+ ->willReturn (true , false );
204
204
205
205
$ lock ->refresh (20 );
206
206
}
@@ -214,7 +214,7 @@ public function testIsAquired()
214
214
$ store
215
215
->method ('exists ' )
216
216
->with ($ key )
217
- ->willReturnOnConsecutiveCalls (true , false );
217
+ ->willReturn (true , false );
218
218
219
219
$ this ->assertTrue ($ lock ->isAcquired ());
220
220
}
@@ -267,8 +267,8 @@ public function testReleaseOnDestruction()
267
267
268
268
$ store
269
269
->method ('exists ' )
270
- ->willReturnOnConsecutiveCalls (true , false )
271
- ;
270
+ ->willReturn (true , false );
271
+
272
272
$ store
273
273
->expects ($ this ->once ())
274
274
->method ('delete ' )
@@ -286,8 +286,8 @@ public function testNoAutoReleaseWhenNotConfigured()
286
286
287
287
$ store
288
288
->method ('exists ' )
289
- ->willReturnOnConsecutiveCalls (true , false )
290
- ;
289
+ ->willReturn (true , false );
290
+
291
291
$ store
292
292
->expects ($ this ->never ())
293
293
->method ('delete ' )
@@ -313,7 +313,8 @@ public function testReleaseThrowsExceptionWhenDeletionFail()
313
313
$ store
314
314
->expects ($ this ->never ())
315
315
->method ('exists ' )
316
- ->with ($ key );
316
+ ->with ($ key )
317
+ ->willReturn (true );
317
318
318
319
$ lock ->release ();
319
320
}
@@ -426,7 +427,7 @@ public function testAcquireReadNoBlockingWithSharedLockStoreInterface()
426
427
->method ('saveRead ' );
427
428
$ store
428
429
->method ('exists ' )
429
- ->willReturnOnConsecutiveCalls (true , false );
430
+ ->willReturn (true , false );
430
431
431
432
$ this ->assertTrue ($ lock ->acquireRead (false ));
432
433
}
@@ -534,7 +535,7 @@ public function testAcquireReadBlockingWithBlockingSharedLockStoreInterface()
534
535
->method ('waitAndSaveRead ' );
535
536
$ store
536
537
->method ('exists ' )
537
- ->willReturnOnConsecutiveCalls (true , false );
538
+ ->willReturn (true , false );
538
539
539
540
$ this ->assertTrue ($ lock ->acquireRead (true ));
540
541
}
@@ -556,7 +557,7 @@ public function testAcquireReadBlockingWithSharedLockStoreInterface()
556
557
});
557
558
$ store
558
559
->method ('exists ' )
559
- ->willReturnOnConsecutiveCalls (true , false );
560
+ ->willReturn (true , false );
560
561
561
562
$ this ->assertTrue ($ lock ->acquireRead (true ));
562
563
}
@@ -572,7 +573,7 @@ public function testAcquireReadBlockingWithBlockingLockStoreInterface()
572
573
->method ('waitAndSave ' );
573
574
$ store
574
575
->method ('exists ' )
575
- ->willReturnOnConsecutiveCalls (true , false );
576
+ ->willReturn (true , false );
576
577
577
578
$ this ->assertTrue ($ lock ->acquireRead (true ));
578
579
}
@@ -594,7 +595,7 @@ public function testAcquireReadBlockingWithPersistingStoreInterface()
594
595
});
595
596
$ store
596
597
->method ('exists ' )
597
- ->willReturnOnConsecutiveCalls (true , false );
598
+ ->willReturn (true , false );
598
599
599
600
$ this ->assertTrue ($ lock ->acquireRead (true ));
600
601
}
0 commit comments