org\bovigo\vfs\vfsStreamWrapperFileTimesTestCase::writeFileChangesModificationTime PHP Метод

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

    public function writeFileChangesModificationTime()
    {
        $file = vfsStream::newFile('foo.txt')->at(vfsStreamWrapper::getRoot())->lastModified(100)->lastAccessed(100)->lastAttributeModified(100);
        $fp = fopen($this->fooUrl, 'wb');
        $openTime = time();
        sleep(2);
        fwrite($fp, 'test');
        fclose($fp);
        $this->assertLessThanOrEqual($openTime + 3, filemtime($this->fooUrl));
        $this->assertLessThanOrEqual($openTime, fileatime($this->fooUrl));
        $this->assertEquals(100, filectime($this->fooUrl));
        $this->assertFileTimesEqualStreamTimes($this->fooUrl, $file);
    }