/** * @test */ public function testCreateFileAndClose() { $file = new Filesystem(); $dir = static::getTempPath(__FUNCTION__); mkdir($dir); $file1 = rand(1, 10) . rand(0, getrandmax()); $filepath = $dir . DIRECTORY_SEPARATOR . $file1; $this->assertFileExists($filepath, $file->createFileAndClose($filepath)); }