/**
  * test default values and methods
  *
  * @test
  */
 public function defaultValues()
 {
     $this->assertEquals(vfsStreamContent::TYPE_FILE, $this->file->getType());
     $this->assertEquals('foo', $this->file->getName());
     $this->assertTrue($this->file->appliesTo('foo'));
     $this->assertFalse($this->file->appliesTo('foo/bar'));
     $this->assertFalse($this->file->appliesTo('bar'));
 }
Exemple #2
0
 /**
  * returns status of stream
  *
  * @return  array
  */
 public function stream_stat()
 {
     $fileStat = array('dev' => 0, 'ino' => 0, 'mode' => $this->content->getType() | $this->content->getPermissions(), 'nlink' => 0, 'uid' => $this->content->getUser(), 'gid' => $this->content->getGroup(), 'rdev' => 0, 'size' => $this->content->size(), 'atime' => $this->content->filemtime(), 'mtime' => $this->content->filemtime(), 'ctime' => $this->content->filemtime(), 'blksize' => -1, 'blocks' => -1);
     return array_merge(array_values($fileStat), $fileStat);
 }