org\bovigo\vfs\vfsStreamWrapperFlockTestCase::canRemoveLockWhenNotLocked PHP Метод

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

См. также: https://github.com/mikey179/vfsStream/issues/40
    public function canRemoveLockWhenNotLocked()
    {
        $file = vfsStream::newFile('foo.txt')->at($this->root);
        $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
        $this->assertTrue(flock($fp, LOCK_UN));
        $this->assertFalse($file->isLocked());
        $this->assertFalse($file->hasSharedLock());
        $this->assertFalse($file->hasSharedLock($fp));
        $this->assertFalse($file->hasExclusiveLock());
        $this->assertFalse($file->hasExclusiveLock($fp));
        fclose($fp);
    }