|
@@ 110-121 (lines=12) @@
|
| 107 |
|
$this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_EXCLUSIVE)); |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
public function testReleaseAll() { |
| 111 |
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); |
| 112 |
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); |
| 113 |
|
$this->instance->acquireLock('bar', ILockingProvider::LOCK_SHARED); |
| 114 |
|
$this->instance->acquireLock('asd', ILockingProvider::LOCK_EXCLUSIVE); |
| 115 |
|
|
| 116 |
|
$this->instance->releaseAll(); |
| 117 |
|
|
| 118 |
|
$this->assertFalse($this->instance->isLocked('foo', ILockingProvider::LOCK_SHARED)); |
| 119 |
|
$this->assertFalse($this->instance->isLocked('bar', ILockingProvider::LOCK_SHARED)); |
| 120 |
|
$this->assertFalse($this->instance->isLocked('asd', ILockingProvider::LOCK_EXCLUSIVE)); |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
public function testReleaseAllAfterChange() { |
| 124 |
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); |
|
@@ 139-151 (lines=13) @@
|
| 136 |
|
$this->assertFalse($this->instance->isLocked('asd', ILockingProvider::LOCK_EXCLUSIVE)); |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
public function testReleaseAllAfterUnlock() { |
| 140 |
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); |
| 141 |
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); |
| 142 |
|
$this->instance->acquireLock('bar', ILockingProvider::LOCK_SHARED); |
| 143 |
|
$this->instance->acquireLock('asd', ILockingProvider::LOCK_EXCLUSIVE); |
| 144 |
|
|
| 145 |
|
$this->instance->releaseLock('bar', ILockingProvider::LOCK_SHARED); |
| 146 |
|
|
| 147 |
|
$this->instance->releaseAll(); |
| 148 |
|
|
| 149 |
|
$this->assertFalse($this->instance->isLocked('foo', ILockingProvider::LOCK_SHARED)); |
| 150 |
|
$this->assertFalse($this->instance->isLocked('asd', ILockingProvider::LOCK_EXCLUSIVE)); |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
public function testReleaseAfterReleaseAll() { |
| 154 |
|
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); |