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