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

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

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