You are here

public function vfsStreamWrapperFileTimesTestCase::createNewFileSetsAllTimesToCurrentTime in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php \org\bovigo\vfs\vfsStreamWrapperFileTimesTestCase::createNewFileSetsAllTimesToCurrentTime()

@test @group issue_7

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTimesTestCase.php, line 178

Class

vfsStreamWrapperFileTimesTestCase
Test for org\bovigo\vfs\vfsStreamWrapper.

Namespace

org\bovigo\vfs

Code

public function createNewFileSetsAllTimesToCurrentTime() {
  file_put_contents($this->fooUrl, 'test');
  $this
    ->assertLessThanOrEqual(time(), filemtime($this->fooUrl));
  $this
    ->assertEquals(fileatime($this->fooUrl), filectime($this->fooUrl));
  $this
    ->assertEquals(fileatime($this->fooUrl), filemtime($this->fooUrl));
  $this
    ->assertFileTimesEqualStreamTimes($this->fooUrl, vfsStreamWrapper::getRoot()
    ->getChild('foo.txt'));
}