Skip to content

Commit 3025152

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: fix compatibility with Twig 3.10 [Strings][EnglishInflector] Fix incorrect pluralisation of 'Album' handle union and intersection types for cascaded validations move wiring of the property info extractor to the ObjectNormalizer move Process component dep to require-dev Remove calls to `onConsecutiveCalls()` fix: remove unwanted type cast accept AbstractAsset instances when filtering schemas better distinguish URL schemes and windows drive letters convert empty CSV header names into numeric keys
2 parents c6b3959 + 40c4c8a commit 3025152

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

Tests/LockTest.php

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testAcquireNoBlocking()
4141
->method('save');
4242
$store
4343
->method('exists')
44-
->willReturnOnConsecutiveCalls(true, false);
44+
->willReturn(true, false);
4545

4646
$this->assertTrue($lock->acquire(false));
4747
}
@@ -57,7 +57,7 @@ public function testAcquireNoBlockingWithPersistingStoreInterface()
5757
->method('save');
5858
$store
5959
->method('exists')
60-
->willReturnOnConsecutiveCalls(true, false);
60+
->willReturn(true, false);
6161

6262
$this->assertTrue($lock->acquire(false));
6363
}
@@ -73,7 +73,7 @@ public function testAcquireBlockingWithPersistingStoreInterface()
7373
->method('save');
7474
$store
7575
->method('exists')
76-
->willReturnOnConsecutiveCalls(true, false);
76+
->willReturn(true, false);
7777

7878
$this->assertTrue($lock->acquire(true));
7979
}
@@ -95,7 +95,7 @@ public function testAcquireBlockingRetryWithPersistingStoreInterface()
9595
});
9696
$store
9797
->method('exists')
98-
->willReturnOnConsecutiveCalls(true, false);
98+
->willReturn(true, false);
9999

100100
$this->assertTrue($lock->acquire(true));
101101
}
@@ -112,7 +112,7 @@ public function testAcquireReturnsFalse()
112112
->willThrowException(new LockConflictedException());
113113
$store
114114
->method('exists')
115-
->willReturnOnConsecutiveCalls(true, false);
115+
->willReturn(true, false);
116116

117117
$this->assertFalse($lock->acquire(false));
118118
}
@@ -129,7 +129,7 @@ public function testAcquireReturnsFalseStoreInterface()
129129
->willThrowException(new LockConflictedException());
130130
$store
131131
->method('exists')
132-
->willReturnOnConsecutiveCalls(true, false);
132+
->willReturn(true, false);
133133

134134
$this->assertFalse($lock->acquire(false));
135135
}
@@ -148,7 +148,7 @@ public function testAcquireBlockingWithBlockingStoreInterface()
148148
->method('waitAndSave');
149149
$store
150150
->method('exists')
151-
->willReturnOnConsecutiveCalls(true, false);
151+
->willReturn(true, false);
152152

153153
$this->assertTrue($lock->acquire(true));
154154
}
@@ -168,7 +168,7 @@ public function testAcquireSetsTtl()
168168
->with($key, 10);
169169
$store
170170
->method('exists')
171-
->willReturnOnConsecutiveCalls(true, false);
171+
->willReturn(true, false);
172172

173173
$lock->acquire();
174174
}
@@ -185,7 +185,7 @@ public function testRefresh()
185185
->with($key, 10);
186186
$store
187187
->method('exists')
188-
->willReturnOnConsecutiveCalls(true, false);
188+
->willReturn(true, false);
189189

190190
$lock->refresh();
191191
}
@@ -202,7 +202,7 @@ public function testRefreshCustom()
202202
->with($key, 20);
203203
$store
204204
->method('exists')
205-
->willReturnOnConsecutiveCalls(true, false);
205+
->willReturn(true, false);
206206

207207
$lock->refresh(20);
208208
}
@@ -216,7 +216,7 @@ public function testIsAquired()
216216
$store
217217
->method('exists')
218218
->with($key)
219-
->willReturnOnConsecutiveCalls(true, false);
219+
->willReturn(true, false);
220220

221221
$this->assertTrue($lock->isAcquired());
222222
}
@@ -269,8 +269,8 @@ public function testReleaseOnDestruction()
269269

270270
$store
271271
->method('exists')
272-
->willReturnOnConsecutiveCalls(true, false)
273-
;
272+
->willReturn(true, false);
273+
274274
$store
275275
->expects($this->once())
276276
->method('delete')
@@ -288,8 +288,8 @@ public function testNoAutoReleaseWhenNotConfigured()
288288

289289
$store
290290
->method('exists')
291-
->willReturnOnConsecutiveCalls(true, false)
292-
;
291+
->willReturn(true, false);
292+
293293
$store
294294
->expects($this->never())
295295
->method('delete')
@@ -315,7 +315,8 @@ public function testReleaseThrowsExceptionWhenDeletionFail()
315315
$store
316316
->expects($this->never())
317317
->method('exists')
318-
->with($key);
318+
->with($key)
319+
->willReturn(true);
319320

320321
$lock->release();
321322
}
@@ -456,7 +457,7 @@ public function testAcquireReadNoBlockingWithSharedLockStoreInterface()
456457
->method('saveRead');
457458
$store
458459
->method('exists')
459-
->willReturnOnConsecutiveCalls(true, false);
460+
->willReturn(true, false);
460461

461462
$this->assertTrue($lock->acquireRead(false));
462463
}
@@ -560,7 +561,7 @@ public function testAcquireReadBlockingWithBlockingSharedLockStoreInterface()
560561
->method('waitAndSaveRead');
561562
$store
562563
->method('exists')
563-
->willReturnOnConsecutiveCalls(true, false);
564+
->willReturn(true, false);
564565

565566
$this->assertTrue($lock->acquireRead(true));
566567
}
@@ -582,7 +583,7 @@ public function testAcquireReadBlockingWithSharedLockStoreInterface()
582583
});
583584
$store
584585
->method('exists')
585-
->willReturnOnConsecutiveCalls(true, false);
586+
->willReturn(true, false);
586587

587588
$this->assertTrue($lock->acquireRead(true));
588589
}
@@ -598,7 +599,7 @@ public function testAcquireReadBlockingWithBlockingLockStoreInterface()
598599
->method('waitAndSave');
599600
$store
600601
->method('exists')
601-
->willReturnOnConsecutiveCalls(true, false);
602+
->willReturn(true, false);
602603

603604
$this->assertTrue($lock->acquireRead(true));
604605
}
@@ -620,7 +621,7 @@ public function testAcquireReadBlockingWithPersistingStoreInterface()
620621
});
621622
$store
622623
->method('exists')
623-
->willReturnOnConsecutiveCalls(true, false);
624+
->willReturn(true, false);
624625

625626
$this->assertTrue($lock->acquireRead(true));
626627
}

0 commit comments

Comments
 (0)