public testDisallowLockImplementorToReleaseLockAcquiredByOtherImplementor ( NinjaMutex\Lock\LockInterface $lockImplementor ) | ||
$lockImplementor | NinjaMutex\Lock\LockInterface |
public function testDisallowLockImplementorToReleaseLockAcquiredByOtherImplementor(LockInterface $lockImplementor)
{
$name = 'forfiter';
$lockImplementor->acquireLock($name, 0);
$duplicateLockImplementor = clone $lockImplementor;
$this->assertFalse($duplicateLockImplementor->releaseLock($name));
$lockImplementor->releaseLock($name);
}