public function testClear() { $notEmpty = vfsStream::newFile('empty.txt', 0777); $this->root->addChild($notEmpty); $notEmpty->setContent('PHPUNIT'); $file = new File($notEmpty->url()); $this->assertEquals('PHPUNIT', file_get_contents($notEmpty->url())); $file->clear(); $this->assertEquals('', file_get_contents($notEmpty->url())); }