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

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

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