public function testDelete() { $fileToDelete = vfsStream::newFile('deletable.txt', 0444); $this->root->addChild($fileToDelete); $file = new File($fileToDelete->url()); $file->delete(); $this->assertFalse(file_exists($fileToDelete->url())); $this->assertFalse($file->exists()); }