Fix lockprivider test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
8d4346d656
commit
ec14d95292
|
@ -175,7 +175,10 @@ abstract class LockingProvider extends TestCase {
|
||||||
|
|
||||||
public function testLockedExceptionHasPathForShared() {
|
public function testLockedExceptionHasPathForShared() {
|
||||||
try {
|
try {
|
||||||
$this->testSharedLockAfterExclusive();
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE);
|
||||||
|
$this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_EXCLUSIVE));
|
||||||
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED);
|
||||||
|
|
||||||
$this->fail('Expected locked exception');
|
$this->fail('Expected locked exception');
|
||||||
} catch (LockedException $e) {
|
} catch (LockedException $e) {
|
||||||
$this->assertEquals('foo', $e->getPath());
|
$this->assertEquals('foo', $e->getPath());
|
||||||
|
@ -184,7 +187,10 @@ abstract class LockingProvider extends TestCase {
|
||||||
|
|
||||||
public function testLockedExceptionHasPathForExclusive() {
|
public function testLockedExceptionHasPathForExclusive() {
|
||||||
try {
|
try {
|
||||||
$this->testExclusiveLockAfterShared();
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE);
|
||||||
|
$this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_EXCLUSIVE));
|
||||||
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED);
|
||||||
|
|
||||||
$this->fail('Expected locked exception');
|
$this->fail('Expected locked exception');
|
||||||
} catch (LockedException $e) {
|
} catch (LockedException $e) {
|
||||||
$this->assertEquals('foo', $e->getPath());
|
$this->assertEquals('foo', $e->getPath());
|
||||||
|
|
Loading…
Reference in New Issue