Esempio n. 1
0
 public function testPurge()
 {
     $dir = new \r8\FileSys\Dir();
     try {
         $dir->purge();
         $this->fail("An expected exception was not thrown");
     } catch (\r8\Exception\FileSystem\Missing $err) {
         $this->assertSame("Path does not exist", $err->getMessage());
     }
     $dir->setDir($this->dir);
     $this->assertSame($dir, $dir->purge());
     $this->assertTrue(is_dir($this->dir));
     $content = glob($this->dir . "/*");
     $this->assertSame(array(), $content);
 }