public function testAppendLine() { $append = vfsStream::newFile('append.txt', 0777); $this->root->addChild($append); $append->setContent('PHPUNIT'); $file = new File($append->url()); $file->appendLine('APPENDED'); $this->assertEquals('PHPUNIT' . PHP_EOL . 'APPENDED', file_get_contents($append->url())); }