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

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

public canAquireSharedLock ( )
    public function canAquireSharedLock()
    {
        $file = vfsStream::newFile('foo.txt')->at($this->root);
        $fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
        $this->assertTrue(flock($fp, LOCK_SH));
        $this->assertTrue($file->isLocked());
        $this->assertTrue($file->hasSharedLock());
        $this->assertFalse($file->hasExclusiveLock());
        fclose($fp);
    }