Example #1
0
 public function testPrependLine()
 {
     $prepend = vfsStream::newFile('prepend.txt', 0777);
     $this->root->addChild($prepend);
     $prepend->setContent('PHPUNIT');
     $file = new File($prepend->url());
     $file->prependLine('PREPENDED');
     $this->assertEquals('PREPENDED' . PHP_EOL . 'PHPUNIT', file_get_contents($prepend->url()));
 }