diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index 09e99c92e4c..2b25e58278f 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -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); } diff --git a/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php b/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php index 16951425f2d..4edaf935a03 100644 --- a/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php @@ -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); diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php index 14fa64b1531..ec6b4eb462f 100644 --- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php +++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php @@ -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); } diff --git a/lib/Cake/Test/Case/I18n/I18nTest.php b/lib/Cake/Test/Case/I18n/I18nTest.php index fd8cc36d2fc..3c3df309d6b 100644 --- a/lib/Cake/Test/Case/I18n/I18nTest.php +++ b/lib/Cake/Test/Case/I18n/I18nTest.php @@ -51,6 +51,7 @@ public function tearDown() { parent::tearDown(); Cache::delete('object_map', '_cake_core_'); + CakeSession::destroy(); App::build(); CakePlugin::unload(); } diff --git a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php index f373218a7e6..5ff9737c63a 100644 --- a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php @@ -87,6 +87,7 @@ public function setUp() { public function tearDown() { $_SESSION = array(); unset($this->View, $this->Session); + CakeSession::destroy(); CakePlugin::unload(); parent::tearDown(); }