public function cleanup(TestEvent $e)
 {
     if (!$this->webDriverModule or !$this->dir) {
         return;
     }
     if (!$this->config['delete_successful']) {
         $this->persist($e);
         return;
     }
     // deleting successfully executed tests
     FileSystem::deleteDir($this->dir);
 }
Beispiel #2
0
 /**
  * Deletes directory with all subdirectories
  *
  * ``` php
  * <?php
  * $I->deleteDir('vendor');
  * ?>
  * ```
  *
  * @param $dirname
  */
 public function deleteDir($dirname)
 {
     $dir = $this->absolutizePath($dirname);
     Util::deleteDir($dir);
 }
Beispiel #3
0
 protected function tearDown()
 {
     unset($_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE_DEBUG']);
     unset($_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE']);
     \Codeception\Util\FileSystem::deleteDir($this->c3_dir);
 }