NinjaMutex\Tests\Lock\LockTest::testDisallowToAcquireLockOwnedByOtherLockImplementor PHP Метод

testDisallowToAcquireLockOwnedByOtherLockImplementor() публичный Метод

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