public function vfsStreamWrapperFileTimesTestCase::createNewFileChangesAttributeAndModificationTimeOfContainingDirectory in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php \org\bovigo\vfs\vfsStreamWrapperFileTimesTestCase::createNewFileChangesAttributeAndModificationTimeOfContainingDirectory()
@test @group issue_7
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamWrapperFileTimesTestCase.php, line 191
Class
Namespace
org\bovigo\vfsCode
public function createNewFileChangesAttributeAndModificationTimeOfContainingDirectory() {
$dir = vfsStream::newDirectory('bar')
->at(vfsStreamWrapper::getRoot())
->lastModified(100)
->lastAccessed(100)
->lastAttributeModified(100);
file_put_contents($this->bazUrl, 'test');
$this
->assertLessThanOrEqual(time(), filemtime($this->barUrl));
$this
->assertLessThanOrEqual(time(), filectime($this->barUrl));
$this
->assertEquals(100, fileatime($this->barUrl));
$this
->assertFileTimesEqualStreamTimes($this->barUrl, $dir);
}