Example #1
0
 public function _after(\Codeception\TestCase $test)
 {
     $_SESSION = array();
     $_GET = array();
     $_POST = array();
     $_COOKIE = array();
     parent::_after($test);
 }
Example #2
0
 public function _after(TestCase $test)
 {
     //Close the session, if any are open
     if (session_status() == PHP_SESSION_ACTIVE) {
         session_write_close();
     }
     parent::_after($test);
 }
 public function _after(TestInterface $test)
 {
     parent::_after($test);
     $_SESSION = [];
     $_GET = [];
     $_POST = [];
     $_FILES = [];
     $_COOKIE = [];
 }
Example #4
0
 public function _after(TestCase $test)
 {
     parent::_after($test);
     try {
         $this->container->getByType('Nette\\Http\\Session')->close();
     } catch (MissingServiceException $e) {
     }
     $_SESSION = [];
     $_GET = [];
     $_POST = [];
     $_FILES = [];
     $_COOKIE = [];
 }
Example #5
0
 public function _after(\Codeception\TestCase $test)
 {
     $_SESSION = array();
     $_FILES = array();
     $_GET = array();
     $_POST = array();
     $_COOKIE = array();
     $_REQUEST = array();
     if ($this->transaction and $this->config['cleanup']) {
         $this->transaction->rollback();
     }
     if (Yii::$app) {
         Yii::$app->session->destroy();
     }
     parent::_after($test);
 }
Example #6
0
 public function _after(TestCase $test)
 {
     $_SESSION = [];
     $_GET = [];
     $_POST = [];
     $_COOKIE = [];
     $_REQUEST = [];
     Yii::app()->session->close();
     parent::_after($test);
 }
Example #7
0
 /**
  * Update permanent services after each test
  */
 public function _after(\Codeception\TestInterface $test)
 {
     foreach ($this->permanentServices as $serviceName => $service) {
         $this->permanentServices[$serviceName] = $this->grabService($serviceName);
     }
     parent::_after($test);
 }
Example #8
0
 public function _after(TestCase $test)
 {
     $_SESSION = [];
     $_GET = [];
     $_POST = [];
     $_COOKIE = [];
     // reset singleton
     StaticEventManager::resetInstance();
     // Reset singleton placeholder if version < 2.2.0, no longer required in 2.2.0+
     if (Version::compareVersion('2.2.0') >= 0) {
         Registry::unsetRegistry();
     }
     //Close the session, if any are open
     if (session_status() == PHP_SESSION_ACTIVE) {
         session_write_close();
     }
     $this->queries = 0;
     $this->time = 0;
     parent::_after($test);
 }
Example #9
0
 public function _after(TestInterface $test)
 {
     $_SESSION = [];
     $_GET = [];
     $_POST = [];
     $_COOKIE = [];
     if (class_exists('Zend\\EventManager\\StaticEventManager')) {
         // reset singleton (ZF2)
         StaticEventManager::resetInstance();
     }
     //Close the session, if any are open
     if (session_status() == PHP_SESSION_ACTIVE) {
         session_write_close();
     }
     $this->queries = 0;
     $this->time = 0;
     parent::_after($test);
 }
Example #10
0
 public function _after(TestInterface $test)
 {
     $_SESSION = [];
     $_GET = [];
     $_POST = [];
     $_COOKIE = [];
     if ($this->bootstrap) {
         $fc = $this->bootstrap->getBootstrap()->getResource('frontcontroller');
         if ($fc) {
             $fc->resetInstance();
         }
     }
     \Zend_Layout::resetMvcInstance();
     \Zend_Controller_Action_HelperBroker::resetHelpers();
     \Zend_Session::$_unitTestEnabled = true;
     \Zend_Registry::_unsetInstance();
     $this->queries = 0;
     $this->time = 0;
     parent::_after($test);
 }
Example #11
0
 public function _after(\Codeception\TestCase $test)
 {
     $_SESSION = [];
     $_FILES = [];
     $_GET = [];
     $_POST = [];
     $_COOKIE = [];
     $_REQUEST = [];
     if ($this->transaction && $this->config['cleanup']) {
         $this->transaction->rollback();
     }
     \yii\web\UploadedFile::reset();
     if (Yii::$app) {
         Yii::$app->session->destroy();
     }
     parent::_after($test);
 }
Example #12
0
 public function _after(\Codeception\TestCase $test)
 {
     $_SESSION = array();
     $_GET = array();
     $_POST = array();
     $_COOKIE = array();
     $_REQUEST = array();
     Yii::app()->session->close();
     parent::_after($test);
 }
Example #13
0
 public function _after(\Codeception\TestCase $test) {
     $this->kernel->shutdown();
     parent::_after($test);
 }
Example #14
0
 public function _after(TestInterface $test)
 {
     parent::_after($test);
 }
Example #15
0
 public function _after(\Codeception\TestInterface $test)
 {
     $_SESSION = [];
     $_FILES = [];
     $_GET = [];
     $_POST = [];
     $_COOKIE = [];
     $_REQUEST = [];
     foreach ($this->loadedFixtures as $fixture) {
         $fixture->unloadFixtures();
     }
     if ($this->transaction && $this->config['cleanup']) {
         $this->transaction->rollback();
     }
     $this->client->resetPersistentVars();
     if (\Yii::$app->has('session', true)) {
         \Yii::$app->session->close();
     }
     parent::_after($test);
 }