public function testDefault()
 {
     $dir = new TemporaryDir();
     $this->assertTrue(is_string($dir->path()));
     file_put_contents($dir->path() . "/file", "aaaaaaa");
     //echo $dir->path()."\n";
     $this->assertTrue(file_exists($dir));
     $this->assertTrue(is_dir($dir));
     $dir->close();
     $this->assertFalse(file_exists($dir));
 }
 public function testForReadme()
 {
     $tmpfile = new TemporaryFile();
     echo $tmpfile->path();
     // ex) /private/var/folders/bt/xwh9qmcj00dctz53_rxclgtr0000gn/T/phpqWK5fj
     $tmpfile->write("temporary data...");
     echo $data = $tmpfile->read();
     // temporary data...
     $tmpdir = new TemporaryDir();
     echo $tmpdir->path();
     // ex) /private/var/folders/bt/xwh9qmcj00dctz53_rxclgtr0000gn/T/KFHg4L
 }