Skip to content

Commit

Permalink
Merge branch '7.0' into 7.1
Browse files Browse the repository at this point in the history
* 7.0:
  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
  restore deprecated properties
  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
  handle edge cases when constructing constraints with named arguments
  convert empty CSV header names into numeric keys
  • Loading branch information
derrabus committed May 2, 2024
2 parents b38d394 + 44d1451 commit 464cf94
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions Tests/LockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testAcquireNoBlocking()
->method('save');
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquire(false));
}
Expand All @@ -57,7 +57,7 @@ public function testAcquireNoBlockingWithPersistingStoreInterface()
->method('save');
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquire(false));
}
Expand All @@ -73,7 +73,7 @@ public function testAcquireBlockingWithPersistingStoreInterface()
->method('save');
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquire(true));
}
Expand All @@ -95,7 +95,7 @@ public function testAcquireBlockingRetryWithPersistingStoreInterface()
});
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquire(true));
}
Expand All @@ -112,7 +112,7 @@ public function testAcquireReturnsFalse()
->willThrowException(new LockConflictedException());
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertFalse($lock->acquire(false));
}
Expand All @@ -129,7 +129,7 @@ public function testAcquireReturnsFalseStoreInterface()
->willThrowException(new LockConflictedException());
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertFalse($lock->acquire(false));
}
Expand All @@ -148,7 +148,7 @@ public function testAcquireBlockingWithBlockingStoreInterface()
->method('waitAndSave');
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquire(true));
}
Expand All @@ -168,7 +168,7 @@ public function testAcquireSetsTtl()
->with($key, 10);
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$lock->acquire();
}
Expand All @@ -185,7 +185,7 @@ public function testRefresh()
->with($key, 10);
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$lock->refresh();
}
Expand All @@ -202,7 +202,7 @@ public function testRefreshCustom()
->with($key, 20);
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$lock->refresh(20);
}
Expand All @@ -216,7 +216,7 @@ public function testIsAquired()
$store
->method('exists')
->with($key)
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->isAcquired());
}
Expand Down Expand Up @@ -269,8 +269,8 @@ public function testReleaseOnDestruction()

$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false)
;
->willReturn(true, false);

$store
->expects($this->once())
->method('delete')
Expand All @@ -288,8 +288,8 @@ public function testNoAutoReleaseWhenNotConfigured()

$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false)
;
->willReturn(true, false);

$store
->expects($this->never())
->method('delete')
Expand All @@ -315,7 +315,8 @@ public function testReleaseThrowsExceptionWhenDeletionFail()
$store
->expects($this->never())
->method('exists')
->with($key);
->with($key)
->willReturn(true);

$lock->release();
}
Expand Down Expand Up @@ -456,7 +457,7 @@ public function testAcquireReadNoBlockingWithSharedLockStoreInterface()
->method('saveRead');
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquireRead(false));
}
Expand Down Expand Up @@ -560,7 +561,7 @@ public function testAcquireReadBlockingWithBlockingSharedLockStoreInterface()
->method('waitAndSaveRead');
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquireRead(true));
}
Expand All @@ -582,7 +583,7 @@ public function testAcquireReadBlockingWithSharedLockStoreInterface()
});
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquireRead(true));
}
Expand All @@ -598,7 +599,7 @@ public function testAcquireReadBlockingWithBlockingLockStoreInterface()
->method('waitAndSave');
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquireRead(true));
}
Expand All @@ -620,7 +621,7 @@ public function testAcquireReadBlockingWithPersistingStoreInterface()
});
$store
->method('exists')
->willReturnOnConsecutiveCalls(true, false);
->willReturn(true, false);

$this->assertTrue($lock->acquireRead(true));
}
Expand Down

0 comments on commit 464cf94

Please sign in to comment.