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

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

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