Skip to content
Permalink
Browse files

Execute CakeSession::destroy() on a tearDown with implicit use sessio…

…n test
  • Loading branch information...
tenkoma committed Jan 15, 2018
1 parent f07d193 commit 701519c637b113406db1fde2f4ab2047c8104ee4
@@ -415,6 +415,7 @@ public function tearDown() {
TestAuthComponent::clearUser();
$this->Auth->Session->delete('Auth');
$this->Auth->Session->delete('Message.auth');
$this->Auth->Session->destroy();
unset($this->Controller, $this->Auth);
}
@@ -186,6 +186,7 @@ public function setUp() {
public function tearDown() {
parent::tearDown();
$this->Controller->Session->delete('_Token');
$this->Controller->Session->destroy();
unset($this->Controller->Security);
unset($this->Controller->Component);
unset($this->Controller);
@@ -17,6 +17,7 @@
*/
App::uses('Router', 'Routing');
App::uses('CakeSession', 'Model/Datasource');
App::uses('Controller', 'Controller');
App::uses('Scaffold', 'Controller');
App::uses('ScaffoldView', 'View');
@@ -175,6 +176,7 @@ public function setUp() {
*/
public function tearDown() {
parent::tearDown();
CakeSession::destroy();
unset($this->Controller);
}
@@ -51,6 +51,7 @@ public function tearDown() {
parent::tearDown();
Cache::delete('object_map', '_cake_core_');
CakeSession::destroy();
App::build();
CakePlugin::unload();
}
@@ -87,6 +87,7 @@ public function setUp() {
public function tearDown() {
$_SESSION = array();
unset($this->View, $this->Session);
CakeSession::destroy();
CakePlugin::unload();
parent::tearDown();
}

0 comments on commit 701519c

Please sign in to comment.
You can’t perform that action at this time.