/** * @test */ public function testWriteFileAppend() { $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->writeFileAppend($path1, 'appendText'); $this->assertEquals(__FUNCTION__ . 'appendText', $file->readFile($path1)); }