public function testWriteContentToFile() { $content = 'abc'; $file = TemporaryFile::writeContentToFile($content); $this->assertFileExists($file); $this->assertEquals($content, file_get_contents($file)); File::delete($file); }
public function testDelete() { // Copy dir to dest parent. $this->assureDestDirNotExist(); File::copy($this->sourceDirPath(), $this->destDirParentPath()); $file = $this->destDirPath() . '/file1.txt'; $this->assertFileExists($file); File::delete($file); $this->assertFileNotExists($file); $file = $this->destDirPath(); File::delete($file); $this->assertFileNotExists($file); }