Ejemplo n.º 1
0
 function tearDown()
 {
     try {
         parent::tearDown();
     } finally {
         $this->deleteRecursive($this->tempPath);
     }
 }
Ejemplo n.º 2
0
 function tearDown()
 {
     try {
         parent::tearDown();
     } finally {
         $dir = new \RecursiveDirectoryIterator($this->basePath);
         foreach (new \RecursiveIteratorIterator($dir, \RecursiveIteratorIterator::CHILD_FIRST) as $i) {
             if ($i->getFilename() == '.' || $i->getFilename() == '..') {
                 continue;
             }
             if ($i->isDir()) {
                 rmdir($i->getPathname());
             } else {
                 unlink($i->getPathname());
             }
         }
         rmdir($this->basePath);
     }
 }