Esempio n. 1
0
 function tearDown()
 {
     try {
         parent::tearDown();
     } finally {
         $this->deleteRecursive($this->tempPath);
     }
 }
Esempio 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);
     }
 }