mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Execute CakeSession::destroy() on a tearDown with implicit use session test
This commit is contained in:
parent
f07d193ded
commit
701519c637
5 changed files with 6 additions and 0 deletions
|
@ -415,6 +415,7 @@ class AuthComponentTest extends CakeTestCase {
|
||||||
TestAuthComponent::clearUser();
|
TestAuthComponent::clearUser();
|
||||||
$this->Auth->Session->delete('Auth');
|
$this->Auth->Session->delete('Auth');
|
||||||
$this->Auth->Session->delete('Message.auth');
|
$this->Auth->Session->delete('Message.auth');
|
||||||
|
$this->Auth->Session->destroy();
|
||||||
unset($this->Controller, $this->Auth);
|
unset($this->Controller, $this->Auth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,7 @@ class SecurityComponentTest extends CakeTestCase {
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
$this->Controller->Session->delete('_Token');
|
$this->Controller->Session->delete('_Token');
|
||||||
|
$this->Controller->Session->destroy();
|
||||||
unset($this->Controller->Security);
|
unset($this->Controller->Security);
|
||||||
unset($this->Controller->Component);
|
unset($this->Controller->Component);
|
||||||
unset($this->Controller);
|
unset($this->Controller);
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
App::uses('Router', 'Routing');
|
App::uses('Router', 'Routing');
|
||||||
|
App::uses('CakeSession', 'Model/Datasource');
|
||||||
App::uses('Controller', 'Controller');
|
App::uses('Controller', 'Controller');
|
||||||
App::uses('Scaffold', 'Controller');
|
App::uses('Scaffold', 'Controller');
|
||||||
App::uses('ScaffoldView', 'View');
|
App::uses('ScaffoldView', 'View');
|
||||||
|
@ -175,6 +176,7 @@ class ScaffoldTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
CakeSession::destroy();
|
||||||
unset($this->Controller);
|
unset($this->Controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ class I18nTest extends CakeTestCase {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
|
||||||
Cache::delete('object_map', '_cake_core_');
|
Cache::delete('object_map', '_cake_core_');
|
||||||
|
CakeSession::destroy();
|
||||||
App::build();
|
App::build();
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,7 @@ class SessionHelperTest extends CakeTestCase {
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
$_SESSION = array();
|
$_SESSION = array();
|
||||||
unset($this->View, $this->Session);
|
unset($this->View, $this->Session);
|
||||||
|
CakeSession::destroy();
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue