public function tearDown()
 {
     SugarTestImportUtilities::removeAllCreatedFiles();
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     foreach ($this->unlink as $file) {
         @unlink($file);
     }
     unset($GLOBALS['current_user']);
 }
Esempio n. 2
0
 public function tearDown()
 {
     SugarTestImportUtilities::removeAllCreatedFiles();
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
 }
 public function testCanRemoveAllCreatedFiles()
 {
     $filesCreated = array();
     for ($i = 0; $i < 5; $i++) {
         $filesCreated[] = SugarTestImportUtilities::createFile();
     }
     $filesCreated[] = $filesCreated[4] . '-0';
     SugarTestImportUtilities::removeAllCreatedFiles();
     foreach ($filesCreated as $filename) {
         $this->assertFalse(is_file($filename));
     }
 }