/**
  * test renaming the directory
  *
  * @test
  */
 public function rename()
 {
     $this->file->rename('bar');
     $this->assertEquals('bar', $this->file->getName());
     $this->assertFalse($this->file->appliesTo('foo'));
     $this->assertFalse($this->file->appliesTo('foo/bar'));
     $this->assertTrue($this->file->appliesTo('bar'));
 }
 /**
  * visit a file and process it
  *
  * @param   vfsStreamFile              $file
  * @return  vfsStreamStructureVisitor
  */
 public function visitFile(vfsStreamFile $file)
 {
     $this->current[$file->getName()] = $file->getContent();
     return $this;
 }