/** * @test */ public function testPrependFile() { $file = new Filesystem(); $dir = static::getTempPath(__FUNCTION__); mkdir($dir); $file1 = rand(1, 10) . rand(0, getrandmax()); $path1 = $dir . DIRECTORY_SEPARATOR . $file1; file_put_contents($path1, __FUNCTION__); $file->writeFilePrepend($path1, 'prependText'); $this->assertEquals('prependText' . __FUNCTION__, $file->readFile($path1)); }