From 4a55ef47cfb96819d43c0da077091218bd9e4381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 28 Jan 2011 02:00:20 -0430 Subject: [PATCH] Fixing SessionComponent tests --- lib/Cake/Controller/AppController.php | 2 ++ lib/Cake/Controller/Component/SessionComponent.php | 1 + lib/Cake/Core/Object.php | 4 +--- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Controller/AppController.php b/lib/Cake/Controller/AppController.php index 07c117dff..383cca2be 100644 --- a/lib/Cake/Controller/AppController.php +++ b/lib/Cake/Controller/AppController.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Controller', 'Controller'); + /** * This is a placeholder class. * Create the same file in app/app_controller.php diff --git a/lib/Cake/Controller/Component/SessionComponent.php b/lib/Cake/Controller/Component/SessionComponent.php index 6ebb59884..71ba5c477 100644 --- a/lib/Cake/Controller/Component/SessionComponent.php +++ b/lib/Cake/Controller/Component/SessionComponent.php @@ -17,6 +17,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Component', 'Controller'); App::uses('CakeSession', 'Model/Datasource'); /** diff --git a/lib/Cake/Core/Object.php b/lib/Cake/Core/Object.php index cf1e369b6..28a3d0d29 100644 --- a/lib/Cake/Core/Object.php +++ b/lib/Cake/Core/Object.php @@ -66,9 +66,7 @@ class Object { if (empty($url)) { return false; } - if (!class_exists('dispatcher')) { - require LIBS . 'dispatcher.php'; - } + App::uses('Dispatcher', 'Routing'); if (in_array('return', $extra, true)) { $extra = array_merge($extra, array('return' => 0, 'autoRender' => 1)); }