From da7c53b37455677ed32f0ae8e0f5228c8561d1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 3 Dec 2010 16:54:50 -0430 Subject: [PATCH 001/214] Beging of an experiment: a class utoloader for cakephp through emulating the keyword "use" of php 5.3 --- cake/libs/app.php | 19 +++++++++++++++++++ cake/libs/dispatcher.php | 13 ++++++------- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/cake/libs/app.php b/cake/libs/app.php index f18bb0719..66df9c93b 100644 --- a/cake/libs/app.php +++ b/cake/libs/app.php @@ -201,6 +201,12 @@ class App { */ private static $__objects = array(); +/** + * Holds the location of each class + * + */ + private static $__classMap = array(); + /** * Used to read information stored path * @@ -430,6 +436,17 @@ class App { self::$__objects[$type] = $values; } + public static function uses($className, $location) { + self::$__classMap[$className] = $location; + } + + public static function load($className) { + if (isset(self::$__classMap[$className])) { + return App::import(self::$__classMap[$className], $className, false); + } + return false; + } + /** * Finds classes based on $name or specific file(s) to search. Calling App::import() will * not construct any classes contained in the files. It will only find and require() the file. @@ -887,3 +904,5 @@ class App { } } } + +spl_autoload_register(array('App', 'load')); \ No newline at end of file diff --git a/cake/libs/dispatcher.php b/cake/libs/dispatcher.php index cb14d18ba..1a3738e89 100644 --- a/cake/libs/dispatcher.php +++ b/cake/libs/dispatcher.php @@ -24,10 +24,12 @@ /** * List of helpers to include */ -App::import('Core', 'Router', false); -App::import('Core', 'CakeRequest', false); -App::import('Core', 'CakeResponse', false); -App::import('Controller', 'Controller', false); +App::uses('Router', 'Core'); +App::uses('CakeRequest', 'Core'); +App::uses('CakeResponse', 'Core'); +App::uses('Controller', 'Controller'); +App::uses('View', 'View'); +App::uses('Debugger', 'Core'); /** * Dispatcher converts Requests into controller actions. It uses the dispatched Request @@ -270,9 +272,6 @@ class Dispatcher { } if (file_exists($filename)) { - if (!class_exists('View')) { - App::import('View', 'View', false); - } $controller = null; $view = new View($controller); return $view->renderCache($filename, microtime(true)); From fd639cc956bcede06cce8354370e13c64a26021d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 3 Dec 2010 17:09:50 -0430 Subject: [PATCH 002/214] Replacing use of App::import in favor of App::uses in controller class declaration --- cake/libs/controller/controller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index d4341655b..a5c1ba8a1 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -21,10 +21,10 @@ /** * Include files */ -App::import('Core', 'CakeResponse', false); -App::import('Core', 'ClassRegistry', false); -App::import('Controller', 'Component', false); -App::import('View', 'View', false); +App::uses('CakeResponse', 'Core'); +App::uses('ClassRegistry', 'Core'); +App::uses('ComponentCollection', 'Controller'); +App::uses('View', 'View'); /** * Controller From 1d129840f613bdb80f847353c0756184ac38fa2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 3 Dec 2010 18:08:52 -0430 Subject: [PATCH 003/214] Changing more App::import calls for App::uses --- cake/libs/cake_request.php | 2 +- cake/libs/cake_session.php | 1 - cake/libs/controller/component.php | 2 +- cake/libs/controller/component_collection.php | 2 +- cake/libs/controller/components/auth.php | 6 +++--- cake/libs/controller/components/cookie.php | 2 +- cake/libs/controller/components/email.php | 2 +- cake/libs/controller/components/request_handler.php | 5 ++--- cake/libs/controller/components/security.php | 4 ++-- cake/libs/controller/components/session.php | 5 ++--- cake/libs/controller/scaffold.php | 2 +- cake/libs/debugger.php | 8 ++------ cake/libs/dispatcher.php | 2 +- cake/libs/http_socket.php | 4 ++-- cake/libs/i18n.php | 4 ++-- cake/libs/l10n.php | 2 +- cake/libs/model/behavior_collection.php | 2 +- cake/libs/model/cake_schema.php | 4 ++-- cake/libs/model/connection_manager.php | 4 ++-- cake/libs/router.php | 4 ++-- 20 files changed, 30 insertions(+), 37 deletions(-) diff --git a/cake/libs/cake_request.php b/cake/libs/cake_request.php index 7a464f742..088e0b968 100644 --- a/cake/libs/cake_request.php +++ b/cake/libs/cake_request.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Set'); +App::uses('Set', 'Core'); /** * A class that helps wrap Request information and particulars about a single request. diff --git a/cake/libs/cake_session.php b/cake/libs/cake_session.php index aa4b0a95c..5c078c7dd 100644 --- a/cake/libs/cake_session.php +++ b/cake/libs/cake_session.php @@ -141,7 +141,6 @@ class CakeSession { * @param boolean $start Should session be started right now */ public static function init($base = null, $start = true) { - App::import('Core', 'Security'); self::$time = time(); $checkAgent = Configure::read('Session.checkAgent'); diff --git a/cake/libs/controller/component.php b/cake/libs/controller/component.php index c0d4b57a6..8ce908cda 100644 --- a/cake/libs/controller/component.php +++ b/cake/libs/controller/component.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Controller', 'ComponentCollection', false); +App::uses('ComponentCollection', 'Controller'); /** * Base class for an individual Component. Components provide resuable bits of diff --git a/cake/libs/controller/component_collection.php b/cake/libs/controller/component_collection.php index 90ec17f17..9aa589566 100644 --- a/cake/libs/controller/component_collection.php +++ b/cake/libs/controller/component_collection.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'ObjectCollection'); +App::uses('ObjectCollection', 'Core'); class ComponentCollection extends ObjectCollection { diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index a41d88e54..b09faa2f4 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -20,8 +20,9 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Router', false); -App::import('Core', 'Security', false); +App::uses('Router', 'Core'); +App::uses('Security', 'Core'); +App::uses('Debugger', 'Core'); /** * Authentication control component class @@ -287,7 +288,6 @@ class AuthComponent extends Component { } } if (Configure::read('debug') > 0) { - App::import('Debugger'); Debugger::checkSecurityKeys(); } } diff --git a/cake/libs/controller/components/cookie.php b/cake/libs/controller/components/cookie.php index bff3b7137..2efec17c3 100644 --- a/cake/libs/controller/components/cookie.php +++ b/cake/libs/controller/components/cookie.php @@ -21,7 +21,7 @@ /** * Load Security class */ -App::import('Core', 'Security'); +App::uses('Security', 'Core'); /** * Cookie Component. diff --git a/cake/libs/controller/components/email.php b/cake/libs/controller/components/email.php index a4cb6dd02..965084589 100755 --- a/cake/libs/controller/components/email.php +++ b/cake/libs/controller/components/email.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.3467 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Multibyte'); +App::uses('Multibyte', 'Core'); /** * EmailComponent diff --git a/cake/libs/controller/components/request_handler.php b/cake/libs/controller/components/request_handler.php index b68e5e33e..4928c945a 100644 --- a/cake/libs/controller/components/request_handler.php +++ b/cake/libs/controller/components/request_handler.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Xml', 'Core'); + /** * Request object for handling HTTP requests * @@ -172,9 +174,6 @@ class RequestHandlerComponent extends Component { } if ($this->requestedWith('xml')) { - if (!class_exists('Xml')) { - App::import('Core', 'Xml'); - } try { $xml = Xml::build(trim(file_get_contents('php://input'))); diff --git a/cake/libs/controller/components/security.php b/cake/libs/controller/components/security.php index 49632a1c6..c4f8299c4 100644 --- a/cake/libs/controller/components/security.php +++ b/cake/libs/controller/components/security.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 0.10.8.2156 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'String', false); -App::import('Core', 'Security', false); +App::uses('String', 'Core'); +App::uses('Security', 'Core'); /** * SecurityComponent diff --git a/cake/libs/controller/components/session.php b/cake/libs/controller/components/session.php index 77ab43a4d..9406e9447 100644 --- a/cake/libs/controller/components/session.php +++ b/cake/libs/controller/components/session.php @@ -17,9 +17,8 @@ * @since CakePHP(tm) v 0.10.0.1232 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('cakesession')) { - require LIBS . 'cake_session.php'; -} + +App::uses('CakeSession', 'Core'); /** * Session Component. diff --git a/cake/libs/controller/scaffold.php b/cake/libs/controller/scaffold.php index 581d788c0..b0c8995af 100644 --- a/cake/libs/controller/scaffold.php +++ b/cake/libs/controller/scaffold.php @@ -19,7 +19,7 @@ * @since Cake v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'Scaffold'); +App::uses('Scaffold', 'View'); /** * Scaffolding is a set of automatic actions for starting web development work faster. diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index f07ab78c6..a6f060df7 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -24,12 +24,8 @@ * Included libraries. * */ -if (!class_exists('CakeLog')) { - require_once LIBS . 'cake_log.php'; -} -if (!class_exists('String')) { - require_once LIBS . 'string.php'; -} +App::uses('CakeLog', 'Core'); +App::uses('String', 'Core'); /** * Provide custom logging and error handling. diff --git a/cake/libs/dispatcher.php b/cake/libs/dispatcher.php index 1a3738e89..2b4453546 100644 --- a/cake/libs/dispatcher.php +++ b/cake/libs/dispatcher.php @@ -28,6 +28,7 @@ App::uses('Router', 'Core'); App::uses('CakeRequest', 'Core'); App::uses('CakeResponse', 'Core'); App::uses('Controller', 'Controller'); +App::uses('Scaffold', 'Controller'); App::uses('View', 'View'); App::uses('Debugger', 'Core'); @@ -163,7 +164,6 @@ class Dispatcher { if (!isset($methods[$request->params['action']])) { if ($controller->scaffold !== false) { - App::import('Controller', 'Scaffold', false); return new Scaffold($controller, $request); } throw new MissingActionException(array( diff --git a/cake/libs/http_socket.php b/cake/libs/http_socket.php index aaf3b504c..40f66204b 100644 --- a/cake/libs/http_socket.php +++ b/cake/libs/http_socket.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'CakeSocket'); -App::import('Core', 'Router'); +App::uses('CakeSocket', 'Core'); +App::uses('Router', 'Core'); /** * Cake network socket connection class. diff --git a/cake/libs/i18n.php b/cake/libs/i18n.php index 05ec9c9e8..bab553d1a 100644 --- a/cake/libs/i18n.php +++ b/cake/libs/i18n.php @@ -21,8 +21,8 @@ /** * Included libraries. */ -App::import('Core', 'L10n'); -App::import('Core', 'Multibyte'); +App::uses('L10n', 'Core'); +App::uses('Multibyte', 'Core'); /** * I18n handles translation of Text and time format strings. diff --git a/cake/libs/l10n.php b/cake/libs/l10n.php index 4f5868412..1844507c3 100644 --- a/cake/libs/l10n.php +++ b/cake/libs/l10n.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.4116 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'CakeRequest'); +App::uses('CakeRequest', 'Core'); /** * Localization diff --git a/cake/libs/model/behavior_collection.php b/cake/libs/model/behavior_collection.php index 3ce783c76..39f2e37d3 100644 --- a/cake/libs/model/behavior_collection.php +++ b/cake/libs/model/behavior_collection.php @@ -19,7 +19,7 @@ * @since CakePHP(tm) v 1.2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'ObjectCollection'); +App::uses('ObjectCollection', 'Core'); /** * Model behavior collection class. diff --git a/cake/libs/model/cake_schema.php b/cake/libs/model/cake_schema.php index dbf5d3c3f..360de5717 100644 --- a/cake/libs/model/cake_schema.php +++ b/cake/libs/model/cake_schema.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Model'); -App::import('Core', 'ConnectionManager'); +App::uses('Model', 'Core'); +App::uses('ConnectionManager', 'Core'); /** * Base Class for Schema management diff --git a/cake/libs/model/connection_manager.php b/cake/libs/model/connection_manager.php index 40dc1e2bf..59dd5d37f 100644 --- a/cake/libs/model/connection_manager.php +++ b/cake/libs/model/connection_manager.php @@ -19,8 +19,6 @@ * @since CakePHP(tm) v 0.10.x.1402 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require LIBS . 'model' . DS . 'datasources' . DS . 'datasource.php'; -include_once CONFIGS . 'database.php'; /** * Manages loaded instances of DataSource objects @@ -59,6 +57,7 @@ class ConnectionManager { * */ function __construct() { + include_once CONFIGS . 'database.php'; if (class_exists('DATABASE_CONFIG')) { $this->config = new DATABASE_CONFIG(); $this->_getConnectionObjects(); @@ -102,6 +101,7 @@ class ConnectionManager { $conn = $_this->_connectionsEnum[$name]; $class = $conn['classname']; + require LIBS . 'model' . DS . 'datasources' . DS . 'datasource.php'; if ($_this->loadDataSource($name) === null) { trigger_error(sprintf(__("ConnectionManager::getDataSource - Could not load class %s"), $class), E_USER_ERROR); $null = null; diff --git a/cake/libs/router.php b/cake/libs/router.php index b51f02134..3840fdce6 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -18,8 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'CakeRequest'); -App::import('Core', 'route/CakeRoute'); +App::uses('CakeRequest', 'Core'); +App::uses('CakeRoute', 'Core'); /** * Parses the request URL into controller, action, and parameters. From b1ec3043bc656dd7cc6c7e3e05f2b730d188e04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 3 Dec 2010 18:37:21 -0430 Subject: [PATCH 004/214] Replacing App::import in favor of App::uses where possible --- cake/console/templates/skel/app_helper.php | 2 +- cake/libs/cake_socket.php | 2 +- cake/libs/model/behaviors/translate.php | 5 ++--- cake/libs/model/datasources/dbo_source.php | 2 +- cake/libs/model/db_acl.php | 2 +- cake/libs/model/model.php | 14 +++++++------- cake/libs/route/plugin_short_route.php | 2 +- cake/libs/route/redirect_route.php | 5 +++-- cake/libs/router.php | 4 ++-- cake/libs/security.php | 5 ++--- cake/libs/set.php | 5 ++--- cake/libs/validation.php | 5 ++--- cake/libs/view/helper.php | 4 +--- cake/libs/view/helper_collection.php | 2 +- cake/libs/view/helpers/app_helper.php | 2 +- cake/libs/view/helpers/jquery_engine.php | 3 ++- cake/libs/view/helpers/js.php | 3 ++- cake/libs/view/helpers/mootools_engine.php | 2 +- cake/libs/view/helpers/prototype_engine.php | 2 +- cake/libs/view/helpers/rss.php | 2 +- cake/libs/view/helpers/text.php | 8 ++------ cake/libs/view/media.php | 4 ++-- cake/libs/view/scaffold.php | 2 +- cake/libs/view/theme.php | 2 +- cake/libs/view/view.php | 4 ++-- 25 files changed, 43 insertions(+), 50 deletions(-) diff --git a/cake/console/templates/skel/app_helper.php b/cake/console/templates/skel/app_helper.php index 2dd482b90..5d9323d09 100644 --- a/cake/console/templates/skel/app_helper.php +++ b/cake/console/templates/skel/app_helper.php @@ -20,7 +20,7 @@ * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Helper', false); +App::uses('Helper', 'Helper'); /** * This is a placeholder class. diff --git a/cake/libs/cake_socket.php b/cake/libs/cake_socket.php index 3bcb7ca0a..e5be4cbe5 100644 --- a/cake/libs/cake_socket.php +++ b/cake/libs/cake_socket.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Validation'); +App::uses('Validation', 'Core'); /** * Cake network socket connection class. diff --git a/cake/libs/model/behaviors/translate.php b/cake/libs/model/behaviors/translate.php index 9e5a3c799..d7ea5ecf0 100644 --- a/cake/libs/model/behaviors/translate.php +++ b/cake/libs/model/behaviors/translate.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('I18n', 'Core'); + /** * Translate behavior * @@ -346,9 +348,6 @@ class TranslateBehavior extends ModelBehavior { */ protected function _getLocale(&$model) { if (!isset($model->locale) || is_null($model->locale)) { - if (!class_exists('I18n')) { - App::import('Core', 'i18n'); - } $I18n =& I18n::getInstance(); $I18n->l10n->get(Configure::read('Config.language')); $model->locale = $I18n->l10n->locale; diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 2e4387852..fbcf5c3af 100755 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'String'); +App::uses('String', 'Core'); /** * DboSource diff --git a/cake/libs/model/db_acl.php b/cake/libs/model/db_acl.php index b9bd815b0..a07730061 100644 --- a/cake/libs/model/db_acl.php +++ b/cake/libs/model/db_acl.php @@ -23,7 +23,7 @@ /** * Load Model and AppModel */ -App::import('Model', 'App'); +App::uses('AppModel', 'Model'); /** * ACL Node diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index b34d175e0..1ea708a2b 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -23,12 +23,13 @@ /** * Included libs */ -App::import('Core', 'ClassRegistry', false); -App::import('Core', 'Validation', false); -App::import('Core', 'String', false); -App::import('Model', 'BehaviorCollection', false); -App::import('Model', 'ModelBehavior', false); -App::import('Model', 'ConnectionManager', false); +App::uses('ClassRegistry', 'Core'); +App::uses('Validation', 'Core'); +App::uses('String', 'Core'); +App::uses('BehaviorCollection', 'Model'); +App::uses('ModelBehavior', 'Model'); +App::uses('ConnectionManager', 'Model'); +App::uses('Xml', 'Core'); /** * Object-relational mapper. @@ -822,7 +823,6 @@ class Model extends Object { } if (is_object($one)) { if ($one instanceof SimpleXMLElement || $one instanceof DOMNode) { - App::import('Core', 'Xml'); $one = $this->_normalizeXmlData(Xml::toArray($one)); } else { $one = Set::reverse($one); diff --git a/cake/libs/route/plugin_short_route.php b/cake/libs/route/plugin_short_route.php index 1c1c4330b..062cfcbfb 100644 --- a/cake/libs/route/plugin_short_route.php +++ b/cake/libs/route/plugin_short_route.php @@ -1,5 +1,5 @@ $value) { $plugins[$key] = Inflector::underscore($value); } diff --git a/cake/libs/security.php b/cake/libs/security.php index 348402de2..2cbe838b0 100644 --- a/cake/libs/security.php +++ b/cake/libs/security.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('String', 'Core'); + /** * Security Library contains utility methods related to security * @@ -59,9 +61,6 @@ class Security { * @return string Hash */ public static function generateAuthKey() { - if (!class_exists('String')) { - App::import('Core', 'String'); - } return Security::hash(String::uuid()); } diff --git a/cake/libs/set.php b/cake/libs/set.php index 4938308cd..7a86facdf 100644 --- a/cake/libs/set.php +++ b/cake/libs/set.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('String', 'Core'); + /** * Class used for manipulation of arrays. * @@ -582,9 +584,6 @@ class Set { } if (!is_array($path)) { - if (!class_exists('String')) { - App::import('Core', 'String'); - } $path = String::tokenize($path, '.', '{', '}'); } $tmp = array(); diff --git a/cake/libs/validation.php b/cake/libs/validation.php index 7297491bd..00e7e8fe1 100644 --- a/cake/libs/validation.php +++ b/cake/libs/validation.php @@ -17,9 +17,8 @@ * @since CakePHP(tm) v 1.2.0.3830 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('Multibyte')) { - App::import('Core', 'Multibyte', false); -} + +App::uses('Multibyte', 'Core'); /** * Offers different validation methods. diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index 20e41953c..7bec00a20 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -20,9 +20,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('Router')) { - App::import('Core', 'Router'); -} +App::uses('Router', 'Core'); /** * Abstract base class for all other Helpers in CakePHP. diff --git a/cake/libs/view/helper_collection.php b/cake/libs/view/helper_collection.php index 18b700812..66200a44b 100644 --- a/cake/libs/view/helper_collection.php +++ b/cake/libs/view/helper_collection.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'ObjectCollection'); +App::uses('ObjectCollection', 'Core'); class HelperCollection extends ObjectCollection { diff --git a/cake/libs/view/helpers/app_helper.php b/cake/libs/view/helpers/app_helper.php index d09503bb0..cdde4bc60 100644 --- a/cake/libs/view/helpers/app_helper.php +++ b/cake/libs/view/helpers/app_helper.php @@ -20,7 +20,7 @@ * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'Helper', false); +App::uses('Helper', 'View'); /** * This is a placeholder class. diff --git a/cake/libs/view/helpers/jquery_engine.php b/cake/libs/view/helpers/jquery_engine.php index f09c70c33..ce9c017db 100644 --- a/cake/libs/view/helpers/jquery_engine.php +++ b/cake/libs/view/helpers/jquery_engine.php @@ -22,7 +22,8 @@ * @subpackage cake.view.helpers * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Js'); + +App::uses('JsHelper', 'Helper'); class JqueryEngineHelper extends JsBaseEngineHelper { /** diff --git a/cake/libs/view/helpers/js.php b/cake/libs/view/helpers/js.php index c4809c30c..a8a91adb8 100644 --- a/cake/libs/view/helpers/js.php +++ b/cake/libs/view/helpers/js.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Multibyte', 'Core'); + /** * Javascript Generator helper class for easy use of JavaScript. * @@ -665,7 +667,6 @@ abstract class JsBaseEngineHelper extends AppHelper { * @return string Escaped string. */ public function escape($string) { - App::import('Core', 'Multibyte'); return $this->_utf8ToHex($string); } diff --git a/cake/libs/view/helpers/mootools_engine.php b/cake/libs/view/helpers/mootools_engine.php index bd0b676dd..ec226d500 100644 --- a/cake/libs/view/helpers/mootools_engine.php +++ b/cake/libs/view/helpers/mootools_engine.php @@ -25,7 +25,7 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Js'); +App::uses('JsHelper', 'Helper'); class MootoolsEngineHelper extends JsBaseEngineHelper { /** diff --git a/cake/libs/view/helpers/prototype_engine.php b/cake/libs/view/helpers/prototype_engine.php index 7f3e230b4..779fb5c45 100644 --- a/cake/libs/view/helpers/prototype_engine.php +++ b/cake/libs/view/helpers/prototype_engine.php @@ -20,7 +20,7 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Js'); +App::uses('JsHelper', 'Helper'); class PrototypeEngineHelper extends JsBaseEngineHelper { /** diff --git a/cake/libs/view/helpers/rss.php b/cake/libs/view/helpers/rss.php index ae1ab6239..d85eb7a23 100644 --- a/cake/libs/view/helpers/rss.php +++ b/cake/libs/view/helpers/rss.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Xml'); +App::uses('Xml', 'Core'); /** * RSS Helper class for easy output RSS structures. diff --git a/cake/libs/view/helpers/text.php b/cake/libs/view/helpers/text.php index 3f6933bbd..c87455035 100644 --- a/cake/libs/view/helpers/text.php +++ b/cake/libs/view/helpers/text.php @@ -24,12 +24,8 @@ * Included libraries. * */ -if (!class_exists('HtmlHelper')) { - App::import('Helper', 'Html'); -} -if (!class_exists('Multibyte')) { - App::import('Core', 'Multibyte'); -} +App::uses('HtmlHelper', 'Helper'); +App::uses('Multibyte', 'Core'); /** * Text helper library. diff --git a/cake/libs/view/media.php b/cake/libs/view/media.php index 5bc0d179e..856e8d920 100644 --- a/cake/libs/view/media.php +++ b/cake/libs/view/media.php @@ -17,7 +17,8 @@ * @since CakePHP(tm) v 1.2.0.5714 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'View', false); +App::uses('View', 'View'); +App::uses('CakeRequest', 'Core'); class MediaView extends View { /** @@ -45,7 +46,6 @@ class MediaView extends View { if (is_object($controller) && isset($controller->response)) { $this->response = $controller->response; } else { - App::import('Core', 'CakeRequest'); $this->response = new CakeResponse; } } diff --git a/cake/libs/view/scaffold.php b/cake/libs/view/scaffold.php index 032676985..88015a97c 100644 --- a/cake/libs/view/scaffold.php +++ b/cake/libs/view/scaffold.php @@ -19,7 +19,7 @@ * @since Cake v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'Theme'); +App::uses('ThemeView', 'View'); /** * ScaffoldView provides specific view file loading features for scaffolded views. diff --git a/cake/libs/view/theme.php b/cake/libs/view/theme.php index 80e56ae42..02cba797f 100644 --- a/cake/libs/view/theme.php +++ b/cake/libs/view/theme.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'View'); +App::uses('View', 'View'); /** * Theme view class diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index 557c69674..a9b5481e5 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -21,8 +21,8 @@ /** * Included libraries. */ -App::import('View', 'HelperCollection', false); -App::import('View', 'Helper', false); +App::uses('HelperCollection', 'View'); +App::uses('Helper', 'View'); /** * View, the V in the MVC triad. From c57dd6f0f1b72d97b4656af3b69a9c318a005a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 3 Dec 2010 19:38:57 -0430 Subject: [PATCH 005/214] Starting to move files to match the PHP standards group file naming standard --- cake/libs/dispatcher.php => lib/Cake/Routing/Dispatcher.php | 0 {cake => lib/Cake}/basics.php | 0 {cake => lib/Cake}/bootstrap.php | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename cake/libs/dispatcher.php => lib/Cake/Routing/Dispatcher.php (100%) rename {cake => lib/Cake}/basics.php (100%) rename {cake => lib/Cake}/bootstrap.php (100%) diff --git a/cake/libs/dispatcher.php b/lib/Cake/Routing/Dispatcher.php similarity index 100% rename from cake/libs/dispatcher.php rename to lib/Cake/Routing/Dispatcher.php diff --git a/cake/basics.php b/lib/Cake/basics.php similarity index 100% rename from cake/basics.php rename to lib/Cake/basics.php diff --git a/cake/bootstrap.php b/lib/Cake/bootstrap.php similarity index 100% rename from cake/bootstrap.php rename to lib/Cake/bootstrap.php From 96cb90a82bfaa3ee772e91faa24e6bb263939e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 3 Dec 2010 19:48:44 -0430 Subject: [PATCH 006/214] Chanigng some constants and commenting code to start testing --- lib/Cake/bootstrap.php | 230 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 220 insertions(+), 10 deletions(-) diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index acfc7bb2f..e596aa359 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -24,16 +24,226 @@ if (!defined('E_DEPRECATED')) { } error_reporting(E_ALL & ~E_DEPRECATED); -require CORE_PATH . 'cake' . DS . 'basics.php'; -require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php'; -require LIBS . 'error' . DS . 'exceptions.php'; -require LIBS . 'object.php'; -require LIBS . 'inflector.php'; +/** + * If the index.php file is used instead of an .htaccess file + * or if the user can not set the web root to use the public + * directory we will define ROOT there, otherwise we set it + * here. + */ + if (!defined('ROOT')) { + define('ROOT', '../'); + } + if (!defined('WEBROOT_DIR')) { + define('WEBROOT_DIR', 'webroot'); + } + +/** + * Path to the cake directory. + */ + define('CAKE', CORE_PATH . 'lib' . DS . 'Cake' . DS); + +/** + * Path to the application's directory. + */ +if (!defined('APP')) { + define('APP', ROOT.DS.APP_DIR.DS); +} + +/** + * Path to the application's models directory. + */ + define('MODELS', APP.'models'.DS); + +/** + * Path to model behaviors directory. + */ + define('BEHAVIORS', MODELS.'behaviors'.DS); + +/** + * Path to the application's controllers directory. + */ + define('CONTROLLERS', APP.'controllers'.DS); + +/** + * Path to the application's components directory. + */ + define('COMPONENTS', CONTROLLERS.'components'.DS); + +/** + * Path to the application's libs directory. + */ + define('APPLIBS', APP.'libs'.DS); + +/** + * Path to the application's views directory. + */ + define('VIEWS', APP.'views'.DS); + +/** + * Path to the application's helpers directory. + */ + define('HELPERS', VIEWS.'helpers'.DS); + +/** + * Path to the application's view's layouts directory. + */ + define('LAYOUTS', VIEWS.'layouts'.DS); + +/** + * Path to the application's view's elements directory. + * It's supposed to hold pieces of PHP/HTML that are used on multiple pages + * and are not linked to a particular layout (like polls, footers and so on). + */ + define('ELEMENTS', VIEWS.'elements'.DS); + +/** + * Path to the configuration files directory. + */ +if (!defined('CONFIGS')) { + define('CONFIGS', APP.'config'.DS); +} + +/** + * Path to the libs directory. + */ + define('LIBS', CAKE); + +/** + * Path to the public CSS directory. + */ + define('CSS', WWW_ROOT.'css'.DS); + +/** + * Path to the public JavaScript directory. + */ + define('JS', WWW_ROOT.'js'.DS); + +/** + * Path to the public images directory. + */ + define('IMAGES', WWW_ROOT.'img'.DS); + +/** + * Path to the console libs direcotry. + */ + define('CONSOLE_LIBS', CAKE.'console'.DS.'libs'.DS); + +/** + * Path to the tests directory. + */ +if (!defined('TESTS')) { + define('TESTS', APP.'tests'.DS); +} + +/** + * Path to the core tests directory. + */ +if (!defined('CAKE_TESTS')) { + define('CAKE_TESTS', CAKE.'tests'.DS); +} + +/** + * Path to the test suite. + */ + define('CAKE_TESTS_LIB', CAKE_TESTS.'lib'.DS); + +/** + * Path to the controller test directory. + */ + define('CONTROLLER_TESTS', TESTS.'cases'.DS.'controllers'.DS); + +/** + * Path to the components test directory. + */ + define('COMPONENT_TESTS', TESTS.'cases'.DS.'components'.DS); + +/** + * Path to the helpers test directory. + */ + define('HELPER_TESTS', TESTS.'cases'.DS.'views'.DS.'helpers'.DS); + +/** + * Path to the models' test directory. + */ + define('MODEL_TESTS', TESTS.'cases'.DS.'models'.DS); + +/** + * Path to the lib test directory. + */ + define('LIB_TESTS', CAKE_TESTS.'cases'.DS.'lib'.DS); + +/** + * Path to the temporary files directory. + */ +if (!defined('TMP')) { + define('TMP', APP.'tmp'.DS); +} + +/** + * Path to the logs directory. + */ + define('LOGS', TMP.'logs'.DS); + +/** + * Path to the cache files directory. It can be shared between hosts in a multi-server setup. + */ + define('CACHE', TMP.'cache'.DS); + +/** + * Path to the vendors directory. + */ +if (!defined('VENDORS')) { + define('VENDORS', CAKE_CORE_INCLUDE_PATH.DS.'vendors'.DS); +} + +/** + * Web path to the public images directory. + */ +if (!defined('IMAGES_URL')) { + define('IMAGES_URL', 'img/'); +} + +/** + * Web path to the CSS files directory. + */ +if (!defined('CSS_URL')) { + define('CSS_URL', 'css/'); +} + +/** + * Web path to the js files directory. + */ +if (!defined('JS_URL')) { + define('JS_URL', 'js/'); +} + + +require LIBS . 'basics.php'; require LIBS . 'app.php'; -require LIBS . 'configure.php'; -require LIBS . 'set.php'; -require LIBS . 'cache.php'; -require LIBS . 'error' . DS . 'error_handler.php'; +//require LIBS . 'error' . DS . 'exceptions.php'; +//require LIBS . 'object.php'; +//require LIBS . 'inflector.php'; +// +//require LIBS . 'configure.php'; +//require LIBS . 'set.php'; +//require LIBS . 'cache.php'; +//require LIBS . 'error' . DS . 'error_handler.php'; -Configure::bootstrap(isset($boot) ? $boot : true); +//Configure::bootstrap(isset($boot) ? $boot : true); +/** + * Full url prefix + */ +if (!defined('FULL_BASE_URL')) { + $s = null; + if (env('HTTPS')) { + $s ='s'; + } + + $httpHost = env('HTTP_HOST'); + + if (isset($httpHost)) { + define('FULL_BASE_URL', 'http'.$s.'://'.$httpHost); + } + unset($httpHost, $s); +} \ No newline at end of file From ca34b22dbb73ecf9793d6a296bd4086e2c3d9f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 3 Dec 2010 20:15:54 -0430 Subject: [PATCH 007/214] Renaming more core classes, next step would be to tweek the autoloader to find only on Cake/ "namespace" (for now) --- cake/libs/app.php => lib/Cake/Core/App.php | 0 cake/libs/router.php => lib/Cake/Routing/Router.php | 0 cake/libs/folder.php => lib/Cake/Utility/Folder.php | 0 cake/libs/inflector.php => lib/Cake/Utility/Inflector.php | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename cake/libs/app.php => lib/Cake/Core/App.php (100%) rename cake/libs/router.php => lib/Cake/Routing/Router.php (100%) rename cake/libs/folder.php => lib/Cake/Utility/Folder.php (100%) rename cake/libs/inflector.php => lib/Cake/Utility/Inflector.php (100%) diff --git a/cake/libs/app.php b/lib/Cake/Core/App.php similarity index 100% rename from cake/libs/app.php rename to lib/Cake/Core/App.php diff --git a/cake/libs/router.php b/lib/Cake/Routing/Router.php similarity index 100% rename from cake/libs/router.php rename to lib/Cake/Routing/Router.php diff --git a/cake/libs/folder.php b/lib/Cake/Utility/Folder.php similarity index 100% rename from cake/libs/folder.php rename to lib/Cake/Utility/Folder.php diff --git a/cake/libs/inflector.php b/lib/Cake/Utility/Inflector.php similarity index 100% rename from cake/libs/inflector.php rename to lib/Cake/Utility/Inflector.php From 3c23080dd23f979e437edcafb4c24ca0a5478cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 3 Dec 2010 20:53:47 -0430 Subject: [PATCH 008/214] Moving more classes to the new schema, slowly uncommenting code and implementing new class loader --- cake/libs/cache.php => lib/Cake/Cache/Cache.php | 0 lib/Cake/Core/App.php | 7 +++++-- .../configure.php => lib/Cake/Core/Configure.php | 0 .../Cake/Network/CakeRequest.php | 0 lib/Cake/Routing/Dispatcher.php | 6 +++--- lib/Cake/bootstrap.php | 12 ++++++++---- 6 files changed, 16 insertions(+), 9 deletions(-) rename cake/libs/cache.php => lib/Cake/Cache/Cache.php (100%) rename cake/libs/configure.php => lib/Cake/Core/Configure.php (100%) rename cake/libs/cake_request.php => lib/Cake/Network/CakeRequest.php (100%) diff --git a/cake/libs/cache.php b/lib/Cake/Cache/Cache.php similarity index 100% rename from cake/libs/cache.php rename to lib/Cake/Cache/Cache.php diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 66df9c93b..5caf05e40 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -442,7 +442,10 @@ class App { public static function load($className) { if (isset(self::$__classMap[$className])) { - return App::import(self::$__classMap[$className], $className, false); + $file = LIBS . self::$__classMap[$className] . DS . $className . '.php'; + if (file_exists($file)) { + return include $file; + } } return false; } @@ -606,7 +609,7 @@ class App { } if (empty(self::$__paths)) { - self::$__paths = Cache::read('dir_map', '_cake_core_'); + //self::$__paths = Cache::read('dir_map', '_cake_core_'); } foreach (self::$search as $path) { diff --git a/cake/libs/configure.php b/lib/Cake/Core/Configure.php similarity index 100% rename from cake/libs/configure.php rename to lib/Cake/Core/Configure.php diff --git a/cake/libs/cake_request.php b/lib/Cake/Network/CakeRequest.php similarity index 100% rename from cake/libs/cake_request.php rename to lib/Cake/Network/CakeRequest.php diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index 2b4453546..d1c396148 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -24,9 +24,9 @@ /** * List of helpers to include */ -App::uses('Router', 'Core'); -App::uses('CakeRequest', 'Core'); -App::uses('CakeResponse', 'Core'); +App::uses('Router', 'Routing'); +App::uses('CakeRequest', 'Network'); +App::uses('CakeResponse', 'Network'); App::uses('Controller', 'Controller'); App::uses('Scaffold', 'Controller'); App::uses('View', 'View'); diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index e596aa359..5a6a2e697 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -219,17 +219,21 @@ if (!defined('JS_URL')) { require LIBS . 'basics.php'; -require LIBS . 'app.php'; +require LIBS . 'Utility' . DS . 'Inflector.php'; +require LIBS . 'Utility' . DS . 'Folder.php'; +require LIBS . 'Core' . DS .'App.php'; + +App::uses('Configure', 'Core'); +App::uses('Cache', 'Cache'); + //require LIBS . 'error' . DS . 'exceptions.php'; //require LIBS . 'object.php'; -//require LIBS . 'inflector.php'; -// //require LIBS . 'configure.php'; //require LIBS . 'set.php'; //require LIBS . 'cache.php'; //require LIBS . 'error' . DS . 'error_handler.php'; -//Configure::bootstrap(isset($boot) ? $boot : true); +Configure::bootstrap(isset($boot) ? $boot : true); /** * Full url prefix From 73ad5385eb9a5ee1d0466458703013e5f60ea2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 02:16:51 -0430 Subject: [PATCH 009/214] Moving more classes to the new layout, it is time to bring the debugger up --- lib/Cake/Cache/Cache.php | 25 +++---------------- .../Cake/Cache/Engine/ApcEngine.php | 0 .../Cake/Cache/Engine/FileEngine.php | 0 .../Cake/Cache/Engine/MemcacheEngine.php | 0 .../Cake/Cache/Engine/XcacheEngine.php | 0 .../Cake/Error/ErrorHandler.php | 0 .../error => lib/Cake/Error}/exceptions.php | 0 lib/Cake/bootstrap.php | 7 +++--- 8 files changed, 8 insertions(+), 24 deletions(-) rename cake/libs/cache/apc.php => lib/Cake/Cache/Engine/ApcEngine.php (100%) rename cake/libs/cache/file.php => lib/Cake/Cache/Engine/FileEngine.php (100%) rename cake/libs/cache/memcache.php => lib/Cake/Cache/Engine/MemcacheEngine.php (100%) rename cake/libs/cache/xcache.php => lib/Cake/Cache/Engine/XcacheEngine.php (100%) rename cake/libs/error/error_handler.php => lib/Cake/Error/ErrorHandler.php (100%) rename {cake/libs/error => lib/Cake/Error}/exceptions.php (100%) diff --git a/lib/Cake/Cache/Cache.php b/lib/Cake/Cache/Cache.php index 259bdc490..4dd4e019f 100644 --- a/lib/Cake/Cache/Cache.php +++ b/lib/Cake/Cache/Cache.php @@ -19,6 +19,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Inflector', 'Utility'); + /** * Caching for CakePHP. * @@ -109,7 +111,8 @@ class Cache { list($plugin, $class) = pluginSplit($config['engine']); $cacheClass = $class . 'Engine'; - if (!class_exists($cacheClass) && self::_loadEngine($class, $plugin) === false) { + App::uses($cacheClass, 'Cache/Engine'); + if (!class_exists($cacheClass)) { return false; } $cacheClass = $class . 'Engine'; @@ -151,26 +154,6 @@ class Cache { return true; } -/** - * Tries to find and include a file for a cache engine and returns object instance - * - * @param $name Name of the engine (without 'Engine') - * @return mixed $engine object or null - */ - protected static function _loadEngine($name, $plugin = null) { - if ($plugin) { - return App::import('Lib', $plugin . '.cache' . DS . $name, false); - } else { - $core = App::core(); - $path = $core['libs'][0] . 'cache' . DS . strtolower($name) . '.php'; - if (file_exists($path)) { - require $path; - return true; - } - return App::import('Lib', 'cache' . DS . $name, false); - } - } - /** * Temporarily change the settings on a cache config. The settings will persist for the next write * operation (write, decrement, increment, clear). Any reads that are done before the write, will diff --git a/cake/libs/cache/apc.php b/lib/Cake/Cache/Engine/ApcEngine.php similarity index 100% rename from cake/libs/cache/apc.php rename to lib/Cake/Cache/Engine/ApcEngine.php diff --git a/cake/libs/cache/file.php b/lib/Cake/Cache/Engine/FileEngine.php similarity index 100% rename from cake/libs/cache/file.php rename to lib/Cake/Cache/Engine/FileEngine.php diff --git a/cake/libs/cache/memcache.php b/lib/Cake/Cache/Engine/MemcacheEngine.php similarity index 100% rename from cake/libs/cache/memcache.php rename to lib/Cake/Cache/Engine/MemcacheEngine.php diff --git a/cake/libs/cache/xcache.php b/lib/Cake/Cache/Engine/XcacheEngine.php similarity index 100% rename from cake/libs/cache/xcache.php rename to lib/Cake/Cache/Engine/XcacheEngine.php diff --git a/cake/libs/error/error_handler.php b/lib/Cake/Error/ErrorHandler.php similarity index 100% rename from cake/libs/error/error_handler.php rename to lib/Cake/Error/ErrorHandler.php diff --git a/cake/libs/error/exceptions.php b/lib/Cake/Error/exceptions.php similarity index 100% rename from cake/libs/error/exceptions.php rename to lib/Cake/Error/exceptions.php diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index 5a6a2e697..93532e608 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -219,14 +219,15 @@ if (!defined('JS_URL')) { require LIBS . 'basics.php'; -require LIBS . 'Utility' . DS . 'Inflector.php'; -require LIBS . 'Utility' . DS . 'Folder.php'; require LIBS . 'Core' . DS .'App.php'; +require LIBS . 'Error' . DS . 'exceptions.php'; +App::uses('ErrorHandler', 'Error'); App::uses('Configure', 'Core'); App::uses('Cache', 'Cache'); -//require LIBS . 'error' . DS . 'exceptions.php'; + + //require LIBS . 'object.php'; //require LIBS . 'configure.php'; //require LIBS . 'set.php'; From b4387d2f515a548fb714cf4c064672b2bdb71784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 02:34:30 -0430 Subject: [PATCH 010/214] More replacements to get class loaded using the new file scheme --- cake/libs/controller/components/auth.php | 4 ++-- .../Cake/Controller/ComponentCollection.php | 0 .../controller.php => lib/Cake/Controller/Controller.php | 0 lib/Cake/Core/App.php | 8 ++------ cake/libs/object.php => lib/Cake/Core/Object.php | 0 lib/Cake/Error/ErrorHandler.php | 8 ++------ lib/Cake/Routing/Dispatcher.php | 2 +- .../Cake/Routing/Route/CakeRoute.php | 0 lib/Cake/Routing/Router.php | 4 ++-- cake/libs/debugger.php => lib/Cake/Utility/Debugger.php | 4 ++-- cake/libs/string.php => lib/Cake/Utility/String.php | 0 lib/Cake/bootstrap.php | 9 +-------- 12 files changed, 12 insertions(+), 27 deletions(-) rename cake/libs/controller/component_collection.php => lib/Cake/Controller/ComponentCollection.php (100%) rename cake/libs/controller/controller.php => lib/Cake/Controller/Controller.php (100%) rename cake/libs/object.php => lib/Cake/Core/Object.php (100%) rename cake/libs/route/cake_route.php => lib/Cake/Routing/Route/CakeRoute.php (100%) rename cake/libs/debugger.php => lib/Cake/Utility/Debugger.php (99%) rename cake/libs/string.php => lib/Cake/Utility/String.php (100%) diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index b09faa2f4..4aa3478ae 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -20,9 +20,9 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Router', 'Core'); +App::uses('Router', 'Routing'); App::uses('Security', 'Core'); -App::uses('Debugger', 'Core'); +App::uses('Debugger', 'Utility'); /** * Authentication control component class diff --git a/cake/libs/controller/component_collection.php b/lib/Cake/Controller/ComponentCollection.php similarity index 100% rename from cake/libs/controller/component_collection.php rename to lib/Cake/Controller/ComponentCollection.php diff --git a/cake/libs/controller/controller.php b/lib/Cake/Controller/Controller.php similarity index 100% rename from cake/libs/controller/controller.php rename to lib/Cake/Controller/Controller.php diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 5caf05e40..a363ad407 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -629,9 +629,7 @@ class App { } if (!isset(self::$__paths[$path])) { - if (!class_exists('Folder')) { - require LIBS . 'folder.php'; - } + App::uses('Folder', 'Utility'); $Folder = new Folder(); $directories = $Folder->tree($path, array('.svn', '.git', 'CVS', 'tests', 'templates'), 'dir'); sort($directories); @@ -865,9 +863,7 @@ class App { * @return array List of directories or files in directory */ private static function __list($path, $suffix = false, $extension = false) { - if (!class_exists('Folder')) { - require LIBS . 'folder.php'; - } + App::uses('Folder', 'Utility'); $items = array(); $Folder = new Folder($path); $contents = $Folder->read(false, true); diff --git a/cake/libs/object.php b/lib/Cake/Core/Object.php similarity index 100% rename from cake/libs/object.php rename to lib/Cake/Core/Object.php diff --git a/lib/Cake/Error/ErrorHandler.php b/lib/Cake/Error/ErrorHandler.php index 85cea7ec4..732b6328d 100644 --- a/lib/Cake/Error/ErrorHandler.php +++ b/lib/Cake/Error/ErrorHandler.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Debugger', 'Utility'); + /** * * Error Handler provides basic error and exception handling for your application. It captures and @@ -143,9 +145,6 @@ class ErrorHandler { $debug = Configure::read('debug'); if ($debug) { - if (!class_exists('Debugger')) { - require LIBS . 'debugger.php'; - } $data = array( 'level' => $log, 'code' => $code, @@ -164,9 +163,6 @@ class ErrorHandler { } $message = $error . ' (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']'; if (!empty($errorConfig['trace'])) { - if (!class_exists('Debugger')) { - require LIBS . 'debugger.php'; - } $trace = Debugger::trace(array('start' => 1, 'format' => 'log')); $message .= "\nTrace:\n" . $trace . "\n"; } diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index d1c396148..1fd36319c 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -30,7 +30,7 @@ App::uses('CakeResponse', 'Network'); App::uses('Controller', 'Controller'); App::uses('Scaffold', 'Controller'); App::uses('View', 'View'); -App::uses('Debugger', 'Core'); +App::uses('Debugger', 'Utility'); /** * Dispatcher converts Requests into controller actions. It uses the dispatched Request diff --git a/cake/libs/route/cake_route.php b/lib/Cake/Routing/Route/CakeRoute.php similarity index 100% rename from cake/libs/route/cake_route.php rename to lib/Cake/Routing/Route/CakeRoute.php diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 340d04261..3824fdd0c 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -18,8 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('CakeRequest', 'Core'); -App::uses('CakeRoute', 'Core'); +App::uses('CakeRequest', 'Network'); +App::uses('CakeRoute', 'Routing/Route'); /** * Parses the request URL into controller, action, and parameters. diff --git a/cake/libs/debugger.php b/lib/Cake/Utility/Debugger.php similarity index 99% rename from cake/libs/debugger.php rename to lib/Cake/Utility/Debugger.php index a6f060df7..d1900500a 100644 --- a/cake/libs/debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -24,8 +24,8 @@ * Included libraries. * */ -App::uses('CakeLog', 'Core'); -App::uses('String', 'Core'); +App::uses('CakeLog', 'Log'); +App::uses('String', 'Utility'); /** * Provide custom logging and error handling. diff --git a/cake/libs/string.php b/lib/Cake/Utility/String.php similarity index 100% rename from cake/libs/string.php rename to lib/Cake/Utility/String.php diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index 93532e608..1e649440e 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -225,14 +225,7 @@ require LIBS . 'Error' . DS . 'exceptions.php'; App::uses('ErrorHandler', 'Error'); App::uses('Configure', 'Core'); App::uses('Cache', 'Cache'); - - - -//require LIBS . 'object.php'; -//require LIBS . 'configure.php'; -//require LIBS . 'set.php'; -//require LIBS . 'cache.php'; -//require LIBS . 'error' . DS . 'error_handler.php'; +App::uses('Object', 'Core'); Configure::bootstrap(isset($boot) ? $boot : true); From fbbb5c9337de2cfffa9dca839f51655acd7b3401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 02:45:22 -0430 Subject: [PATCH 011/214] Moving more clases to the new layout while trying to make controller related classes load --- .../Cake/Controller/Component/AclComponent.php | 0 .../Cake/Controller/Component/AuthComponent.php | 0 .../Cake/Controller/Component/CookieComponent.php | 0 .../Cake/Controller/Component/EmailComponent.php | 0 .../Controller/Component/RequestHandlerComponent.php | 0 .../Cake/Controller/Component/SecurityComponent.php | 0 .../Cake/Controller/Component/SessionComponent.php | 0 lib/Cake/Controller/ComponentCollection.php | 9 ++------- lib/Cake/Controller/Controller.php | 2 +- .../Cake/Network/CakeResponse.php | 0 .../Cake/Utility/ObjectCollection.php | 0 11 files changed, 3 insertions(+), 8 deletions(-) rename cake/libs/controller/components/acl.php => lib/Cake/Controller/Component/AclComponent.php (100%) rename cake/libs/controller/components/auth.php => lib/Cake/Controller/Component/AuthComponent.php (100%) rename cake/libs/controller/components/cookie.php => lib/Cake/Controller/Component/CookieComponent.php (100%) rename cake/libs/controller/components/email.php => lib/Cake/Controller/Component/EmailComponent.php (100%) rename cake/libs/controller/components/request_handler.php => lib/Cake/Controller/Component/RequestHandlerComponent.php (100%) rename cake/libs/controller/components/security.php => lib/Cake/Controller/Component/SecurityComponent.php (100%) rename cake/libs/controller/components/session.php => lib/Cake/Controller/Component/SessionComponent.php (100%) rename cake/libs/cake_response.php => lib/Cake/Network/CakeResponse.php (100%) rename cake/libs/object_collection.php => lib/Cake/Utility/ObjectCollection.php (100%) diff --git a/cake/libs/controller/components/acl.php b/lib/Cake/Controller/Component/AclComponent.php similarity index 100% rename from cake/libs/controller/components/acl.php rename to lib/Cake/Controller/Component/AclComponent.php diff --git a/cake/libs/controller/components/auth.php b/lib/Cake/Controller/Component/AuthComponent.php similarity index 100% rename from cake/libs/controller/components/auth.php rename to lib/Cake/Controller/Component/AuthComponent.php diff --git a/cake/libs/controller/components/cookie.php b/lib/Cake/Controller/Component/CookieComponent.php similarity index 100% rename from cake/libs/controller/components/cookie.php rename to lib/Cake/Controller/Component/CookieComponent.php diff --git a/cake/libs/controller/components/email.php b/lib/Cake/Controller/Component/EmailComponent.php similarity index 100% rename from cake/libs/controller/components/email.php rename to lib/Cake/Controller/Component/EmailComponent.php diff --git a/cake/libs/controller/components/request_handler.php b/lib/Cake/Controller/Component/RequestHandlerComponent.php similarity index 100% rename from cake/libs/controller/components/request_handler.php rename to lib/Cake/Controller/Component/RequestHandlerComponent.php diff --git a/cake/libs/controller/components/security.php b/lib/Cake/Controller/Component/SecurityComponent.php similarity index 100% rename from cake/libs/controller/components/security.php rename to lib/Cake/Controller/Component/SecurityComponent.php diff --git a/cake/libs/controller/components/session.php b/lib/Cake/Controller/Component/SessionComponent.php similarity index 100% rename from cake/libs/controller/components/session.php rename to lib/Cake/Controller/Component/SessionComponent.php diff --git a/lib/Cake/Controller/ComponentCollection.php b/lib/Cake/Controller/ComponentCollection.php index 9aa589566..f17a1f729 100644 --- a/lib/Cake/Controller/ComponentCollection.php +++ b/lib/Cake/Controller/ComponentCollection.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('ObjectCollection', 'Core'); +App::uses('ObjectCollection', 'Utility'); class ComponentCollection extends ObjectCollection { @@ -70,13 +70,8 @@ class ComponentCollection extends ObjectCollection { return $this->_loaded[$name]; } $componentClass = $name . 'Component'; + App::uses($componentClass, 'Controller/Component'); if (!class_exists($componentClass)) { - if (!App::import('Component', $component)) { - throw new MissingComponentFileException(array( - 'file' => Inflector::underscore($component) . '.php', - 'class' => $componentClass - )); - } if (!class_exists($componentClass)) { throw new MissingComponentFileException(array( 'file' => Inflector::underscore($component) . '.php', diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index a5c1ba8a1..21fce12ee 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -21,7 +21,7 @@ /** * Include files */ -App::uses('CakeResponse', 'Core'); +App::uses('CakeResponse', 'Network'); App::uses('ClassRegistry', 'Core'); App::uses('ComponentCollection', 'Controller'); App::uses('View', 'View'); diff --git a/cake/libs/cake_response.php b/lib/Cake/Network/CakeResponse.php similarity index 100% rename from cake/libs/cake_response.php rename to lib/Cake/Network/CakeResponse.php diff --git a/cake/libs/object_collection.php b/lib/Cake/Utility/ObjectCollection.php similarity index 100% rename from cake/libs/object_collection.php rename to lib/Cake/Utility/ObjectCollection.php From c641baaf161c013e5b60e54576836663045c7243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 02:49:44 -0430 Subject: [PATCH 012/214] Loading component classes ang beginnings of session loading --- .../component.php => lib/Cake/Controller/Component.php | 0 lib/Cake/Controller/Component/SessionComponent.php | 2 +- lib/Cake/Controller/ComponentCollection.php | 1 + cake/libs/cake_session.php => lib/Cake/Model/CakeSession.php | 0 4 files changed, 2 insertions(+), 1 deletion(-) rename cake/libs/controller/component.php => lib/Cake/Controller/Component.php (100%) rename cake/libs/cake_session.php => lib/Cake/Model/CakeSession.php (100%) diff --git a/cake/libs/controller/component.php b/lib/Cake/Controller/Component.php similarity index 100% rename from cake/libs/controller/component.php rename to lib/Cake/Controller/Component.php diff --git a/lib/Cake/Controller/Component/SessionComponent.php b/lib/Cake/Controller/Component/SessionComponent.php index 9406e9447..855cbcd20 100644 --- a/lib/Cake/Controller/Component/SessionComponent.php +++ b/lib/Cake/Controller/Component/SessionComponent.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('CakeSession', 'Core'); +App::uses('CakeSession', 'Model'); /** * Session Component. diff --git a/lib/Cake/Controller/ComponentCollection.php b/lib/Cake/Controller/ComponentCollection.php index f17a1f729..fa4226b63 100644 --- a/lib/Cake/Controller/ComponentCollection.php +++ b/lib/Cake/Controller/ComponentCollection.php @@ -17,6 +17,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('ObjectCollection', 'Utility'); +App::uses('Component', 'Controller'); class ComponentCollection extends ObjectCollection { diff --git a/cake/libs/cake_session.php b/lib/Cake/Model/CakeSession.php similarity index 100% rename from cake/libs/cake_session.php rename to lib/Cake/Model/CakeSession.php From ec93152c9a069268dfaf6c7bea9651cf237f2b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 02:51:42 -0430 Subject: [PATCH 013/214] Loading the set class successfully --- lib/Cake/Model/CakeSession.php | 2 ++ cake/libs/set.php => lib/Cake/Utility/Set.php | 0 2 files changed, 2 insertions(+) rename cake/libs/set.php => lib/Cake/Utility/Set.php (100%) diff --git a/lib/Cake/Model/CakeSession.php b/lib/Cake/Model/CakeSession.php index 5c078c7dd..df323a60e 100644 --- a/lib/Cake/Model/CakeSession.php +++ b/lib/Cake/Model/CakeSession.php @@ -23,6 +23,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Set', 'Utility'); + /** * Session class for Cake. * diff --git a/cake/libs/set.php b/lib/Cake/Utility/Set.php similarity index 100% rename from cake/libs/set.php rename to lib/Cake/Utility/Set.php From fa83ecda5bacc4ae6cfe3704ff30bd5164800571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 02:57:20 -0430 Subject: [PATCH 014/214] Beginnings of model loading --- lib/Cake/Controller/Controller.php | 2 +- lib/Cake/Core/App.php | 4 +--- cake/libs/model/model.php => lib/Cake/Model/Model.php | 0 .../class_registry.php => lib/Cake/Utility/ClassRegistry.php | 0 lib/Cake/Utility/Set.php | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) rename cake/libs/model/model.php => lib/Cake/Model/Model.php (100%) rename cake/libs/class_registry.php => lib/Cake/Utility/ClassRegistry.php (100%) diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index 21fce12ee..ffa3e14eb 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -22,7 +22,7 @@ * Include files */ App::uses('CakeResponse', 'Network'); -App::uses('ClassRegistry', 'Core'); +App::uses('ClassRegistry', 'Utility'); App::uses('ComponentCollection', 'Controller'); App::uses('View', 'View'); diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index a363ad407..4242a47d9 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -733,9 +733,7 @@ class App { switch ($load) { case 'model': - if (!class_exists('Model')) { - require LIBS . 'model' . DS . 'model.php'; - } + App::uses('Model', 'Model'); if (!class_exists('AppModel')) { App::import($type, 'AppModel', false); } diff --git a/cake/libs/model/model.php b/lib/Cake/Model/Model.php similarity index 100% rename from cake/libs/model/model.php rename to lib/Cake/Model/Model.php diff --git a/cake/libs/class_registry.php b/lib/Cake/Utility/ClassRegistry.php similarity index 100% rename from cake/libs/class_registry.php rename to lib/Cake/Utility/ClassRegistry.php diff --git a/lib/Cake/Utility/Set.php b/lib/Cake/Utility/Set.php index 7a86facdf..95b499161 100644 --- a/lib/Cake/Utility/Set.php +++ b/lib/Cake/Utility/Set.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('String', 'Core'); +App::uses('String', 'Utility'); /** * Class used for manipulation of arrays. From 4bb6d583b76a7fb6325f851effb6230c9d8103f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 03:00:03 -0430 Subject: [PATCH 015/214] More work towards model loading --- .../Cake/Model/BehaviorCollection.php | 0 .../Cake/Model/ConnectionManager.php | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename cake/libs/model/behavior_collection.php => lib/Cake/Model/BehaviorCollection.php (100%) rename cake/libs/model/connection_manager.php => lib/Cake/Model/ConnectionManager.php (100%) diff --git a/cake/libs/model/behavior_collection.php b/lib/Cake/Model/BehaviorCollection.php similarity index 100% rename from cake/libs/model/behavior_collection.php rename to lib/Cake/Model/BehaviorCollection.php diff --git a/cake/libs/model/connection_manager.php b/lib/Cake/Model/ConnectionManager.php similarity index 100% rename from cake/libs/model/connection_manager.php rename to lib/Cake/Model/ConnectionManager.php From 592abb569c6b71805bd426e74208dc08981df3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 11:16:42 -0430 Subject: [PATCH 016/214] More work towards loading datasources --- lib/Cake/Model/ConnectionManager.php | 3 ++- .../datasource.php => lib/Cake/Model/Datasource/DataSource.php | 0 .../dbo_source.php => lib/Cake/Model/Datasource/DboSource.php | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename cake/libs/model/datasources/datasource.php => lib/Cake/Model/Datasource/DataSource.php (100%) rename cake/libs/model/datasources/dbo_source.php => lib/Cake/Model/Datasource/DboSource.php (100%) diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index 59dd5d37f..e07371a03 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('DataSource', 'Model/Datasource'); + /** * Manages loaded instances of DataSource objects * @@ -101,7 +103,6 @@ class ConnectionManager { $conn = $_this->_connectionsEnum[$name]; $class = $conn['classname']; - require LIBS . 'model' . DS . 'datasources' . DS . 'datasource.php'; if ($_this->loadDataSource($name) === null) { trigger_error(sprintf(__("ConnectionManager::getDataSource - Could not load class %s"), $class), E_USER_ERROR); $null = null; diff --git a/cake/libs/model/datasources/datasource.php b/lib/Cake/Model/Datasource/DataSource.php similarity index 100% rename from cake/libs/model/datasources/datasource.php rename to lib/Cake/Model/Datasource/DataSource.php diff --git a/cake/libs/model/datasources/dbo_source.php b/lib/Cake/Model/Datasource/DboSource.php similarity index 100% rename from cake/libs/model/datasources/dbo_source.php rename to lib/Cake/Model/Datasource/DboSource.php From be1263d4760238c290016dce621c082666de7cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 11:52:23 -0430 Subject: [PATCH 017/214] Moving the first database driver to the correct folder to start testing --- lib/Cake/Model/ConnectionManager.php | 9 +++------ .../Cake/Model/Datasource/Database/Mysql.php | 0 2 files changed, 3 insertions(+), 6 deletions(-) rename cake/libs/model/datasources/dbo/dbo_mysql.php => lib/Cake/Model/Datasource/Database/Mysql.php (100%) diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index e07371a03..b6ff55252 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -165,14 +165,11 @@ class ConnectionManager { return false; } - if (!empty($conn['parent'])) { - $_this->loadDataSource($conn['parent']); - } - $conn = array_merge(array('plugin' => null, 'classname' => null, 'parent' => null), $conn); - $class = "{$conn['plugin']}.{$conn['classname']}"; + $class = trim("{$conn['plugin']}.{$conn['classname']}", '.'); - if (!App::import('Datasource', $class, !is_null($conn['plugin']))) { + App::uses($class, 'Model/Datasource'); + if (class_exists($class)) { trigger_error(sprintf(__('ConnectionManager::loadDataSource - Unable to import DataSource class %s'), $class), E_USER_ERROR); return null; } diff --git a/cake/libs/model/datasources/dbo/dbo_mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php similarity index 100% rename from cake/libs/model/datasources/dbo/dbo_mysql.php rename to lib/Cake/Model/Datasource/Database/Mysql.php From 7dc8d5e74678b56ce7958511897a8170857478ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 12:24:15 -0430 Subject: [PATCH 018/214] Simplifying datasources loading, it now requires datasources to be configured with the 'datasource' array key, which is a relative path from Model/Datasource/ --- lib/Cake/Model/ConnectionManager.php | 49 +++++++------------- lib/Cake/Model/Datasource/Database/Mysql.php | 4 +- 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index b6ff55252..4f67db5f5 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -161,15 +161,20 @@ class ConnectionManager { $conn = $_this->_connectionsEnum[$connName]; } - if (class_exists($conn['classname'])) { + if (class_exists($conn['classname'], false)) { return false; } - $conn = array_merge(array('plugin' => null, 'classname' => null, 'parent' => null), $conn); - $class = trim("{$conn['plugin']}.{$conn['classname']}", '.'); + $plugin = $package = null; + if (!empty($conn['plugin'])) { + $plugin .= '.'; + } + if (!empty($conn['package'])) { + $package = '/' . $conn['package']; + } - App::uses($class, 'Model/Datasource'); - if (class_exists($class)) { + App::uses($conn['classname'], $plugin . 'Model/Datasource' . $package); + if (!class_exists($conn['classname'])) { trigger_error(sprintf(__('ConnectionManager::loadDataSource - Unable to import DataSource class %s'), $class), E_USER_ERROR); return null; } @@ -230,36 +235,14 @@ class ConnectionManager { * @return array An indexed array with: filename, classname, plugin and parent */ private function __connectionData($config) { - if (!isset($config['datasource'])) { - $config['datasource'] = 'dbo'; - } - $filename = $classname = $parent = $plugin = null; + $package = $classname = $plugin = null; - if (!empty($config['driver'])) { - $parent = $this->__connectionData(array('datasource' => $config['datasource'])); - $parentSource = preg_replace('/_source$/', '', $parent['filename']); - - list($plugin, $classname) = pluginSplit($config['driver']); - if ($plugin) { - $source = Inflector::underscore($classname); - } else { - $source = $parentSource . '_' . $config['driver']; - $classname = Inflector::camelize(strtolower($source)); - } - $filename = $parentSource . DS . $source; - } else { - list($plugin, $classname) = pluginSplit($config['datasource']); - if ($plugin) { - $filename = Inflector::underscore($classname); - } else { - $filename = Inflector::underscore($config['datasource']); - } - if (substr($filename, -7) != '_source') { - $filename .= '_source'; - } - $classname = Inflector::camelize(strtolower($filename)); + list($plugin, $classname) = pluginSplit($config['datasource']); + if (strpos($classname, '/') !== false) { + $package = dirname($classname); + $classname = basename($classname); } - return compact('filename', 'classname', 'parent', 'plugin'); + return compact('package', 'classname', 'plugin'); } /** diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index 069cf089a..882aa61e0 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('DboSource', 'Model/Datasource'); + /** * MySQL DBO driver object * @@ -26,7 +28,7 @@ * @package cake * @subpackage cake.cake.libs.model.datasources.dbo */ -class DboMysql extends DboSource { +class Mysql extends DboSource { /** * Datasource description From be9bcb3627c81575b701419bd8fbc27e63c66ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 13:31:04 -0430 Subject: [PATCH 019/214] Moving view clasess to their new home --- cake/libs/view/helper.php => lib/Cake/View/Helper.php | 0 .../helpers/app_helper.php => lib/Cake/View/Helper/AppHelper.php | 0 .../helpers/cache.php => lib/Cake/View/Helper/CacheHelper.php | 0 .../view/helpers/form.php => lib/Cake/View/Helper/FormHelper.php | 0 .../view/helpers/html.php => lib/Cake/View/Helper/HtmlHelper.php | 0 .../Cake/View/Helper/JqueryEngineHelper.php | 0 .../libs/view/helpers/js.php => lib/Cake/View/Helper/JsHelper.php | 0 .../Cake/View/Helper/MootoolsEngineHelper.php | 0 .../helpers/number.php => lib/Cake/View/Helper/NumberHelper.php | 0 .../paginator.php => lib/Cake/View/Helper/PaginatorHelper.php | 0 .../Cake/View/Helper/PrototypeEngineHelper.php | 0 .../view/helpers/rss.php => lib/Cake/View/Helper/RssHelper.php | 0 .../helpers/session.php => lib/Cake/View/Helper/SessionHelper.php | 0 .../view/helpers/text.php => lib/Cake/View/Helper/TextHelper.php | 0 .../view/helpers/time.php => lib/Cake/View/Helper/TimeHelper.php | 0 .../helper_collection.php => lib/Cake/View/HelperCollection.php | 0 cake/libs/view/media.php => lib/Cake/View/MediaView.php | 0 cake/libs/view/theme.php => lib/Cake/View/ThemeView.php | 0 cake/libs/view/view.php => lib/Cake/View/View.php | 0 19 files changed, 0 insertions(+), 0 deletions(-) rename cake/libs/view/helper.php => lib/Cake/View/Helper.php (100%) rename cake/libs/view/helpers/app_helper.php => lib/Cake/View/Helper/AppHelper.php (100%) rename cake/libs/view/helpers/cache.php => lib/Cake/View/Helper/CacheHelper.php (100%) rename cake/libs/view/helpers/form.php => lib/Cake/View/Helper/FormHelper.php (100%) rename cake/libs/view/helpers/html.php => lib/Cake/View/Helper/HtmlHelper.php (100%) rename cake/libs/view/helpers/jquery_engine.php => lib/Cake/View/Helper/JqueryEngineHelper.php (100%) rename cake/libs/view/helpers/js.php => lib/Cake/View/Helper/JsHelper.php (100%) rename cake/libs/view/helpers/mootools_engine.php => lib/Cake/View/Helper/MootoolsEngineHelper.php (100%) rename cake/libs/view/helpers/number.php => lib/Cake/View/Helper/NumberHelper.php (100%) rename cake/libs/view/helpers/paginator.php => lib/Cake/View/Helper/PaginatorHelper.php (100%) rename cake/libs/view/helpers/prototype_engine.php => lib/Cake/View/Helper/PrototypeEngineHelper.php (100%) rename cake/libs/view/helpers/rss.php => lib/Cake/View/Helper/RssHelper.php (100%) rename cake/libs/view/helpers/session.php => lib/Cake/View/Helper/SessionHelper.php (100%) rename cake/libs/view/helpers/text.php => lib/Cake/View/Helper/TextHelper.php (100%) rename cake/libs/view/helpers/time.php => lib/Cake/View/Helper/TimeHelper.php (100%) rename cake/libs/view/helper_collection.php => lib/Cake/View/HelperCollection.php (100%) rename cake/libs/view/media.php => lib/Cake/View/MediaView.php (100%) rename cake/libs/view/theme.php => lib/Cake/View/ThemeView.php (100%) rename cake/libs/view/view.php => lib/Cake/View/View.php (100%) diff --git a/cake/libs/view/helper.php b/lib/Cake/View/Helper.php similarity index 100% rename from cake/libs/view/helper.php rename to lib/Cake/View/Helper.php diff --git a/cake/libs/view/helpers/app_helper.php b/lib/Cake/View/Helper/AppHelper.php similarity index 100% rename from cake/libs/view/helpers/app_helper.php rename to lib/Cake/View/Helper/AppHelper.php diff --git a/cake/libs/view/helpers/cache.php b/lib/Cake/View/Helper/CacheHelper.php similarity index 100% rename from cake/libs/view/helpers/cache.php rename to lib/Cake/View/Helper/CacheHelper.php diff --git a/cake/libs/view/helpers/form.php b/lib/Cake/View/Helper/FormHelper.php similarity index 100% rename from cake/libs/view/helpers/form.php rename to lib/Cake/View/Helper/FormHelper.php diff --git a/cake/libs/view/helpers/html.php b/lib/Cake/View/Helper/HtmlHelper.php similarity index 100% rename from cake/libs/view/helpers/html.php rename to lib/Cake/View/Helper/HtmlHelper.php diff --git a/cake/libs/view/helpers/jquery_engine.php b/lib/Cake/View/Helper/JqueryEngineHelper.php similarity index 100% rename from cake/libs/view/helpers/jquery_engine.php rename to lib/Cake/View/Helper/JqueryEngineHelper.php diff --git a/cake/libs/view/helpers/js.php b/lib/Cake/View/Helper/JsHelper.php similarity index 100% rename from cake/libs/view/helpers/js.php rename to lib/Cake/View/Helper/JsHelper.php diff --git a/cake/libs/view/helpers/mootools_engine.php b/lib/Cake/View/Helper/MootoolsEngineHelper.php similarity index 100% rename from cake/libs/view/helpers/mootools_engine.php rename to lib/Cake/View/Helper/MootoolsEngineHelper.php diff --git a/cake/libs/view/helpers/number.php b/lib/Cake/View/Helper/NumberHelper.php similarity index 100% rename from cake/libs/view/helpers/number.php rename to lib/Cake/View/Helper/NumberHelper.php diff --git a/cake/libs/view/helpers/paginator.php b/lib/Cake/View/Helper/PaginatorHelper.php similarity index 100% rename from cake/libs/view/helpers/paginator.php rename to lib/Cake/View/Helper/PaginatorHelper.php diff --git a/cake/libs/view/helpers/prototype_engine.php b/lib/Cake/View/Helper/PrototypeEngineHelper.php similarity index 100% rename from cake/libs/view/helpers/prototype_engine.php rename to lib/Cake/View/Helper/PrototypeEngineHelper.php diff --git a/cake/libs/view/helpers/rss.php b/lib/Cake/View/Helper/RssHelper.php similarity index 100% rename from cake/libs/view/helpers/rss.php rename to lib/Cake/View/Helper/RssHelper.php diff --git a/cake/libs/view/helpers/session.php b/lib/Cake/View/Helper/SessionHelper.php similarity index 100% rename from cake/libs/view/helpers/session.php rename to lib/Cake/View/Helper/SessionHelper.php diff --git a/cake/libs/view/helpers/text.php b/lib/Cake/View/Helper/TextHelper.php similarity index 100% rename from cake/libs/view/helpers/text.php rename to lib/Cake/View/Helper/TextHelper.php diff --git a/cake/libs/view/helpers/time.php b/lib/Cake/View/Helper/TimeHelper.php similarity index 100% rename from cake/libs/view/helpers/time.php rename to lib/Cake/View/Helper/TimeHelper.php diff --git a/cake/libs/view/helper_collection.php b/lib/Cake/View/HelperCollection.php similarity index 100% rename from cake/libs/view/helper_collection.php rename to lib/Cake/View/HelperCollection.php diff --git a/cake/libs/view/media.php b/lib/Cake/View/MediaView.php similarity index 100% rename from cake/libs/view/media.php rename to lib/Cake/View/MediaView.php diff --git a/cake/libs/view/theme.php b/lib/Cake/View/ThemeView.php similarity index 100% rename from cake/libs/view/theme.php rename to lib/Cake/View/ThemeView.php diff --git a/cake/libs/view/view.php b/lib/Cake/View/View.php similarity index 100% rename from cake/libs/view/view.php rename to lib/Cake/View/View.php From f3eb2159eb5790a3de7b809865b703aac5458332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 13:40:24 -0430 Subject: [PATCH 020/214] Making helpers load --- lib/Cake/View/Helper/CacheHelper.php | 2 ++ lib/Cake/View/Helper/FormHelper.php | 2 ++ lib/Cake/View/Helper/HtmlHelper.php | 3 +++ lib/Cake/View/Helper/JsHelper.php | 1 + lib/Cake/View/Helper/MootoolsEngineHelper.php | 1 + lib/Cake/View/Helper/NumberHelper.php | 2 ++ lib/Cake/View/Helper/PaginatorHelper.php | 2 ++ lib/Cake/View/Helper/PrototypeEngineHelper.php | 1 + lib/Cake/View/Helper/RssHelper.php | 4 +++- lib/Cake/View/Helper/SessionHelper.php | 7 ++++--- lib/Cake/View/Helper/TextHelper.php | 3 ++- lib/Cake/View/Helper/TimeHelper.php | 2 ++ lib/Cake/View/HelperCollection.php | 17 +++++------------ lib/Cake/View/View.php | 1 - 14 files changed, 30 insertions(+), 18 deletions(-) diff --git a/lib/Cake/View/Helper/CacheHelper.php b/lib/Cake/View/Helper/CacheHelper.php index 6a1c430ea..d69c4b8f1 100644 --- a/lib/Cake/View/Helper/CacheHelper.php +++ b/lib/Cake/View/Helper/CacheHelper.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * CacheHelper helps create full page view caching. * diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 0fe0e0ad2..efce3d6a1 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * Form helper library. * diff --git a/lib/Cake/View/Helper/HtmlHelper.php b/lib/Cake/View/Helper/HtmlHelper.php index 2509e8d56..cacc7f1ee 100644 --- a/lib/Cake/View/Helper/HtmlHelper.php +++ b/lib/Cake/View/Helper/HtmlHelper.php @@ -17,6 +17,9 @@ * @since CakePHP(tm) v 0.9.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +App::uses('AppHelper', 'View/Helper'); + /** * Html Helper class for easy use of HTML widgets. * diff --git a/lib/Cake/View/Helper/JsHelper.php b/lib/Cake/View/Helper/JsHelper.php index a8a91adb8..7a605b423 100644 --- a/lib/Cake/View/Helper/JsHelper.php +++ b/lib/Cake/View/Helper/JsHelper.php @@ -18,6 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); App::uses('Multibyte', 'Core'); /** diff --git a/lib/Cake/View/Helper/MootoolsEngineHelper.php b/lib/Cake/View/Helper/MootoolsEngineHelper.php index ec226d500..d513527b1 100644 --- a/lib/Cake/View/Helper/MootoolsEngineHelper.php +++ b/lib/Cake/View/Helper/MootoolsEngineHelper.php @@ -25,6 +25,7 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + App::uses('JsHelper', 'Helper'); class MootoolsEngineHelper extends JsBaseEngineHelper { diff --git a/lib/Cake/View/Helper/NumberHelper.php b/lib/Cake/View/Helper/NumberHelper.php index b7d612471..dfd404ee7 100644 --- a/lib/Cake/View/Helper/NumberHelper.php +++ b/lib/Cake/View/Helper/NumberHelper.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * Number helper library. * diff --git a/lib/Cake/View/Helper/PaginatorHelper.php b/lib/Cake/View/Helper/PaginatorHelper.php index 5816c6b6a..dca0562eb 100644 --- a/lib/Cake/View/Helper/PaginatorHelper.php +++ b/lib/Cake/View/Helper/PaginatorHelper.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * Pagination Helper class for easy generation of pagination links. * diff --git a/lib/Cake/View/Helper/PrototypeEngineHelper.php b/lib/Cake/View/Helper/PrototypeEngineHelper.php index 779fb5c45..8781ba880 100644 --- a/lib/Cake/View/Helper/PrototypeEngineHelper.php +++ b/lib/Cake/View/Helper/PrototypeEngineHelper.php @@ -20,6 +20,7 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + App::uses('JsHelper', 'Helper'); class PrototypeEngineHelper extends JsBaseEngineHelper { diff --git a/lib/Cake/View/Helper/RssHelper.php b/lib/Cake/View/Helper/RssHelper.php index d85eb7a23..17ebe8628 100644 --- a/lib/Cake/View/Helper/RssHelper.php +++ b/lib/Cake/View/Helper/RssHelper.php @@ -17,7 +17,9 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Xml', 'Core'); + +App::uses('AppHelper', 'View/Helper'); +App::uses('Xml', 'Utility'); /** * RSS Helper class for easy output RSS structures. diff --git a/lib/Cake/View/Helper/SessionHelper.php b/lib/Cake/View/Helper/SessionHelper.php index 0f6aa002d..997e2c422 100644 --- a/lib/Cake/View/Helper/SessionHelper.php +++ b/lib/Cake/View/Helper/SessionHelper.php @@ -17,9 +17,10 @@ * @since CakePHP(tm) v 1.1.7.3328 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('CakeSession')) { - require LIBS . 'cake_session.php'; -} + +App::uses('AppHelper', 'View/Helper'); +App::uses('CakeSession', 'Model'); + /** * Session Helper. * diff --git a/lib/Cake/View/Helper/TextHelper.php b/lib/Cake/View/Helper/TextHelper.php index c87455035..11b04c0a2 100644 --- a/lib/Cake/View/Helper/TextHelper.php +++ b/lib/Cake/View/Helper/TextHelper.php @@ -24,8 +24,9 @@ * Included libraries. * */ +App::uses('AppHelper', 'View/Helper'); App::uses('HtmlHelper', 'Helper'); -App::uses('Multibyte', 'Core'); +App::uses('Multibyte', 'Utility'); /** * Text helper library. diff --git a/lib/Cake/View/Helper/TimeHelper.php b/lib/Cake/View/Helper/TimeHelper.php index df1a34051..4c1d8aec3 100644 --- a/lib/Cake/View/Helper/TimeHelper.php +++ b/lib/Cake/View/Helper/TimeHelper.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * Time Helper class for easy use of time data. * diff --git a/lib/Cake/View/HelperCollection.php b/lib/Cake/View/HelperCollection.php index 66200a44b..99e709c03 100644 --- a/lib/Cake/View/HelperCollection.php +++ b/lib/Cake/View/HelperCollection.php @@ -54,19 +54,12 @@ class HelperCollection extends ObjectCollection { return $this->_loaded[$name]; } $helperClass = $name . 'Helper'; + App::uses($helperClass, 'View/Helper'); if (!class_exists($helperClass)) { - if (!App::import('Helper', $helper)) { - throw new MissingHelperFileException(array( - 'class' => $helperClass, - 'file' => Inflector::underscore($name) . '.php' - )); - } - if (!class_exists($helperClass)) { - throw new MissingHelperClassException(array( - 'class' => $helperClass, - 'file' => Inflector::underscore($name) . '.php' - )); - } + throw new MissingHelperClassException(array( + 'class' => $helperClass, + 'file' => Inflector::underscore($name) . '.php' + )); } $this->_loaded[$name] = new $helperClass($this->_View, $settings); diff --git a/lib/Cake/View/View.php b/lib/Cake/View/View.php index a9b5481e5..9ca29b464 100644 --- a/lib/Cake/View/View.php +++ b/lib/Cake/View/View.php @@ -22,7 +22,6 @@ * Included libraries. */ App::uses('HelperCollection', 'View'); -App::uses('Helper', 'View'); /** * View, the V in the MVC triad. From 6b40c9c85426b2228311dace1536282a607881b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 13:45:07 -0430 Subject: [PATCH 021/214] Moving I18n related classes to the new folder schema --- cake/libs/validation.php | 2 +- .../Controller/Component/EmailComponent.php | 2 +- cake/libs/i18n.php => lib/Cake/I18n/I18n.php | 0 cake/libs/l10n.php => lib/Cake/I18n/L10n.php | 0 .../Cake/I18n/Multibyte.php | 0 lib/Cake/View/Helper/JsHelper.php | 2 +- lib/Cake/View/Helper/TextHelper.php | 2 +- lib/Cake/basics.php | 28 +++++-------------- 8 files changed, 11 insertions(+), 25 deletions(-) rename cake/libs/i18n.php => lib/Cake/I18n/I18n.php (100%) rename cake/libs/l10n.php => lib/Cake/I18n/L10n.php (100%) rename cake/libs/multibyte.php => lib/Cake/I18n/Multibyte.php (100%) diff --git a/cake/libs/validation.php b/cake/libs/validation.php index 00e7e8fe1..d4db77ed2 100644 --- a/cake/libs/validation.php +++ b/cake/libs/validation.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Multibyte', 'Core'); +App::uses('Multibyte', 'I18n'); /** * Offers different validation methods. diff --git a/lib/Cake/Controller/Component/EmailComponent.php b/lib/Cake/Controller/Component/EmailComponent.php index 965084589..47ab6775b 100755 --- a/lib/Cake/Controller/Component/EmailComponent.php +++ b/lib/Cake/Controller/Component/EmailComponent.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.3467 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Multibyte', 'Core'); +App::uses('Multibyte', 'I18n'); /** * EmailComponent diff --git a/cake/libs/i18n.php b/lib/Cake/I18n/I18n.php similarity index 100% rename from cake/libs/i18n.php rename to lib/Cake/I18n/I18n.php diff --git a/cake/libs/l10n.php b/lib/Cake/I18n/L10n.php similarity index 100% rename from cake/libs/l10n.php rename to lib/Cake/I18n/L10n.php diff --git a/cake/libs/multibyte.php b/lib/Cake/I18n/Multibyte.php similarity index 100% rename from cake/libs/multibyte.php rename to lib/Cake/I18n/Multibyte.php diff --git a/lib/Cake/View/Helper/JsHelper.php b/lib/Cake/View/Helper/JsHelper.php index 7a605b423..e07c5779c 100644 --- a/lib/Cake/View/Helper/JsHelper.php +++ b/lib/Cake/View/Helper/JsHelper.php @@ -19,7 +19,7 @@ */ App::uses('AppHelper', 'View/Helper'); -App::uses('Multibyte', 'Core'); +App::uses('Multibyte', 'I18n'); /** * Javascript Generator helper class for easy use of JavaScript. diff --git a/lib/Cake/View/Helper/TextHelper.php b/lib/Cake/View/Helper/TextHelper.php index 11b04c0a2..1d836ae70 100644 --- a/lib/Cake/View/Helper/TextHelper.php +++ b/lib/Cake/View/Helper/TextHelper.php @@ -26,7 +26,7 @@ */ App::uses('AppHelper', 'View/Helper'); App::uses('HtmlHelper', 'Helper'); -App::uses('Multibyte', 'Utility'); +App::uses('Multibyte', 'I18n'); /** * Text helper library. diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php index ca935acde..1b1fbc5a5 100644 --- a/lib/Cake/basics.php +++ b/lib/Cake/basics.php @@ -469,9 +469,7 @@ if (!function_exists('sortByKey')) { if (!$singular) { return; } - if (!class_exists('I18n')) { - App::import('Core', 'i18n'); - } + App::uses('I18n', 'I18n'); return I18n::translate($singular); } @@ -489,9 +487,7 @@ if (!function_exists('sortByKey')) { if (!$singular) { return; } - if (!class_exists('I18n')) { - App::import('Core', 'i18n'); - } + App::uses('I18n', 'I18n'); return I18n::translate($singular, $plural, null, 6, $count); } @@ -507,9 +503,7 @@ if (!function_exists('sortByKey')) { if (!$msg) { return; } - if (!class_exists('I18n')) { - App::import('Core', 'i18n'); - } + App::uses('I18n', 'I18n'); return I18n::translate($msg, null, $domain); } @@ -529,9 +523,7 @@ if (!function_exists('sortByKey')) { if (!$singular) { return; } - if (!class_exists('I18n')) { - App::import('Core', 'i18n'); - } + App::uses('I18n', 'I18n'); return I18n::translate($singular, $plural, $domain, 6, $count); } @@ -562,9 +554,7 @@ if (!function_exists('sortByKey')) { if (!$msg) { return; } - if (!class_exists('I18n')) { - App::import('Core', 'i18n'); - } + App::uses('I18n', 'I18n'); return I18n::translate($msg, null, $domain, $category); } @@ -599,9 +589,7 @@ if (!function_exists('sortByKey')) { if (!$singular) { return; } - if (!class_exists('I18n')) { - App::import('Core', 'i18n'); - } + App::uses('I18n', 'I18n'); return I18n::translate($singular, $plural, $domain, $category, $count); } @@ -628,9 +616,7 @@ if (!function_exists('sortByKey')) { if (!$msg) { return; } - if (!class_exists('I18n')) { - App::import('Core', 'i18n'); - } + App::uses('I18n', 'I18n'); return I18n::translate($msg, null, null, $category); } From ff8b1a10413c34781a52e2a6fa1b0d6df6569fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 13:50:26 -0430 Subject: [PATCH 022/214] Stating to move loggers to the new folder --- lib/Cake/Error/ErrorHandler.php | 7 +------ lib/Cake/I18n/I18n.php | 4 ++-- cake/libs/cake_log.php => lib/Cake/Log/CakeLog.php | 0 .../log/file_log.php => lib/Cake/Log/Engine/FileLog.php | 0 4 files changed, 3 insertions(+), 8 deletions(-) rename cake/libs/cake_log.php => lib/Cake/Log/CakeLog.php (100%) rename cake/libs/log/file_log.php => lib/Cake/Log/Engine/FileLog.php (100%) diff --git a/lib/Cake/Error/ErrorHandler.php b/lib/Cake/Error/ErrorHandler.php index 732b6328d..7dcdb6931 100644 --- a/lib/Cake/Error/ErrorHandler.php +++ b/lib/Cake/Error/ErrorHandler.php @@ -21,6 +21,7 @@ */ App::uses('Debugger', 'Utility'); +App::uses('CakeLog', 'Log'); /** * @@ -109,9 +110,6 @@ class ErrorHandler { App::import('Core', 'error/ExceptionRenderer'); $config = Configure::read('Exception'); if (!empty($config['log'])) { - if (!class_exists('CakeLog')) { - require LIBS . 'cake_log.php'; - } CakeLog::write(LOG_ERR, '[' . get_class($exception) . '] ' . $exception->getMessage()); } if ($config['renderer'] !== 'ExceptionRenderer') { @@ -158,9 +156,6 @@ class ErrorHandler { ); return Debugger::getInstance()->outputError($data); } else { - if (!class_exists('CakeLog')) { - require LIBS . 'cake_log.php'; - } $message = $error . ' (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']'; if (!empty($errorConfig['trace'])) { $trace = Debugger::trace(array('start' => 1, 'format' => 'log')); diff --git a/lib/Cake/I18n/I18n.php b/lib/Cake/I18n/I18n.php index bab553d1a..b85d9b75b 100644 --- a/lib/Cake/I18n/I18n.php +++ b/lib/Cake/I18n/I18n.php @@ -21,8 +21,8 @@ /** * Included libraries. */ -App::uses('L10n', 'Core'); -App::uses('Multibyte', 'Core'); +App::uses('L10n', 'I18n'); +App::uses('Multibyte', 'I18n'); /** * I18n handles translation of Text and time format strings. diff --git a/cake/libs/cake_log.php b/lib/Cake/Log/CakeLog.php similarity index 100% rename from cake/libs/cake_log.php rename to lib/Cake/Log/CakeLog.php diff --git a/cake/libs/log/file_log.php b/lib/Cake/Log/Engine/FileLog.php similarity index 100% rename from cake/libs/log/file_log.php rename to lib/Cake/Log/Engine/FileLog.php From 80452397b6a65619b7d6d43914e5b1d546f25f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 13:56:26 -0430 Subject: [PATCH 023/214] Changing the way loggers are loaded, this will probable need some changes on userland --- lib/Cake/Log/CakeLog.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/Cake/Log/CakeLog.php b/lib/Cake/Log/CakeLog.php index f1c5b32cf..f09f9c79b 100644 --- a/lib/Cake/Log/CakeLog.php +++ b/lib/Cake/Log/CakeLog.php @@ -124,15 +124,9 @@ class CakeLog { * @return mixed boolean false on any failures, string of classname to use if search was successful. */ protected static function _getLogger($loggerName) { - list($plugin, $loggerName) = pluginSplit($loggerName); + list($plugin, $loggerName) = pluginSplit($loggerName, true); - if ($plugin) { - App::import('Lib', $plugin . '.log/' . $loggerName); - } else { - if (!App::import('Lib', 'log/' . $loggerName)) { - App::import('Core', 'log/' . $loggerName); - } - } + App::uses($loggerName, $plugin . 'Log/Engine'); if (!class_exists($loggerName)) { throw new Exception(sprintf(__('Could not load class %s'), $loggerName)); } @@ -165,9 +159,7 @@ class CakeLog { * @return void */ protected static function _autoConfig() { - if (!class_exists('FileLog')) { - App::import('Core', 'log/FileLog'); - } + self::_getLogger('FileLog'); self::$_streams['default'] = new FileLog(array('path' => LOGS)); } From e3f85ccda895e49e6a642f4256a365a7d45b468f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 14:06:30 -0430 Subject: [PATCH 024/214] loading the ExceptionRenderer --- lib/Cake/Error/ErrorHandler.php | 2 +- .../Cake/Error/ExceptionRenderer.php | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename cake/libs/error/exception_renderer.php => lib/Cake/Error/ExceptionRenderer.php (100%) diff --git a/lib/Cake/Error/ErrorHandler.php b/lib/Cake/Error/ErrorHandler.php index 7dcdb6931..5124136c2 100644 --- a/lib/Cake/Error/ErrorHandler.php +++ b/lib/Cake/Error/ErrorHandler.php @@ -22,6 +22,7 @@ App::uses('Debugger', 'Utility'); App::uses('CakeLog', 'Log'); +App::uses('ExceptionRenderer', 'Error'); /** * @@ -107,7 +108,6 @@ class ErrorHandler { * @see http://php.net/manual/en/function.set-exception-handler.php */ public static function handleException(Exception $exception) { - App::import('Core', 'error/ExceptionRenderer'); $config = Configure::read('Exception'); if (!empty($config['log'])) { CakeLog::write(LOG_ERR, '[' . get_class($exception) . '] ' . $exception->getMessage()); diff --git a/cake/libs/error/exception_renderer.php b/lib/Cake/Error/ExceptionRenderer.php similarity index 100% rename from cake/libs/error/exception_renderer.php rename to lib/Cake/Error/ExceptionRenderer.php From e425b68a867cbd9a4532bd7c4677131ae6155ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 15:11:15 -0430 Subject: [PATCH 025/214] Loading the CakeErrorController --- .../Cake/Controller/CakeErrorController.php | 0 lib/Cake/Error/ExceptionRenderer.php | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename cake/libs/controller/cake_error_controller.php => lib/Cake/Controller/CakeErrorController.php (100%) diff --git a/cake/libs/controller/cake_error_controller.php b/lib/Cake/Controller/CakeErrorController.php similarity index 100% rename from cake/libs/controller/cake_error_controller.php rename to lib/Cake/Controller/CakeErrorController.php diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index 0d6c71b83..1ea26c502 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -141,7 +141,7 @@ class ExceptionRenderer { */ protected function _getController($exception) { static $__previousError = null; - App::import('Controller', 'CakeError'); + App::uses('CakeErrorController', 'Controller'); if ($__previousError != $exception) { $__previousError = $exception; From 377cbc546b1f204f5b8070f22ef8f367be97acdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 22:06:53 -0430 Subject: [PATCH 026/214] Fixing some errors in loading view classes --- .../Cake/Controller/AppController.php | 0 lib/Cake/Core/App.php | 2 +- lib/Cake/Core/Object.php | 2 ++ lib/Cake/View/Helper/PaginatorHelper.php | 4 +--- 4 files changed, 4 insertions(+), 4 deletions(-) rename cake/libs/controller/app_controller.php => lib/Cake/Controller/AppController.php (100%) diff --git a/cake/libs/controller/app_controller.php b/lib/Cake/Controller/AppController.php similarity index 100% rename from cake/libs/controller/app_controller.php rename to lib/Cake/Controller/AppController.php diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 4242a47d9..eb7d0319f 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -609,7 +609,7 @@ class App { } if (empty(self::$__paths)) { - //self::$__paths = Cache::read('dir_map', '_cake_core_'); + self::$__paths = Cache::read('dir_map', '_cake_core_'); } foreach (self::$search as $path) { diff --git a/lib/Cake/Core/Object.php b/lib/Cake/Core/Object.php index 0f1d49030..e1f232728 100644 --- a/lib/Cake/Core/Object.php +++ b/lib/Cake/Core/Object.php @@ -21,6 +21,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Set', 'Utility'); + /** * Object class provides a few generic methods used in several subclasses. * diff --git a/lib/Cake/View/Helper/PaginatorHelper.php b/lib/Cake/View/Helper/PaginatorHelper.php index dca0562eb..7d19d4753 100644 --- a/lib/Cake/View/Helper/PaginatorHelper.php +++ b/lib/Cake/View/Helper/PaginatorHelper.php @@ -96,9 +96,7 @@ class PaginatorHelper extends AppHelper { $ajaxProvider = isset($settings['ajax']) ? $settings['ajax'] : 'Js'; $this->helpers[] = $ajaxProvider; $this->_ajaxHelperClass = $ajaxProvider; - if (!class_exists($ajaxProvider . 'Helper')) { - App::import('Helper', $ajaxProvider); - } + App::uses($ajaxProvider . 'Helper', 'View/Helper'); $classname = $ajaxProvider . 'Helper'; if (!method_exists($classname, 'link')) { throw new Exception(sprintf( From 02495188ef6203a5f2cfc84f945e029308f11ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 4 Dec 2010 22:59:55 -0430 Subject: [PATCH 027/214] Moving the pages controller --- .../Cake/Controller/PagesController.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cake/libs/controller/pages_controller.php => lib/Cake/Controller/PagesController.php (100%) diff --git a/cake/libs/controller/pages_controller.php b/lib/Cake/Controller/PagesController.php similarity index 100% rename from cake/libs/controller/pages_controller.php rename to lib/Cake/Controller/PagesController.php From fcd23b09789b7daab393e2346a0b50c418c18c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 5 Dec 2010 10:54:42 -0430 Subject: [PATCH 028/214] Starting to change the class loading for app classes --- lib/Cake/Controller/PagesController.php | 2 + lib/Cake/Core/App.php | 62 ++++++++++--------- .../Cake/Model/AppModel.php | 0 lib/Cake/Routing/Dispatcher.php | 12 ++-- lib/Cake/Utility/ClassRegistry.php | 13 ++-- lib/Cake/View/View.php | 2 +- lib/Cake/bootstrap.php | 2 + 7 files changed, 51 insertions(+), 42 deletions(-) rename cake/libs/model/app_model.php => lib/Cake/Model/AppModel.php (100%) diff --git a/lib/Cake/Controller/PagesController.php b/lib/Cake/Controller/PagesController.php index bc7a380e7..60d9e0290 100644 --- a/lib/Cake/Controller/PagesController.php +++ b/lib/Cake/Controller/PagesController.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppController', 'Controller'); + /** * Static content controller * diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index eb7d0319f..b85aa9921 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -207,6 +207,12 @@ class App { */ private static $__classMap = array(); +/** + * Holds the possible paths for each package name + * + */ + private static $__packages = array(); + /** * Used to read information stored path * @@ -218,10 +224,10 @@ class App { * @return string array */ public static function path($type) { - if (!isset(self::${$type})) { + if (!isset(self::$__packages[$type])) { return array(); } - return self::${$type}; + return self::$__packages[$type]; } /** @@ -234,14 +240,14 @@ class App { */ public static function build($paths = array(), $reset = false) { $defaults = array( - 'models' => array(MODELS), - 'behaviors' => array(BEHAVIORS), - 'datasources' => array(MODELS . 'datasources'), - 'controllers' => array(CONTROLLERS), - 'components' => array(COMPONENTS), + 'Model' => array(MODELS), + 'Model/Behavior' => array(BEHAVIORS), + 'Datasource' => array(MODELS . 'datasources'), + 'Controller' => array(CONTROLLERS), + 'Controller/Component' => array(COMPONENTS), 'libs' => array(APPLIBS), - 'views' => array(VIEWS), - 'helpers' => array(HELPERS), + 'View' => array(VIEWS), + 'View/Helper' => array(HELPERS), 'locales' => array(APP . 'locale' . DS), 'shells' => array( APP . 'console' . DS . 'shells' . DS, @@ -254,7 +260,7 @@ class App { if ($reset == true) { foreach ($paths as $type => $new) { - self::${$type} = (array)$new; + self::$__packages[$type] = (array)$new; } return $paths; } @@ -263,27 +269,19 @@ class App { $app = array('models' => true, 'controllers' => true, 'helpers' => true); foreach ($defaults as $type => $default) { - $merge = array(); - if (isset($app[$type])) { - $merge = array(APP); - } - if (isset($core[$type])) { - $merge = array_merge($merge, (array)$core[$type]); - } - - if (empty(self::${$type}) || empty($paths)) { - self::${$type} = $default; + if (empty(self::$__packages[$type]) || empty($paths)) { + self::$__packages[$type] = $default; } if (!empty($paths[$type])) { $path = array_flip(array_flip(array_merge( - (array)$paths[$type], self::${$type}, $merge + (array)$paths[$type], self::$__packages[$type], $merge ))); - self::${$type} = array_values($path); + self::$__packages[$type] = array_values($path); } else { - $path = array_flip(array_flip(array_merge(self::${$type}, $merge))); - self::${$type} = array_values($path); + $path = array_flip(array_flip(self::$__packages[$type])); + self::$__packages[$type] = array_values($path); } } } @@ -442,9 +440,15 @@ class App { public static function load($className) { if (isset(self::$__classMap[$className])) { - $file = LIBS . self::$__classMap[$className] . DS . $className . '.php'; - if (file_exists($file)) { - return include $file; + $package = self::$__classMap[$className]; + $paths = self::path($package); + $paths[] = LIBS . self::$__classMap[$className] . DS; + + foreach ($paths as $path) { + $file = $path . $className . '.php'; + if (file_exists($file)) { + return include $file; + } } } return false; @@ -900,6 +904,4 @@ class App { Cache::write('object_map', self::$__objects, '_cake_core_'); } } -} - -spl_autoload_register(array('App', 'load')); \ No newline at end of file +} \ No newline at end of file diff --git a/cake/libs/model/app_model.php b/lib/Cake/Model/AppModel.php similarity index 100% rename from cake/libs/model/app_model.php rename to lib/Cake/Model/AppModel.php diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index 1fd36319c..251b56f6e 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -223,10 +223,7 @@ class Dispatcher { if (!$ctrlClass) { return false; } - $ctrlClass .= 'Controller'; - if (class_exists($ctrlClass)) { - return new $ctrlClass($request); - } + return new $ctrlClass($request); } /** @@ -245,8 +242,11 @@ class Dispatcher { $controller = Inflector::camelize($request->params['controller']); } if ($pluginPath . $controller) { - if (App::import('Controller', $pluginPath . $controller)) { - return $controller; + $class = $controller . 'Controller'; + App::uses('AppController', 'Controller'); + App::uses($class, $pluginPath . 'Controller'); + if (class_exists($class)) { + return $class; } } return false; diff --git a/lib/Cake/Utility/ClassRegistry.php b/lib/Cake/Utility/ClassRegistry.php index cc2ebeb3b..a80abdc98 100644 --- a/lib/Cake/Utility/ClassRegistry.php +++ b/lib/Cake/Utility/ClassRegistry.php @@ -134,14 +134,17 @@ class ClassRegistry { return $model; } - if (class_exists($class) || App::import($type, $pluginPath . $class)) { + App::uses('Model', 'Model'); + App::uses('AppModel', 'Model'); + App::uses($class, $pluginPath . $type); + if (class_exists($class)) { ${$class} = new $class($settings); } elseif ($type === 'Model') { - if ($plugin && class_exists($plugin . 'AppModel')) { - $appModel = $plugin . 'AppModel'; - } else { + //if ($plugin && class_exists($plugin . 'AppModel')) { + // $appModel = $plugin . 'AppModel'; + //} else { $appModel = 'AppModel'; - } + //} $settings['name'] = $class; ${$class} = new $appModel($settings); } diff --git a/lib/Cake/View/View.php b/lib/Cake/View/View.php index 9ca29b464..c080ccc65 100644 --- a/lib/Cake/View/View.php +++ b/lib/Cake/View/View.php @@ -799,7 +799,7 @@ class View extends Object { return $this->__paths; } $paths = array(); - $viewPaths = App::path('views'); + $viewPaths = App::path('View'); $corePaths = array_flip(App::core('views')); if (!empty($plugin)) { diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index 1e649440e..f7ca698e3 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -222,6 +222,8 @@ require LIBS . 'basics.php'; require LIBS . 'Core' . DS .'App.php'; require LIBS . 'Error' . DS . 'exceptions.php'; +spl_autoload_register(array('App', 'load')); + App::uses('ErrorHandler', 'Error'); App::uses('Configure', 'Core'); App::uses('Cache', 'Cache'); From 0596f5a2453b1d3de72856c5c0e8dc04e71ffcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 5 Dec 2010 12:00:36 -0430 Subject: [PATCH 029/214] Adding cache support for class loader --- lib/Cake/Core/App.php | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index b85aa9921..fb4bdb9b3 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -440,6 +440,11 @@ class App { public static function load($className) { if (isset(self::$__classMap[$className])) { + + if ($file = self::__mapped($className)) { + return include $file; + } + $package = self::$__classMap[$className]; $paths = self::path($package); $paths[] = LIBS . self::$__classMap[$className] . DS; @@ -447,6 +452,7 @@ class App { foreach ($paths as $path) { $file = $path . $className . '.php'; if (file_exists($file)) { + self::__map($file, $className); return include $file; } } @@ -678,16 +684,15 @@ class App { * * @param string $file full path to file * @param string $name unique name for this map - * @param string $type type object being mapped * @param string $plugin camelized if object is from a plugin, the name of the plugin * @return void * @access private */ - private static function __map($file, $name, $type, $plugin) { + private static function __map($file, $name, $plugin = null) { if ($plugin) { - self::$__map['Plugin'][$plugin][$type][$name] = $file; + self::$__map['Plugin'][$plugin][$name] = $file; } else { - self::$__map[$type][$name] = $file; + self::$__map[$name] = $file; } } @@ -695,21 +700,20 @@ class App { * Returns a file's complete path. * * @param string $name unique name - * @param string $type type object * @param string $plugin camelized if object is from a plugin, the name of the plugin * @return mixed, file path if found, false otherwise * @access private */ - private static function __mapped($name, $type, $plugin) { + private static function __mapped($name, $plugin = null) { if ($plugin) { - if (isset(self::$__map['Plugin'][$plugin][$type]) && isset(self::$__map['Plugin'][$plugin][$type][$name])) { - return self::$__map['Plugin'][$plugin][$type][$name]; + if (isset(self::$__map['Plugin'][$plugin][$name])) { + return self::$__map['Plugin'][$plugin][$name]; } return false; } - if (isset(self::$__map[$type]) && isset(self::$__map[$type][$name])) { - return self::$__map[$type][$name]; + if (isset(self::$__map[$name])) { + return self::$__map[$name]; } return false; } @@ -897,9 +901,6 @@ class App { */ public static function shutdown() { if (self::$__cache) { - $core = App::core('cake'); - unset(self::$__paths[rtrim($core[0], DS)]); - Cache::write('dir_map', array_filter(self::$__paths), '_cake_core_'); Cache::write('file_map', array_filter(self::$__map), '_cake_core_'); Cache::write('object_map', self::$__objects, '_cake_core_'); } From c542ac20c9940e147e3bd02278e26b8f4c9a75ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 5 Dec 2010 13:07:01 -0430 Subject: [PATCH 030/214] Moving core view to the new folder and allowing the view class to find those views --- lib/Cake/Core/App.php | 4 ++-- lib/Cake/Utility/ClassRegistry.php | 8 ++++---- .../view/scaffold.php => lib/Cake/View/ScaffoldView.php | 0 lib/Cake/View/View.php | 3 ++- .../Cake/View}/elements/email/html/default.ctp | 0 .../Cake/View}/elements/email/text/default.ctp | 0 .../Cake/View}/elements/exception_stack_trace.ctp | 0 {cake/libs/view => lib/Cake/View}/elements/sql_dump.ctp | 0 {cake/libs/view => lib/Cake/View}/errors/error400.ctp | 0 {cake/libs/view => lib/Cake/View}/errors/error500.ctp | 0 .../libs/view => lib/Cake/View}/errors/missing_action.ctp | 0 .../Cake/View}/errors/missing_behavior_class.ctp | 0 .../Cake/View}/errors/missing_behavior_file.ctp | 0 .../Cake/View}/errors/missing_component_class.ctp | 0 .../Cake/View}/errors/missing_component_file.ctp | 0 .../view => lib/Cake/View}/errors/missing_connection.ctp | 0 .../view => lib/Cake/View}/errors/missing_controller.ctp | 0 .../view => lib/Cake/View}/errors/missing_database.ctp | 0 .../Cake/View}/errors/missing_helper_class.ctp | 0 .../view => lib/Cake/View}/errors/missing_helper_file.ctp | 0 .../libs/view => lib/Cake/View}/errors/missing_layout.ctp | 0 .../libs/view => lib/Cake/View}/errors/missing_table.ctp | 0 {cake/libs/view => lib/Cake/View}/errors/missing_view.ctp | 0 .../libs/view => lib/Cake/View}/errors/private_action.ctp | 0 .../libs/view => lib/Cake/View}/errors/scaffold_error.ctp | 0 {cake/libs/view => lib/Cake/View}/layouts/ajax.ctp | 0 {cake/libs/view => lib/Cake/View}/layouts/default.ctp | 0 .../view => lib/Cake/View}/layouts/email/html/default.ctp | 0 .../view => lib/Cake/View}/layouts/email/text/default.ctp | 0 {cake/libs/view => lib/Cake/View}/layouts/flash.ctp | 0 {cake/libs/view => lib/Cake/View}/layouts/js/default.ctp | 0 {cake/libs/view => lib/Cake/View}/layouts/rss/default.ctp | 0 {cake/libs/view => lib/Cake/View}/layouts/xml/default.ctp | 0 {cake/libs/view => lib/Cake/View}/pages/home.ctp | 0 {cake/libs/view => lib/Cake/View}/scaffolds/edit.ctp | 0 {cake/libs/view => lib/Cake/View}/scaffolds/index.ctp | 0 {cake/libs/view => lib/Cake/View}/scaffolds/view.ctp | 0 37 files changed, 8 insertions(+), 7 deletions(-) rename cake/libs/view/scaffold.php => lib/Cake/View/ScaffoldView.php (100%) rename {cake/libs/view => lib/Cake/View}/elements/email/html/default.ctp (100%) rename {cake/libs/view => lib/Cake/View}/elements/email/text/default.ctp (100%) rename {cake/libs/view => lib/Cake/View}/elements/exception_stack_trace.ctp (100%) rename {cake/libs/view => lib/Cake/View}/elements/sql_dump.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/error400.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/error500.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_action.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_behavior_class.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_behavior_file.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_component_class.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_component_file.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_connection.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_controller.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_database.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_helper_class.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_helper_file.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_layout.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_table.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/missing_view.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/private_action.ctp (100%) rename {cake/libs/view => lib/Cake/View}/errors/scaffold_error.ctp (100%) rename {cake/libs/view => lib/Cake/View}/layouts/ajax.ctp (100%) rename {cake/libs/view => lib/Cake/View}/layouts/default.ctp (100%) rename {cake/libs/view => lib/Cake/View}/layouts/email/html/default.ctp (100%) rename {cake/libs/view => lib/Cake/View}/layouts/email/text/default.ctp (100%) rename {cake/libs/view => lib/Cake/View}/layouts/flash.ctp (100%) rename {cake/libs/view => lib/Cake/View}/layouts/js/default.ctp (100%) rename {cake/libs/view => lib/Cake/View}/layouts/rss/default.ctp (100%) rename {cake/libs/view => lib/Cake/View}/layouts/xml/default.ctp (100%) rename {cake/libs/view => lib/Cake/View}/pages/home.ctp (100%) rename {cake/libs/view => lib/Cake/View}/scaffolds/edit.ctp (100%) rename {cake/libs/view => lib/Cake/View}/scaffolds/index.ctp (100%) rename {cake/libs/view => lib/Cake/View}/scaffolds/view.ctp (100%) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index fb4bdb9b3..6f04c7798 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -330,7 +330,7 @@ class App { static $paths = false; if (!$paths) { $paths = array(); - $libs = dirname(__FILE__) . DS; + $libs = LIBS; $cake = dirname($libs) . DS; $path = dirname($cake) . DS; @@ -341,7 +341,7 @@ class App { $paths['behaviors'][] = $libs . 'model' . DS . 'behaviors' . DS; $paths['controllers'][] = $libs . 'controller' . DS; $paths['components'][] = $libs . 'controller' . DS . 'components' . DS; - $paths['views'][] = $libs . 'view' . DS; + $paths['views'][] = $libs . 'View' . DS; $paths['helpers'][] = $libs . 'view' . DS . 'helpers' . DS; $paths['plugins'][] = $path . 'plugins' . DS; $paths['vendors'][] = $path . 'vendors' . DS; diff --git a/lib/Cake/Utility/ClassRegistry.php b/lib/Cake/Utility/ClassRegistry.php index a80abdc98..9762462ea 100644 --- a/lib/Cake/Utility/ClassRegistry.php +++ b/lib/Cake/Utility/ClassRegistry.php @@ -140,11 +140,11 @@ class ClassRegistry { if (class_exists($class)) { ${$class} = new $class($settings); } elseif ($type === 'Model') { - //if ($plugin && class_exists($plugin . 'AppModel')) { - // $appModel = $plugin . 'AppModel'; - //} else { + if ($plugin && class_exists($plugin . 'AppModel')) { + $appModel = $plugin . 'AppModel'; + } else { $appModel = 'AppModel'; - //} + } $settings['name'] = $class; ${$class} = new $appModel($settings); } diff --git a/cake/libs/view/scaffold.php b/lib/Cake/View/ScaffoldView.php similarity index 100% rename from cake/libs/view/scaffold.php rename to lib/Cake/View/ScaffoldView.php diff --git a/lib/Cake/View/View.php b/lib/Cake/View/View.php index c080ccc65..b0676d666 100644 --- a/lib/Cake/View/View.php +++ b/lib/Cake/View/View.php @@ -811,7 +811,8 @@ class View extends Object { } $paths[] = App::pluginPath($plugin) . 'views' . DS; } - $this->__paths = array_merge($paths, $viewPaths); + + $this->__paths = array_merge($paths, $viewPaths, array_flip($corePaths)); return $this->__paths; } } diff --git a/cake/libs/view/elements/email/html/default.ctp b/lib/Cake/View/elements/email/html/default.ctp similarity index 100% rename from cake/libs/view/elements/email/html/default.ctp rename to lib/Cake/View/elements/email/html/default.ctp diff --git a/cake/libs/view/elements/email/text/default.ctp b/lib/Cake/View/elements/email/text/default.ctp similarity index 100% rename from cake/libs/view/elements/email/text/default.ctp rename to lib/Cake/View/elements/email/text/default.ctp diff --git a/cake/libs/view/elements/exception_stack_trace.ctp b/lib/Cake/View/elements/exception_stack_trace.ctp similarity index 100% rename from cake/libs/view/elements/exception_stack_trace.ctp rename to lib/Cake/View/elements/exception_stack_trace.ctp diff --git a/cake/libs/view/elements/sql_dump.ctp b/lib/Cake/View/elements/sql_dump.ctp similarity index 100% rename from cake/libs/view/elements/sql_dump.ctp rename to lib/Cake/View/elements/sql_dump.ctp diff --git a/cake/libs/view/errors/error400.ctp b/lib/Cake/View/errors/error400.ctp similarity index 100% rename from cake/libs/view/errors/error400.ctp rename to lib/Cake/View/errors/error400.ctp diff --git a/cake/libs/view/errors/error500.ctp b/lib/Cake/View/errors/error500.ctp similarity index 100% rename from cake/libs/view/errors/error500.ctp rename to lib/Cake/View/errors/error500.ctp diff --git a/cake/libs/view/errors/missing_action.ctp b/lib/Cake/View/errors/missing_action.ctp similarity index 100% rename from cake/libs/view/errors/missing_action.ctp rename to lib/Cake/View/errors/missing_action.ctp diff --git a/cake/libs/view/errors/missing_behavior_class.ctp b/lib/Cake/View/errors/missing_behavior_class.ctp similarity index 100% rename from cake/libs/view/errors/missing_behavior_class.ctp rename to lib/Cake/View/errors/missing_behavior_class.ctp diff --git a/cake/libs/view/errors/missing_behavior_file.ctp b/lib/Cake/View/errors/missing_behavior_file.ctp similarity index 100% rename from cake/libs/view/errors/missing_behavior_file.ctp rename to lib/Cake/View/errors/missing_behavior_file.ctp diff --git a/cake/libs/view/errors/missing_component_class.ctp b/lib/Cake/View/errors/missing_component_class.ctp similarity index 100% rename from cake/libs/view/errors/missing_component_class.ctp rename to lib/Cake/View/errors/missing_component_class.ctp diff --git a/cake/libs/view/errors/missing_component_file.ctp b/lib/Cake/View/errors/missing_component_file.ctp similarity index 100% rename from cake/libs/view/errors/missing_component_file.ctp rename to lib/Cake/View/errors/missing_component_file.ctp diff --git a/cake/libs/view/errors/missing_connection.ctp b/lib/Cake/View/errors/missing_connection.ctp similarity index 100% rename from cake/libs/view/errors/missing_connection.ctp rename to lib/Cake/View/errors/missing_connection.ctp diff --git a/cake/libs/view/errors/missing_controller.ctp b/lib/Cake/View/errors/missing_controller.ctp similarity index 100% rename from cake/libs/view/errors/missing_controller.ctp rename to lib/Cake/View/errors/missing_controller.ctp diff --git a/cake/libs/view/errors/missing_database.ctp b/lib/Cake/View/errors/missing_database.ctp similarity index 100% rename from cake/libs/view/errors/missing_database.ctp rename to lib/Cake/View/errors/missing_database.ctp diff --git a/cake/libs/view/errors/missing_helper_class.ctp b/lib/Cake/View/errors/missing_helper_class.ctp similarity index 100% rename from cake/libs/view/errors/missing_helper_class.ctp rename to lib/Cake/View/errors/missing_helper_class.ctp diff --git a/cake/libs/view/errors/missing_helper_file.ctp b/lib/Cake/View/errors/missing_helper_file.ctp similarity index 100% rename from cake/libs/view/errors/missing_helper_file.ctp rename to lib/Cake/View/errors/missing_helper_file.ctp diff --git a/cake/libs/view/errors/missing_layout.ctp b/lib/Cake/View/errors/missing_layout.ctp similarity index 100% rename from cake/libs/view/errors/missing_layout.ctp rename to lib/Cake/View/errors/missing_layout.ctp diff --git a/cake/libs/view/errors/missing_table.ctp b/lib/Cake/View/errors/missing_table.ctp similarity index 100% rename from cake/libs/view/errors/missing_table.ctp rename to lib/Cake/View/errors/missing_table.ctp diff --git a/cake/libs/view/errors/missing_view.ctp b/lib/Cake/View/errors/missing_view.ctp similarity index 100% rename from cake/libs/view/errors/missing_view.ctp rename to lib/Cake/View/errors/missing_view.ctp diff --git a/cake/libs/view/errors/private_action.ctp b/lib/Cake/View/errors/private_action.ctp similarity index 100% rename from cake/libs/view/errors/private_action.ctp rename to lib/Cake/View/errors/private_action.ctp diff --git a/cake/libs/view/errors/scaffold_error.ctp b/lib/Cake/View/errors/scaffold_error.ctp similarity index 100% rename from cake/libs/view/errors/scaffold_error.ctp rename to lib/Cake/View/errors/scaffold_error.ctp diff --git a/cake/libs/view/layouts/ajax.ctp b/lib/Cake/View/layouts/ajax.ctp similarity index 100% rename from cake/libs/view/layouts/ajax.ctp rename to lib/Cake/View/layouts/ajax.ctp diff --git a/cake/libs/view/layouts/default.ctp b/lib/Cake/View/layouts/default.ctp similarity index 100% rename from cake/libs/view/layouts/default.ctp rename to lib/Cake/View/layouts/default.ctp diff --git a/cake/libs/view/layouts/email/html/default.ctp b/lib/Cake/View/layouts/email/html/default.ctp similarity index 100% rename from cake/libs/view/layouts/email/html/default.ctp rename to lib/Cake/View/layouts/email/html/default.ctp diff --git a/cake/libs/view/layouts/email/text/default.ctp b/lib/Cake/View/layouts/email/text/default.ctp similarity index 100% rename from cake/libs/view/layouts/email/text/default.ctp rename to lib/Cake/View/layouts/email/text/default.ctp diff --git a/cake/libs/view/layouts/flash.ctp b/lib/Cake/View/layouts/flash.ctp similarity index 100% rename from cake/libs/view/layouts/flash.ctp rename to lib/Cake/View/layouts/flash.ctp diff --git a/cake/libs/view/layouts/js/default.ctp b/lib/Cake/View/layouts/js/default.ctp similarity index 100% rename from cake/libs/view/layouts/js/default.ctp rename to lib/Cake/View/layouts/js/default.ctp diff --git a/cake/libs/view/layouts/rss/default.ctp b/lib/Cake/View/layouts/rss/default.ctp similarity index 100% rename from cake/libs/view/layouts/rss/default.ctp rename to lib/Cake/View/layouts/rss/default.ctp diff --git a/cake/libs/view/layouts/xml/default.ctp b/lib/Cake/View/layouts/xml/default.ctp similarity index 100% rename from cake/libs/view/layouts/xml/default.ctp rename to lib/Cake/View/layouts/xml/default.ctp diff --git a/cake/libs/view/pages/home.ctp b/lib/Cake/View/pages/home.ctp similarity index 100% rename from cake/libs/view/pages/home.ctp rename to lib/Cake/View/pages/home.ctp diff --git a/cake/libs/view/scaffolds/edit.ctp b/lib/Cake/View/scaffolds/edit.ctp similarity index 100% rename from cake/libs/view/scaffolds/edit.ctp rename to lib/Cake/View/scaffolds/edit.ctp diff --git a/cake/libs/view/scaffolds/index.ctp b/lib/Cake/View/scaffolds/index.ctp similarity index 100% rename from cake/libs/view/scaffolds/index.ctp rename to lib/Cake/View/scaffolds/index.ctp diff --git a/cake/libs/view/scaffolds/view.ctp b/lib/Cake/View/scaffolds/view.ctp similarity index 100% rename from cake/libs/view/scaffolds/view.ctp rename to lib/Cake/View/scaffolds/view.ctp From b19b25a78872d6bf06f0eaba28daf4b23972638d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 5 Dec 2010 13:21:28 -0430 Subject: [PATCH 031/214] Moving some spare clases to the corresponding packages --- .../controller/scaffold.php => lib/Cake/Controller/Scaffold.php | 0 cake/libs/cake_socket.php => lib/Cake/Network/CakeSocket.php | 0 cake/libs/http_socket.php => lib/Cake/Network/HttpSocket.php | 0 cake/libs/file.php => lib/Cake/Utility/File.php | 0 cake/libs/magic_db.php => lib/Cake/Utility/MagicDb.php | 0 cake/libs/sanitize.php => lib/Cake/Utility/Sanitize.php | 0 cake/libs/security.php => lib/Cake/Utility/Security.php | 0 cake/libs/validation.php => lib/Cake/Utility/Validation.php | 0 cake/libs/xml.php => lib/Cake/Utility/Xml.php | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename cake/libs/controller/scaffold.php => lib/Cake/Controller/Scaffold.php (100%) rename cake/libs/cake_socket.php => lib/Cake/Network/CakeSocket.php (100%) rename cake/libs/http_socket.php => lib/Cake/Network/HttpSocket.php (100%) rename cake/libs/file.php => lib/Cake/Utility/File.php (100%) rename cake/libs/magic_db.php => lib/Cake/Utility/MagicDb.php (100%) rename cake/libs/sanitize.php => lib/Cake/Utility/Sanitize.php (100%) rename cake/libs/security.php => lib/Cake/Utility/Security.php (100%) rename cake/libs/validation.php => lib/Cake/Utility/Validation.php (100%) rename cake/libs/xml.php => lib/Cake/Utility/Xml.php (100%) diff --git a/cake/libs/controller/scaffold.php b/lib/Cake/Controller/Scaffold.php similarity index 100% rename from cake/libs/controller/scaffold.php rename to lib/Cake/Controller/Scaffold.php diff --git a/cake/libs/cake_socket.php b/lib/Cake/Network/CakeSocket.php similarity index 100% rename from cake/libs/cake_socket.php rename to lib/Cake/Network/CakeSocket.php diff --git a/cake/libs/http_socket.php b/lib/Cake/Network/HttpSocket.php similarity index 100% rename from cake/libs/http_socket.php rename to lib/Cake/Network/HttpSocket.php diff --git a/cake/libs/file.php b/lib/Cake/Utility/File.php similarity index 100% rename from cake/libs/file.php rename to lib/Cake/Utility/File.php diff --git a/cake/libs/magic_db.php b/lib/Cake/Utility/MagicDb.php similarity index 100% rename from cake/libs/magic_db.php rename to lib/Cake/Utility/MagicDb.php diff --git a/cake/libs/sanitize.php b/lib/Cake/Utility/Sanitize.php similarity index 100% rename from cake/libs/sanitize.php rename to lib/Cake/Utility/Sanitize.php diff --git a/cake/libs/security.php b/lib/Cake/Utility/Security.php similarity index 100% rename from cake/libs/security.php rename to lib/Cake/Utility/Security.php diff --git a/cake/libs/validation.php b/lib/Cake/Utility/Validation.php similarity index 100% rename from cake/libs/validation.php rename to lib/Cake/Utility/Validation.php diff --git a/cake/libs/xml.php b/lib/Cake/Utility/Xml.php similarity index 100% rename from cake/libs/xml.php rename to lib/Cake/Utility/Xml.php From 2fed702c5787efbbfb6f4f918b319deea0bae212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 5 Dec 2010 15:00:02 -0430 Subject: [PATCH 032/214] Moving more model classes to the new package --- cake/libs/model/cake_schema.php => lib/Cake/Model/CakeSchema.php | 0 .../dbo_mssql.php => lib/Cake/Model/Datasource/Database/Mssql.php | 0 .../Cake/Model/Datasource/Database/Oracle.php | 0 .../Cake/Model/Datasource/Database/Postgres.php | 0 .../Cake/Model/Datasource/Database/Sqlite.php | 0 cake/libs/model/db_acl.php => lib/Cake/Model/DbAcl.php | 0 .../model/model_behavior.php => lib/Cake/Model/ModelBehavior.php | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename cake/libs/model/cake_schema.php => lib/Cake/Model/CakeSchema.php (100%) rename cake/libs/model/datasources/dbo/dbo_mssql.php => lib/Cake/Model/Datasource/Database/Mssql.php (100%) rename cake/libs/model/datasources/dbo/dbo_oracle.php => lib/Cake/Model/Datasource/Database/Oracle.php (100%) rename cake/libs/model/datasources/dbo/dbo_postgres.php => lib/Cake/Model/Datasource/Database/Postgres.php (100%) rename cake/libs/model/datasources/dbo/dbo_sqlite.php => lib/Cake/Model/Datasource/Database/Sqlite.php (100%) rename cake/libs/model/db_acl.php => lib/Cake/Model/DbAcl.php (100%) rename cake/libs/model/model_behavior.php => lib/Cake/Model/ModelBehavior.php (100%) diff --git a/cake/libs/model/cake_schema.php b/lib/Cake/Model/CakeSchema.php similarity index 100% rename from cake/libs/model/cake_schema.php rename to lib/Cake/Model/CakeSchema.php diff --git a/cake/libs/model/datasources/dbo/dbo_mssql.php b/lib/Cake/Model/Datasource/Database/Mssql.php similarity index 100% rename from cake/libs/model/datasources/dbo/dbo_mssql.php rename to lib/Cake/Model/Datasource/Database/Mssql.php diff --git a/cake/libs/model/datasources/dbo/dbo_oracle.php b/lib/Cake/Model/Datasource/Database/Oracle.php similarity index 100% rename from cake/libs/model/datasources/dbo/dbo_oracle.php rename to lib/Cake/Model/Datasource/Database/Oracle.php diff --git a/cake/libs/model/datasources/dbo/dbo_postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php similarity index 100% rename from cake/libs/model/datasources/dbo/dbo_postgres.php rename to lib/Cake/Model/Datasource/Database/Postgres.php diff --git a/cake/libs/model/datasources/dbo/dbo_sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php similarity index 100% rename from cake/libs/model/datasources/dbo/dbo_sqlite.php rename to lib/Cake/Model/Datasource/Database/Sqlite.php diff --git a/cake/libs/model/db_acl.php b/lib/Cake/Model/DbAcl.php similarity index 100% rename from cake/libs/model/db_acl.php rename to lib/Cake/Model/DbAcl.php diff --git a/cake/libs/model/model_behavior.php b/lib/Cake/Model/ModelBehavior.php similarity index 100% rename from cake/libs/model/model_behavior.php rename to lib/Cake/Model/ModelBehavior.php From 5c0c9841e24ac2283f0c4bf2cd5d4eb44ab601dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 5 Dec 2010 20:38:17 -0430 Subject: [PATCH 033/214] Removing dead code --- lib/Cake/Core/App.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 6f04c7798..2d9003566 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -265,9 +265,6 @@ class App { return $paths; } - $core = self::core(); - $app = array('models' => true, 'controllers' => true, 'helpers' => true); - foreach ($defaults as $type => $default) { if (empty(self::$__packages[$type]) || empty($paths)) { From d311cf237b572d7aed87eb97cc788addfbfafc81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 5 Dec 2010 23:50:05 -0430 Subject: [PATCH 034/214] Moving behaviors --- .../behaviors/acl.php => lib/Cake/Model/Behavior/AclBehavior.php | 0 .../Cake/Model/Behavior/ContainableBehavior.php | 0 .../Cake/Model/Behavior/TranslateBehavior.php | 0 .../tree.php => lib/Cake/Model/Behavior/TreeBehavior.php | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename cake/libs/model/behaviors/acl.php => lib/Cake/Model/Behavior/AclBehavior.php (100%) rename cake/libs/model/behaviors/containable.php => lib/Cake/Model/Behavior/ContainableBehavior.php (100%) rename cake/libs/model/behaviors/translate.php => lib/Cake/Model/Behavior/TranslateBehavior.php (100%) rename cake/libs/model/behaviors/tree.php => lib/Cake/Model/Behavior/TreeBehavior.php (100%) diff --git a/cake/libs/model/behaviors/acl.php b/lib/Cake/Model/Behavior/AclBehavior.php similarity index 100% rename from cake/libs/model/behaviors/acl.php rename to lib/Cake/Model/Behavior/AclBehavior.php diff --git a/cake/libs/model/behaviors/containable.php b/lib/Cake/Model/Behavior/ContainableBehavior.php similarity index 100% rename from cake/libs/model/behaviors/containable.php rename to lib/Cake/Model/Behavior/ContainableBehavior.php diff --git a/cake/libs/model/behaviors/translate.php b/lib/Cake/Model/Behavior/TranslateBehavior.php similarity index 100% rename from cake/libs/model/behaviors/translate.php rename to lib/Cake/Model/Behavior/TranslateBehavior.php diff --git a/cake/libs/model/behaviors/tree.php b/lib/Cake/Model/Behavior/TreeBehavior.php similarity index 100% rename from cake/libs/model/behaviors/tree.php rename to lib/Cake/Model/Behavior/TreeBehavior.php From 88a4a6609ed2355b5043150067fee6d364b21a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Mon, 6 Dec 2010 00:10:56 -0430 Subject: [PATCH 035/214] Moving the config folder --- cake/config/paths.php | 231 -------------------- {cake/libs => lib/Cake}/config/ini_file.php | 0 2 files changed, 231 deletions(-) delete mode 100644 cake/config/paths.php rename {cake/libs => lib/Cake}/config/ini_file.php (100%) diff --git a/cake/config/paths.php b/cake/config/paths.php deleted file mode 100644 index e8ac21c49..000000000 --- a/cake/config/paths.php +++ /dev/null @@ -1,231 +0,0 @@ - Date: Mon, 6 Dec 2010 09:38:06 -0430 Subject: [PATCH 036/214] A couple of micro-optimizations found using a profileA couple of micro-optimizations found using a profilerr --- lib/Cake/Controller/Controller.php | 11 ++++------- lib/Cake/Model/CakeSession.php | 11 ++++++----- lib/Cake/Utility/Set.php | 9 ++++++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index ed0ac3e6a..7d7c58bb5 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -300,18 +300,15 @@ class Controller extends Object { */ public function __construct($request = null) { if ($this->name === null) { - $r = null; - if (!preg_match('/(.*)Controller/i', get_class($this), $r)) { - echo __("Controller::__construct() : Can not get or parse my own class name, exiting."); - $this->_stop(); - } - $this->name = $r[1]; + $this->name = substr(get_class($this), 0, strlen(get_class($this)) -10); } if ($this->viewPath == null) { $this->viewPath = Inflector::underscore($this->name); } - $this->modelClass = Inflector::classify($this->name); + if (empty($this->uses)) { + $this->modelClass = Inflector::singularize($this->name); + } $this->modelKey = Inflector::underscore($this->modelClass); $this->Components = new ComponentCollection(); diff --git a/lib/Cake/Model/CakeSession.php b/lib/Cake/Model/CakeSession.php index 973a655af..fd67272ad 100644 --- a/lib/Cake/Model/CakeSession.php +++ b/lib/Cake/Model/CakeSession.php @@ -345,11 +345,12 @@ class CakeSession { * @return boolean */ protected static function _validAgentAndTime() { + $config = self::read('Config'); $validAgent = ( Configure::read('Session.checkAgent') === false || - self::$_userAgent == self::read('Config.userAgent') + self::$_userAgent == $config['userAgent'] ); - return ($validAgent && self::$time <= self::read('Config.time')); + return ($validAgent && self::$time <= $config['time']); } /** @@ -672,14 +673,14 @@ class CakeSession { * @return void */ protected static function _checkValid() { - if (self::read('Config')) { + if ($config = self::read('Config')) { $sessionConfig = Configure::read('Session'); if (self::_validAgentAndTime()) { - $time = self::read('Config.time'); + $time = $config['time']; self::write('Config.time', self::$sessionTime); if (isset($sessionConfig['autoRegenerate']) && $sessionConfig['autoRegenerate'] === true) { - $check = self::read('Config.countdown'); + $check = $config['countdown']; $check -= 1; self::write('Config.countdown', $check); diff --git a/lib/Cake/Utility/Set.php b/lib/Cake/Utility/Set.php index 95b499161..37a1836d4 100644 --- a/lib/Cake/Utility/Set.php +++ b/lib/Cake/Utility/Set.php @@ -583,12 +583,14 @@ class Set { return $data; } - if (!is_array($path)) { + if (is_string($path) && strpos($path, '{') !== false) { $path = String::tokenize($path, '.', '{', '}'); + } else { + $path = explode('.', $path); } $tmp = array(); - if (!is_array($path) || empty($path)) { + if (empty($path)) { return null; } @@ -662,11 +664,12 @@ class Set { } $_list =& $list; + $count = count($path); foreach ($path as $i => $key) { if (is_numeric($key) && intval($key) > 0 || $key === '0') { $key = intval($key); } - if ($i === count($path) - 1) { + if ($i === $count - 1) { $_list[$key] = $data; } else { if (!isset($_list[$key])) { From 2ce2ea222cac122b055c285868df11de422efc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Mon, 6 Dec 2010 09:44:43 -0430 Subject: [PATCH 037/214] Moving config readers to their new package --- .../Cake/Configure/IniReader.php | 0 .../Cake/Configure/PhpReader.php | 0 lib/Cake/config/ini_file.php | 101 ------------------ 3 files changed, 101 deletions(-) rename cake/libs/config/ini_reader.php => lib/Cake/Configure/IniReader.php (100%) rename cake/libs/config/php_reader.php => lib/Cake/Configure/PhpReader.php (100%) delete mode 100644 lib/Cake/config/ini_file.php diff --git a/cake/libs/config/ini_reader.php b/lib/Cake/Configure/IniReader.php similarity index 100% rename from cake/libs/config/ini_reader.php rename to lib/Cake/Configure/IniReader.php diff --git a/cake/libs/config/php_reader.php b/lib/Cake/Configure/PhpReader.php similarity index 100% rename from cake/libs/config/php_reader.php rename to lib/Cake/Configure/PhpReader.php diff --git a/lib/Cake/config/ini_file.php b/lib/Cake/config/ini_file.php deleted file mode 100644 index 722dbcb08..000000000 --- a/lib/Cake/config/ini_file.php +++ /dev/null @@ -1,101 +0,0 @@ -_values = $contents[$section]; - } else { - $this->_values = $contents; - } - } - -/** - * Get the contents of the ini file as a plain array. - * - * @return array - */ - public function asArray() { - return $this->_values; - } - -/** - * Part of ArrayAccess implementation. - * - * @param string $name - */ - public function offsetExists($name) { - return isset($this->_values[$name]); - } - -/** - * Part of ArrayAccess implementation. - * - * @param string $name - */ - public function offsetGet($name) { - if (!isset($this->_values[$name])) { - return null; - } - return $this->_values[$name]; - } - -/** - * Part of ArrayAccess implementation. - * - * @param string $name - */ - public function offsetSet($name, $value) { - throw new LogicException('You cannot modify an IniFile parse result.'); - } - -/** - * Part of ArrayAccess implementation. - * - * @param string $name - */ - public function offsetUnset($name) { - unset($this->_values[$name]); - } -} \ No newline at end of file From 66744c68b03cf19cefbb55e2baa0c1a53b9181c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Mon, 6 Dec 2010 22:47:43 -0430 Subject: [PATCH 038/214] Making ConnectionManager an static object instead of a singleton --- lib/Cake/Model/ConnectionManager.php | 109 ++++++++++++++------------- 1 file changed, 57 insertions(+), 52 deletions(-) diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index 9e435902e..de3a4e90c 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -36,7 +36,7 @@ class ConnectionManager { * @var DATABASE_CONFIG * @access public */ - public $config = null; + public static $config = null; /** * Holds instances DataSource objects @@ -44,7 +44,7 @@ class ConnectionManager { * @var array * @access protected */ - protected $_dataSources = array(); + protected static $_dataSources = array(); /** * Contains a list of all file and class names used in Connection settings @@ -52,33 +52,27 @@ class ConnectionManager { * @var array * @access protected */ - protected $_connectionsEnum = array(); + protected static $_connectionsEnum = array(); /** - * Constructor. + * Indicates if the init code for this class has alredy been executed + * + * @var boolean + */ + private static $_init = false; + +/** + * Loads connections configuration. * */ - function __construct() { + private static function init() { include_once CONFIGS . 'database.php'; if (class_exists('DATABASE_CONFIG')) { - $this->config = new DATABASE_CONFIG(); - $this->_getConnectionObjects(); + self::$config = new DATABASE_CONFIG(); + self::_getConnectionObjects(); } - } - -/** - * Gets a reference to the ConnectionManger object instance - * - * @return object Instance - */ - public static function &getInstance() { - static $instance = array(); - - if (!$instance) { - $instance[0] = new ConnectionManager(); - } - - return $instance[0]; + register_shutdown_function('ConnectionManager::shutdown'); + self::$_init = true; } /** @@ -87,32 +81,33 @@ class ConnectionManager { * @param string $name The name of the DataSource, as defined in app/config/database.php * @return object Instance */ - public static function &getDataSource($name) { - $_this = ConnectionManager::getInstance(); + public static function getDataSource($name) { + if (empty(self::$_init)) { + self::init(); + } - if (!empty($_this->_dataSources[$name])) { - $return = $_this->_dataSources[$name]; + if (!empty(self::$_dataSources[$name])) { + $return = self::$_dataSources[$name]; return $return; } - if (empty($_this->_connectionsEnum[$name])) { + if (empty(self::$_connectionsEnum[$name])) { trigger_error(__("ConnectionManager::getDataSource - Non-existent data source %s", $name), E_USER_ERROR); $null = null; return $null; } - $conn = $_this->_connectionsEnum[$name]; + $conn = self::$_connectionsEnum[$name]; $class = $conn['classname']; - if ($_this->loadDataSource($name) === null) { + if (self::loadDataSource($name) === null) { trigger_error(__("ConnectionManager::getDataSource - Could not load class %s", $class), E_USER_ERROR); $null = null; return $null; } - $_this->_dataSources[$name] = new $class($_this->config->{$name}); - $_this->_dataSources[$name]->configKeyName = $name; + self::$_dataSources[$name] = new $class(self::$config->{$name}); + self::$_dataSources[$name]->configKeyName = $name; - $return = $_this->_dataSources[$name]; - return $return; + return self::$_dataSources[$name]; } /** @@ -121,8 +116,10 @@ class ConnectionManager { * @return array List of available connections */ public static function sourceList() { - $_this = ConnectionManager::getInstance(); - return array_keys($_this->_dataSources); + if (empty(self::$_init)) { + self::init(); + } + return array_keys(self::$_dataSources); } /** @@ -135,8 +132,10 @@ class ConnectionManager { * in the ConnectionManager. */ public static function getSourceName(&$source) { - $_this = ConnectionManager::getInstance(); - foreach ($_this->_dataSources as $name => $ds) { + if (empty(self::$_init)) { + self::init(); + } + foreach (self::$_dataSources as $name => $ds) { if ($ds == $source) { return $name; } @@ -153,12 +152,14 @@ class ConnectionManager { * @return boolean True on success, null on failure or false if the class is already loaded */ public static function loadDataSource($connName) { - $_this = ConnectionManager::getInstance(); + if (empty(self::$_init)) { + self::init(); + } if (is_array($connName)) { $conn = $connName; } else { - $conn = $_this->_connectionsEnum[$connName]; + $conn = self::$_connectionsEnum[$connName]; } if (class_exists($conn['classname'], false)) { @@ -188,8 +189,10 @@ class ConnectionManager { * (as defined in Connections), and the value is an array with keys 'filename' and 'classname'. */ public static function enumConnectionObjects() { - $_this = ConnectionManager::getInstance(); - return $_this->_connectionsEnum; + if (empty(self::$_init)) { + self::init(); + } + return self::$_connectionsEnum; } /** @@ -199,16 +202,18 @@ class ConnectionManager { * @param array $config The DataSource configuration settings * @return object A reference to the DataSource object, or null if creation failed */ - public static function &create($name = '', $config = array()) { - $_this = ConnectionManager::getInstance(); + public static function create($name = '', $config = array()) { + if (empty(self::$_init)) { + self::init(); + } - if (empty($name) || empty($config) || array_key_exists($name, $_this->_connectionsEnum)) { + if (empty($name) || empty($config) || array_key_exists($name, self::$_connectionsEnum)) { $null = null; return $null; } - $_this->config->{$name} = $config; - $_this->_connectionsEnum[$name] = $_this->__connectionData($config); - $return = $_this->getDataSource($name); + self::$config->{$name} = $config; + self::$_connectionsEnum[$name] = self::_connectionData($config); + $return = self::getDataSource($name); return $return; } @@ -217,12 +222,12 @@ class ConnectionManager { * * @return void */ - protected function _getConnectionObjects() { - $connections = get_object_vars($this->config); + protected static function _getConnectionObjects() { + $connections = get_object_vars(self::$config); if ($connections != null) { foreach ($connections as $name => $config) { - $this->_connectionsEnum[$name] = $this->__connectionData($config); + self::$_connectionsEnum[$name] = self::_connectionData($config); } } else { throw new MissingConnectionException(array('class' => 'ConnectionManager')); @@ -234,7 +239,7 @@ class ConnectionManager { * * @return array An indexed array with: filename, classname, plugin and parent */ - private function __connectionData($config) { + private static function _connectionData($config) { $package = $classname = $plugin = null; list($plugin, $classname) = pluginSplit($config['datasource']); @@ -249,7 +254,7 @@ class ConnectionManager { * Destructor. * */ - function __destruct() { + public static function shutdown() { if (Configure::read('Session.defaults') == 'database' && function_exists('session_write_close')) { session_write_close(); } From 513eb5342629e9a8767192ed143a0266c6888b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Mon, 6 Dec 2010 22:48:30 -0430 Subject: [PATCH 039/214] Fixing package location in DboSource --- lib/Cake/Model/Datasource/DboSource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 339d4d05f..a11f4fcd8 100755 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('String', 'Core'); +App::uses('String', 'Utility'); /** * DboSource From 1d67d1611c5eddb471ac7bcf163618560c03a907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Mon, 6 Dec 2010 22:49:15 -0430 Subject: [PATCH 040/214] Micro optimizations in Helper class, as those functions are calles very often the may sum up some milliseconds --- lib/Cake/View/Helper.php | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/lib/Cake/View/Helper.php b/lib/Cake/View/Helper.php index 389b3845a..25f62f2be 100644 --- a/lib/Cake/View/Helper.php +++ b/lib/Cake/View/Helper.php @@ -257,11 +257,9 @@ class Helper extends Object { * @return string Path with a timestamp added, or not. */ public function assetTimestamp($path) { - $timestampEnabled = ( - (Configure::read('Asset.timestamp') === true && Configure::read('debug') > 0) || - Configure::read('Asset.timestamp') === 'force' - ); - if (strpos($path, '?') === false && $timestampEnabled) { + $stamp = Configure::read('Asset.timestamp'); + $timestampEnabled = $stamp === 'force' || ($stamp === true && Configure::read('debug') > 0); + if ($timestampEnabled && strpos($path, '?') === false) { $filepath = preg_replace('/^' . preg_quote($this->request->webroot, '/') . '/', '', $path); $webrootPath = WWW_ROOT . str_replace('/', DS, $filepath); if (file_exists($webrootPath)) { @@ -347,18 +345,19 @@ class Helper extends Object { * @return string Composed attributes. */ public function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { - if (is_array($options)) { - $options = array_merge(array('escape' => true), $options); + if (!is_string($options)) { + $options = $options + array('escape' => true); if (!is_array($exclude)) { $exclude = array(); } - $filtered = array_diff_key($options, array_merge(array_flip($exclude), array('escape' => true))); + + $exclude = array('escape' => true) + array_flip($exclude); $escape = $options['escape']; $attributes = array(); - foreach ($filtered as $key => $value) { - if ($value !== false && $value !== null) { + foreach ($options as $key => $value) { + if (!isset($exclude[$key]) && $value !== false && $value !== null) { $attributes[] = $this->__formatAttribute($key, $value, $escape); } } @@ -381,13 +380,20 @@ class Helper extends Object { function __formatAttribute($key, $value, $escape = true) { $attribute = ''; $attributeFormat = '%s="%s"'; - $minimizedAttributes = array('compact', 'checked', 'declare', 'readonly', 'disabled', - 'selected', 'defer', 'ismap', 'nohref', 'noshade', 'nowrap', 'multiple', 'noresize'); + static $minimizedAttributes = array(); + if (empty($minimizedAttributes)) { + $minimizedAttributes = array_flip(array( + 'compact', 'checked', 'declare', 'readonly', 'disabled', + 'selected', 'defer', 'ismap', 'nohref', 'noshade', 'nowrap', + 'multiple', 'noresize' + )); + } + if (is_array($value)) { $value = ''; } - if (in_array($key, $minimizedAttributes)) { + if (isset($minimizedAttributes[$key])) { if ($value === 1 || $value === true || $value === 'true' || $value === '1' || $value == $key) { $attribute = sprintf($attributeFormat, $key, $key); } From c431ddd22c973c1b797df8edf5e98de2e59578cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Mon, 6 Dec 2010 22:57:09 -0430 Subject: [PATCH 041/214] Refactoring Dispatcher::_isPrivate to directly check for controller methods, doing in in the controller could be unnecessary --- lib/Cake/Controller/Controller.php | 7 ++----- lib/Cake/Routing/Dispatcher.php | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index 2580f53d0..c423a9227 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -308,15 +308,12 @@ class Controller extends Object { } if (empty($this->uses)) { $this->modelClass = Inflector::singularize($this->name); + } else { + $this->modelClass = current($this->uses); } $this->modelKey = Inflector::underscore($this->modelClass); $this->Components = new ComponentCollection(); - $childMethods = get_class_methods($this); - $parentMethods = get_class_methods('Controller'); - - $this->methods = array_diff($childMethods, $parentMethods); - if ($request instanceof CakeRequest) { $this->_setRequest($request); } diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index 251b56f6e..4f56056c8 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -143,7 +143,7 @@ class Dispatcher { $privateAction = in_array($prefix, $prefixes); } } - return $privateAction; + return $privateAction && ! in_array($request->params['action'], get_class_methods('Controller')); } /** @@ -160,7 +160,7 @@ class Dispatcher { $controller->constructClasses(); $controller->startupProcess(); - $methods = array_flip($controller->methods); + $methods = array_flip(get_class_methods($controller)); if (!isset($methods[$request->params['action']])) { if ($controller->scaffold !== false) { From 6de52f795f6d07b330fc097e7613c70febf9a3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Mon, 6 Dec 2010 23:15:18 -0430 Subject: [PATCH 042/214] Completing the round of micro optimization, it was fun while it lasted --- lib/Cake/Network/CakeRequest.php | 2 +- lib/Cake/Routing/Dispatcher.php | 3 ++- lib/Cake/Utility/Set.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index 67003f142..5ac7a4922 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Set', 'Core'); +App::uses('Set', 'Utility'); /** * A class that helps wrap Request information and particulars about a single request. diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index 4f56056c8..b52123a6d 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -143,7 +143,8 @@ class Dispatcher { $privateAction = in_array($prefix, $prefixes); } } - return $privateAction && ! in_array($request->params['action'], get_class_methods('Controller')); + + return $privateAction || in_array($request->params['action'], get_class_methods('Controller')); } /** diff --git a/lib/Cake/Utility/Set.php b/lib/Cake/Utility/Set.php index 37a1836d4..ff2af8519 100644 --- a/lib/Cake/Utility/Set.php +++ b/lib/Cake/Utility/Set.php @@ -46,7 +46,7 @@ class Set { $r = (array)current($args); while (($arg = next($args)) !== false) { foreach ((array)$arg as $key => $val) { - if (is_array($val) && isset($r[$key]) && is_array($r[$key])) { + if (!empty($r[$key]) && is_array($r[$key])) { $r[$key] = Set::merge($r[$key], $val); } elseif (is_int($key)) { $r[] = $val; From 9e6475400564d86bfe4dd0dc7a7213dc092f5cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 00:00:20 -0430 Subject: [PATCH 043/214] Adding check to no overwrite cache if it has not been modified --- lib/Cake/Core/App.php | 9 ++++++++- .../Cake/Model/Datasource/Session/CacheSession.php | 0 .../Cake/Model/Datasource/Session/DatabaseSession.php | 0 .../Cake/Routing/Route/PluginShortRoute.php | 0 .../Cake/Routing/Route/RedirectRoute.php | 0 5 files changed, 8 insertions(+), 1 deletion(-) rename cake/libs/session/cache_session.php => lib/Cake/Model/Datasource/Session/CacheSession.php (100%) rename cake/libs/session/database_session.php => lib/Cake/Model/Datasource/Session/DatabaseSession.php (100%) rename cake/libs/route/plugin_short_route.php => lib/Cake/Routing/Route/PluginShortRoute.php (100%) rename cake/libs/route/redirect_route.php => lib/Cake/Routing/Route/RedirectRoute.php (100%) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 2d9003566..91b2e3f1d 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -213,6 +213,12 @@ class App { */ private static $__packages = array(); +/** + * Inicates whether the cache should be stored again because of an addition to it + * + */ + private static $_cacheChange = false; + /** * Used to read information stored path * @@ -691,6 +697,7 @@ class App { } else { self::$__map[$name] = $file; } + self::$_cacheChange = true; } /** @@ -897,7 +904,7 @@ class App { * @return void */ public static function shutdown() { - if (self::$__cache) { + if (self::$__cache && self::$_cacheChange) { Cache::write('file_map', array_filter(self::$__map), '_cake_core_'); Cache::write('object_map', self::$__objects, '_cake_core_'); } diff --git a/cake/libs/session/cache_session.php b/lib/Cake/Model/Datasource/Session/CacheSession.php similarity index 100% rename from cake/libs/session/cache_session.php rename to lib/Cake/Model/Datasource/Session/CacheSession.php diff --git a/cake/libs/session/database_session.php b/lib/Cake/Model/Datasource/Session/DatabaseSession.php similarity index 100% rename from cake/libs/session/database_session.php rename to lib/Cake/Model/Datasource/Session/DatabaseSession.php diff --git a/cake/libs/route/plugin_short_route.php b/lib/Cake/Routing/Route/PluginShortRoute.php similarity index 100% rename from cake/libs/route/plugin_short_route.php rename to lib/Cake/Routing/Route/PluginShortRoute.php diff --git a/cake/libs/route/redirect_route.php b/lib/Cake/Routing/Route/RedirectRoute.php similarity index 100% rename from cake/libs/route/redirect_route.php rename to lib/Cake/Routing/Route/RedirectRoute.php From 0732552739be6f029a017a26de3b6fc7a3e07982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 00:02:42 -0430 Subject: [PATCH 044/214] Movig CakeSession to a better suited package --- lib/Cake/Controller/Component/SessionComponent.php | 2 +- lib/Cake/Model/{ => Datasource}/CakeSession.php | 0 lib/Cake/View/Helper/SessionHelper.php | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename lib/Cake/Model/{ => Datasource}/CakeSession.php (100%) diff --git a/lib/Cake/Controller/Component/SessionComponent.php b/lib/Cake/Controller/Component/SessionComponent.php index 855cbcd20..5e326d5e8 100644 --- a/lib/Cake/Controller/Component/SessionComponent.php +++ b/lib/Cake/Controller/Component/SessionComponent.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('CakeSession', 'Model'); +App::uses('CakeSession', 'Model/Datasource'); /** * Session Component. diff --git a/lib/Cake/Model/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php similarity index 100% rename from lib/Cake/Model/CakeSession.php rename to lib/Cake/Model/Datasource/CakeSession.php diff --git a/lib/Cake/View/Helper/SessionHelper.php b/lib/Cake/View/Helper/SessionHelper.php index 997e2c422..67d09f056 100644 --- a/lib/Cake/View/Helper/SessionHelper.php +++ b/lib/Cake/View/Helper/SessionHelper.php @@ -19,7 +19,7 @@ */ App::uses('AppHelper', 'View/Helper'); -App::uses('CakeSession', 'Model'); +App::uses('CakeSession', 'Model/Datasource'); /** * Session Helper. From 322093a0220167f249e916f11826a39393a748d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 00:17:50 -0430 Subject: [PATCH 045/214] Separating cache storing in App shutdown --- lib/Cake/Core/App.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 91b2e3f1d..1410637ba 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -214,11 +214,17 @@ class App { private static $__packages = array(); /** - * Inicates whether the cache should be stored again because of an addition to it + * Inicates whether the class cache should be stored again because of an addition to it * */ private static $_cacheChange = false; +/** + * Inicates whether the object cache should be stored again because of an addition to it + * + */ + private static $_objectCacheChange = false; + /** * Used to read information stored path * @@ -420,6 +426,7 @@ class App { self::$__cache = true; } self::$__objects[$name] = $objects; + self::$_objectCacheChange = true; } return self::$__objects[$name]; @@ -906,6 +913,8 @@ class App { public static function shutdown() { if (self::$__cache && self::$_cacheChange) { Cache::write('file_map', array_filter(self::$__map), '_cake_core_'); + } + if (self::$__cache && self::$_objectCacheChange) { Cache::write('object_map', self::$__objects, '_cake_core_'); } } From 1c0a4c9e0a5181a1f7b9a3e551a62b73b7a3811c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 00:47:53 -0430 Subject: [PATCH 046/214] Starting to move console classes --- .../app_shell.php => lib/Cake/Console/AppShell.php | 0 .../Cake/Console/Command/AclShell.php | 0 .../Cake/Console/Command/ApiShell.php | 0 .../Cake/Console/Command/BakeShell.php | 0 .../Cake/Console/Command/CommandListShell.php | 0 .../Cake/Console/Command/ConsoleShell.php | 0 .../Cake/Console/Command/I18nShell.php | 0 .../Cake/Console/Command/SchemaShell.php | 0 .../Cake/Console/Command/Task/BakeTask.php | 0 .../Cake/Console/Command/Task/ControllerTask.php | 0 .../Cake/Console/Command/Task/DbConfigTask.php | 0 .../Cake/Console/Command/Task/ExtractTask.php | 0 .../Cake/Console/Command/Task/FixtureTask.php | 0 .../Cake/Console/Command/Task/ModelTask.php | 0 .../Cake/Console/Command/Task/PluginTask.php | 0 .../Cake/Console/Command/Task/ProjectTask.php | 0 .../Cake/Console/Command/Task/TemplateTask.php | 0 .../Cake/Console/Command/Task/TestTask.php | 0 .../Cake/Console/Command/Task/ViewTask.php | 0 .../Cake/Console/Command/TestSuiteShell.php | 0 .../Cake/Console/ConsoleErrorHandler.php | 0 .../Cake/Console/ConsoleInput.php | 0 .../Cake/Console/ConsoleInputArgument.php | 0 .../Cake/Console/ConsoleInputOption.php | 0 .../Cake/Console/ConsoleInputSubcommand.php | 0 .../Cake/Console/ConsoleOptionParser.php | 0 .../Cake/Console/ConsoleOutput.php | 0 .../Cake/Console/HelpFormatter.php | 0 .../shells/shell.php => lib/Cake/Console/Shell.php | 0 .../Cake/Console/ShellDispatcher.php | 0 .../Cake/Console/TaskCollection.php | 0 {cake/console => lib/Cake/Console}/cake | 0 {cake/console => lib/Cake/Console}/cake.bat | 0 {cake/console => lib/Cake/Console}/cake.php | 0 .../default/actions/controller_actions.ctp | 0 .../templates/default/classes/controller.ctp | 0 .../Console}/templates/default/classes/fixture.ctp | 0 .../Console}/templates/default/classes/model.ctp | 0 .../Console}/templates/default/classes/test.ctp | 0 .../Cake/Console}/templates/default/views/form.ctp | 0 .../Cake/Console}/templates/default/views/home.ctp | 0 .../Cake/Console}/templates/default/views/index.ctp | 0 .../Cake/Console}/templates/default/views/view.ctp | 0 .../Cake/Console}/templates/skel/.htaccess | 0 .../Cake/Console}/templates/skel/app_controller.php | 0 .../Cake/Console}/templates/skel/app_helper.php | 0 .../Cake/Console}/templates/skel/app_model.php | 0 .../Cake/Console}/templates/skel/config/acl.ini.php | 0 .../Console}/templates/skel/config/bootstrap.php | 0 .../Cake/Console}/templates/skel/config/core.php | 0 .../templates/skel/config/database.php.default | 0 .../Cake/Console}/templates/skel/config/routes.php | 0 .../templates/skel/config/schema/db_acl.php | 0 .../templates/skel/config/schema/db_acl.sql | 0 .../Console}/templates/skel/config/schema/i18n.php | 0 .../Console}/templates/skel/config/schema/i18n.sql | 0 .../templates/skel/config/schema/sessions.php | 0 .../templates/skel/config/schema/sessions.sql | 0 .../Cake/Console}/templates/skel/console/cake | 0 .../Cake/Console}/templates/skel/console/cake.bat | 0 .../Cake/Console}/templates/skel/console/cake.php | 0 .../templates/skel/console/shells/tasks/empty | 0 .../templates/skel/controllers/components/empty | 0 .../templates/skel/controllers/pages_controller.php | 0 .../Cake/Console}/templates/skel/index.php | 0 .../Cake/Console}/templates/skel/libs/empty | 0 .../templates/skel/locale/eng/LC_MESSAGES/empty | 0 .../Console}/templates/skel/models/behaviors/empty | 0 .../templates/skel/models/datasources/empty | 0 .../Cake/Console}/templates/skel/plugins/empty | 0 .../templates/skel/tests/cases/behaviors/empty | 0 .../templates/skel/tests/cases/components/empty | 0 .../templates/skel/tests/cases/controllers/empty | 0 .../templates/skel/tests/cases/datasources/empty | 0 .../templates/skel/tests/cases/helpers/empty | 0 .../templates/skel/tests/cases/models/empty | 0 .../templates/skel/tests/cases/shells/empty | 0 .../Console}/templates/skel/tests/fixtures/empty | 0 .../Console}/templates/skel/tmp/cache/models/empty | 0 .../templates/skel/tmp/cache/persistent/empty | 0 .../Console}/templates/skel/tmp/cache/views/empty | 0 .../Cake/Console}/templates/skel/tmp/logs/empty | 0 .../Cake/Console}/templates/skel/tmp/sessions/empty | 0 .../Cake/Console}/templates/skel/tmp/tests/empty | 0 .../Cake/Console}/templates/skel/vendors/empty | 0 .../skel/views/elements/email/html/default.ctp | 0 .../skel/views/elements/email/text/default.ctp | 0 .../Console}/templates/skel/views/elements/empty | 0 .../Cake/Console}/templates/skel/views/errors/empty | 0 .../Console}/templates/skel/views/helpers/empty | 0 .../Console}/templates/skel/views/layouts/ajax.ctp | 0 .../templates/skel/views/layouts/default.ctp | 0 .../skel/views/layouts/email/html/default.ctp | 0 .../skel/views/layouts/email/text/default.ctp | 0 .../Console}/templates/skel/views/layouts/flash.ctp | 0 .../templates/skel/views/layouts/js/default.ctp | 0 .../templates/skel/views/layouts/rss/default.ctp | 0 .../templates/skel/views/layouts/xml/default.ctp | 0 .../Cake/Console}/templates/skel/views/pages/empty | 0 .../Console}/templates/skel/views/scaffolds/empty | 0 .../Cake/Console}/templates/skel/webroot/.htaccess | 0 .../Cake/Console}/templates/skel/webroot/css.php | 0 .../templates/skel/webroot/css/cake.generic.css | 0 .../Console}/templates/skel/webroot/favicon.ico | Bin .../templates/skel/webroot/img/cake.icon.png | Bin .../templates/skel/webroot/img/cake.power.gif | Bin .../Cake/Console}/templates/skel/webroot/index.php | 0 .../Cake/Console}/templates/skel/webroot/js/empty | 0 .../Cake/Console}/templates/skel/webroot/test.php | 0 109 files changed, 0 insertions(+), 0 deletions(-) rename cake/console/shells/app_shell.php => lib/Cake/Console/AppShell.php (100%) rename cake/console/shells/acl.php => lib/Cake/Console/Command/AclShell.php (100%) rename cake/console/shells/api.php => lib/Cake/Console/Command/ApiShell.php (100%) rename cake/console/shells/bake.php => lib/Cake/Console/Command/BakeShell.php (100%) rename cake/console/shells/command_list.php => lib/Cake/Console/Command/CommandListShell.php (100%) rename cake/console/shells/console.php => lib/Cake/Console/Command/ConsoleShell.php (100%) rename cake/console/shells/i18n.php => lib/Cake/Console/Command/I18nShell.php (100%) rename cake/console/shells/schema.php => lib/Cake/Console/Command/SchemaShell.php (100%) rename cake/console/shells/tasks/bake.php => lib/Cake/Console/Command/Task/BakeTask.php (100%) rename cake/console/shells/tasks/controller.php => lib/Cake/Console/Command/Task/ControllerTask.php (100%) rename cake/console/shells/tasks/db_config.php => lib/Cake/Console/Command/Task/DbConfigTask.php (100%) rename cake/console/shells/tasks/extract.php => lib/Cake/Console/Command/Task/ExtractTask.php (100%) rename cake/console/shells/tasks/fixture.php => lib/Cake/Console/Command/Task/FixtureTask.php (100%) rename cake/console/shells/tasks/model.php => lib/Cake/Console/Command/Task/ModelTask.php (100%) rename cake/console/shells/tasks/plugin.php => lib/Cake/Console/Command/Task/PluginTask.php (100%) rename cake/console/shells/tasks/project.php => lib/Cake/Console/Command/Task/ProjectTask.php (100%) rename cake/console/shells/tasks/template.php => lib/Cake/Console/Command/Task/TemplateTask.php (100%) rename cake/console/shells/tasks/test.php => lib/Cake/Console/Command/Task/TestTask.php (100%) rename cake/console/shells/tasks/view.php => lib/Cake/Console/Command/Task/ViewTask.php (100%) rename cake/console/shells/testsuite.php => lib/Cake/Console/Command/TestSuiteShell.php (100%) rename cake/console/libs/console_error_handler.php => lib/Cake/Console/ConsoleErrorHandler.php (100%) rename cake/console/libs/console_input.php => lib/Cake/Console/ConsoleInput.php (100%) rename cake/console/libs/console_input_argument.php => lib/Cake/Console/ConsoleInputArgument.php (100%) rename cake/console/libs/console_input_option.php => lib/Cake/Console/ConsoleInputOption.php (100%) rename cake/console/libs/console_input_subcommand.php => lib/Cake/Console/ConsoleInputSubcommand.php (100%) rename cake/console/libs/console_option_parser.php => lib/Cake/Console/ConsoleOptionParser.php (100%) rename cake/console/libs/console_output.php => lib/Cake/Console/ConsoleOutput.php (100%) rename cake/console/libs/help_formatter.php => lib/Cake/Console/HelpFormatter.php (100%) rename cake/console/shells/shell.php => lib/Cake/Console/Shell.php (100%) rename cake/console/shell_dispatcher.php => lib/Cake/Console/ShellDispatcher.php (100%) rename cake/console/libs/task_collection.php => lib/Cake/Console/TaskCollection.php (100%) rename {cake/console => lib/Cake/Console}/cake (100%) rename {cake/console => lib/Cake/Console}/cake.bat (100%) rename {cake/console => lib/Cake/Console}/cake.php (100%) rename {cake/console => lib/Cake/Console}/templates/default/actions/controller_actions.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/default/classes/controller.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/default/classes/fixture.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/default/classes/model.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/default/classes/test.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/default/views/form.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/default/views/home.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/default/views/index.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/default/views/view.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/.htaccess (100%) rename {cake/console => lib/Cake/Console}/templates/skel/app_controller.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/app_helper.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/app_model.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/acl.ini.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/bootstrap.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/core.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/database.php.default (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/routes.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/schema/db_acl.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/schema/db_acl.sql (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/schema/i18n.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/schema/i18n.sql (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/schema/sessions.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/config/schema/sessions.sql (100%) rename {cake/console => lib/Cake/Console}/templates/skel/console/cake (100%) rename {cake/console => lib/Cake/Console}/templates/skel/console/cake.bat (100%) rename {cake/console => lib/Cake/Console}/templates/skel/console/cake.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/console/shells/tasks/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/controllers/components/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/controllers/pages_controller.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/index.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/libs/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/locale/eng/LC_MESSAGES/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/models/behaviors/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/models/datasources/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/plugins/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tests/cases/behaviors/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tests/cases/components/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tests/cases/controllers/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tests/cases/datasources/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tests/cases/helpers/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tests/cases/models/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tests/cases/shells/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tests/fixtures/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tmp/cache/models/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tmp/cache/persistent/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tmp/cache/views/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tmp/logs/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tmp/sessions/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/tmp/tests/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/vendors/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/elements/email/html/default.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/elements/email/text/default.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/elements/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/errors/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/helpers/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/layouts/ajax.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/layouts/default.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/layouts/email/html/default.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/layouts/email/text/default.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/layouts/flash.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/layouts/js/default.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/layouts/rss/default.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/layouts/xml/default.ctp (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/pages/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/views/scaffolds/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/webroot/.htaccess (100%) rename {cake/console => lib/Cake/Console}/templates/skel/webroot/css.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/webroot/css/cake.generic.css (100%) rename {cake/console => lib/Cake/Console}/templates/skel/webroot/favicon.ico (100%) rename {cake/console => lib/Cake/Console}/templates/skel/webroot/img/cake.icon.png (100%) rename {cake/console => lib/Cake/Console}/templates/skel/webroot/img/cake.power.gif (100%) rename {cake/console => lib/Cake/Console}/templates/skel/webroot/index.php (100%) rename {cake/console => lib/Cake/Console}/templates/skel/webroot/js/empty (100%) rename {cake/console => lib/Cake/Console}/templates/skel/webroot/test.php (100%) diff --git a/cake/console/shells/app_shell.php b/lib/Cake/Console/AppShell.php similarity index 100% rename from cake/console/shells/app_shell.php rename to lib/Cake/Console/AppShell.php diff --git a/cake/console/shells/acl.php b/lib/Cake/Console/Command/AclShell.php similarity index 100% rename from cake/console/shells/acl.php rename to lib/Cake/Console/Command/AclShell.php diff --git a/cake/console/shells/api.php b/lib/Cake/Console/Command/ApiShell.php similarity index 100% rename from cake/console/shells/api.php rename to lib/Cake/Console/Command/ApiShell.php diff --git a/cake/console/shells/bake.php b/lib/Cake/Console/Command/BakeShell.php similarity index 100% rename from cake/console/shells/bake.php rename to lib/Cake/Console/Command/BakeShell.php diff --git a/cake/console/shells/command_list.php b/lib/Cake/Console/Command/CommandListShell.php similarity index 100% rename from cake/console/shells/command_list.php rename to lib/Cake/Console/Command/CommandListShell.php diff --git a/cake/console/shells/console.php b/lib/Cake/Console/Command/ConsoleShell.php similarity index 100% rename from cake/console/shells/console.php rename to lib/Cake/Console/Command/ConsoleShell.php diff --git a/cake/console/shells/i18n.php b/lib/Cake/Console/Command/I18nShell.php similarity index 100% rename from cake/console/shells/i18n.php rename to lib/Cake/Console/Command/I18nShell.php diff --git a/cake/console/shells/schema.php b/lib/Cake/Console/Command/SchemaShell.php similarity index 100% rename from cake/console/shells/schema.php rename to lib/Cake/Console/Command/SchemaShell.php diff --git a/cake/console/shells/tasks/bake.php b/lib/Cake/Console/Command/Task/BakeTask.php similarity index 100% rename from cake/console/shells/tasks/bake.php rename to lib/Cake/Console/Command/Task/BakeTask.php diff --git a/cake/console/shells/tasks/controller.php b/lib/Cake/Console/Command/Task/ControllerTask.php similarity index 100% rename from cake/console/shells/tasks/controller.php rename to lib/Cake/Console/Command/Task/ControllerTask.php diff --git a/cake/console/shells/tasks/db_config.php b/lib/Cake/Console/Command/Task/DbConfigTask.php similarity index 100% rename from cake/console/shells/tasks/db_config.php rename to lib/Cake/Console/Command/Task/DbConfigTask.php diff --git a/cake/console/shells/tasks/extract.php b/lib/Cake/Console/Command/Task/ExtractTask.php similarity index 100% rename from cake/console/shells/tasks/extract.php rename to lib/Cake/Console/Command/Task/ExtractTask.php diff --git a/cake/console/shells/tasks/fixture.php b/lib/Cake/Console/Command/Task/FixtureTask.php similarity index 100% rename from cake/console/shells/tasks/fixture.php rename to lib/Cake/Console/Command/Task/FixtureTask.php diff --git a/cake/console/shells/tasks/model.php b/lib/Cake/Console/Command/Task/ModelTask.php similarity index 100% rename from cake/console/shells/tasks/model.php rename to lib/Cake/Console/Command/Task/ModelTask.php diff --git a/cake/console/shells/tasks/plugin.php b/lib/Cake/Console/Command/Task/PluginTask.php similarity index 100% rename from cake/console/shells/tasks/plugin.php rename to lib/Cake/Console/Command/Task/PluginTask.php diff --git a/cake/console/shells/tasks/project.php b/lib/Cake/Console/Command/Task/ProjectTask.php similarity index 100% rename from cake/console/shells/tasks/project.php rename to lib/Cake/Console/Command/Task/ProjectTask.php diff --git a/cake/console/shells/tasks/template.php b/lib/Cake/Console/Command/Task/TemplateTask.php similarity index 100% rename from cake/console/shells/tasks/template.php rename to lib/Cake/Console/Command/Task/TemplateTask.php diff --git a/cake/console/shells/tasks/test.php b/lib/Cake/Console/Command/Task/TestTask.php similarity index 100% rename from cake/console/shells/tasks/test.php rename to lib/Cake/Console/Command/Task/TestTask.php diff --git a/cake/console/shells/tasks/view.php b/lib/Cake/Console/Command/Task/ViewTask.php similarity index 100% rename from cake/console/shells/tasks/view.php rename to lib/Cake/Console/Command/Task/ViewTask.php diff --git a/cake/console/shells/testsuite.php b/lib/Cake/Console/Command/TestSuiteShell.php similarity index 100% rename from cake/console/shells/testsuite.php rename to lib/Cake/Console/Command/TestSuiteShell.php diff --git a/cake/console/libs/console_error_handler.php b/lib/Cake/Console/ConsoleErrorHandler.php similarity index 100% rename from cake/console/libs/console_error_handler.php rename to lib/Cake/Console/ConsoleErrorHandler.php diff --git a/cake/console/libs/console_input.php b/lib/Cake/Console/ConsoleInput.php similarity index 100% rename from cake/console/libs/console_input.php rename to lib/Cake/Console/ConsoleInput.php diff --git a/cake/console/libs/console_input_argument.php b/lib/Cake/Console/ConsoleInputArgument.php similarity index 100% rename from cake/console/libs/console_input_argument.php rename to lib/Cake/Console/ConsoleInputArgument.php diff --git a/cake/console/libs/console_input_option.php b/lib/Cake/Console/ConsoleInputOption.php similarity index 100% rename from cake/console/libs/console_input_option.php rename to lib/Cake/Console/ConsoleInputOption.php diff --git a/cake/console/libs/console_input_subcommand.php b/lib/Cake/Console/ConsoleInputSubcommand.php similarity index 100% rename from cake/console/libs/console_input_subcommand.php rename to lib/Cake/Console/ConsoleInputSubcommand.php diff --git a/cake/console/libs/console_option_parser.php b/lib/Cake/Console/ConsoleOptionParser.php similarity index 100% rename from cake/console/libs/console_option_parser.php rename to lib/Cake/Console/ConsoleOptionParser.php diff --git a/cake/console/libs/console_output.php b/lib/Cake/Console/ConsoleOutput.php similarity index 100% rename from cake/console/libs/console_output.php rename to lib/Cake/Console/ConsoleOutput.php diff --git a/cake/console/libs/help_formatter.php b/lib/Cake/Console/HelpFormatter.php similarity index 100% rename from cake/console/libs/help_formatter.php rename to lib/Cake/Console/HelpFormatter.php diff --git a/cake/console/shells/shell.php b/lib/Cake/Console/Shell.php similarity index 100% rename from cake/console/shells/shell.php rename to lib/Cake/Console/Shell.php diff --git a/cake/console/shell_dispatcher.php b/lib/Cake/Console/ShellDispatcher.php similarity index 100% rename from cake/console/shell_dispatcher.php rename to lib/Cake/Console/ShellDispatcher.php diff --git a/cake/console/libs/task_collection.php b/lib/Cake/Console/TaskCollection.php similarity index 100% rename from cake/console/libs/task_collection.php rename to lib/Cake/Console/TaskCollection.php diff --git a/cake/console/cake b/lib/Cake/Console/cake similarity index 100% rename from cake/console/cake rename to lib/Cake/Console/cake diff --git a/cake/console/cake.bat b/lib/Cake/Console/cake.bat similarity index 100% rename from cake/console/cake.bat rename to lib/Cake/Console/cake.bat diff --git a/cake/console/cake.php b/lib/Cake/Console/cake.php similarity index 100% rename from cake/console/cake.php rename to lib/Cake/Console/cake.php diff --git a/cake/console/templates/default/actions/controller_actions.ctp b/lib/Cake/Console/templates/default/actions/controller_actions.ctp similarity index 100% rename from cake/console/templates/default/actions/controller_actions.ctp rename to lib/Cake/Console/templates/default/actions/controller_actions.ctp diff --git a/cake/console/templates/default/classes/controller.ctp b/lib/Cake/Console/templates/default/classes/controller.ctp similarity index 100% rename from cake/console/templates/default/classes/controller.ctp rename to lib/Cake/Console/templates/default/classes/controller.ctp diff --git a/cake/console/templates/default/classes/fixture.ctp b/lib/Cake/Console/templates/default/classes/fixture.ctp similarity index 100% rename from cake/console/templates/default/classes/fixture.ctp rename to lib/Cake/Console/templates/default/classes/fixture.ctp diff --git a/cake/console/templates/default/classes/model.ctp b/lib/Cake/Console/templates/default/classes/model.ctp similarity index 100% rename from cake/console/templates/default/classes/model.ctp rename to lib/Cake/Console/templates/default/classes/model.ctp diff --git a/cake/console/templates/default/classes/test.ctp b/lib/Cake/Console/templates/default/classes/test.ctp similarity index 100% rename from cake/console/templates/default/classes/test.ctp rename to lib/Cake/Console/templates/default/classes/test.ctp diff --git a/cake/console/templates/default/views/form.ctp b/lib/Cake/Console/templates/default/views/form.ctp similarity index 100% rename from cake/console/templates/default/views/form.ctp rename to lib/Cake/Console/templates/default/views/form.ctp diff --git a/cake/console/templates/default/views/home.ctp b/lib/Cake/Console/templates/default/views/home.ctp similarity index 100% rename from cake/console/templates/default/views/home.ctp rename to lib/Cake/Console/templates/default/views/home.ctp diff --git a/cake/console/templates/default/views/index.ctp b/lib/Cake/Console/templates/default/views/index.ctp similarity index 100% rename from cake/console/templates/default/views/index.ctp rename to lib/Cake/Console/templates/default/views/index.ctp diff --git a/cake/console/templates/default/views/view.ctp b/lib/Cake/Console/templates/default/views/view.ctp similarity index 100% rename from cake/console/templates/default/views/view.ctp rename to lib/Cake/Console/templates/default/views/view.ctp diff --git a/cake/console/templates/skel/.htaccess b/lib/Cake/Console/templates/skel/.htaccess similarity index 100% rename from cake/console/templates/skel/.htaccess rename to lib/Cake/Console/templates/skel/.htaccess diff --git a/cake/console/templates/skel/app_controller.php b/lib/Cake/Console/templates/skel/app_controller.php similarity index 100% rename from cake/console/templates/skel/app_controller.php rename to lib/Cake/Console/templates/skel/app_controller.php diff --git a/cake/console/templates/skel/app_helper.php b/lib/Cake/Console/templates/skel/app_helper.php similarity index 100% rename from cake/console/templates/skel/app_helper.php rename to lib/Cake/Console/templates/skel/app_helper.php diff --git a/cake/console/templates/skel/app_model.php b/lib/Cake/Console/templates/skel/app_model.php similarity index 100% rename from cake/console/templates/skel/app_model.php rename to lib/Cake/Console/templates/skel/app_model.php diff --git a/cake/console/templates/skel/config/acl.ini.php b/lib/Cake/Console/templates/skel/config/acl.ini.php similarity index 100% rename from cake/console/templates/skel/config/acl.ini.php rename to lib/Cake/Console/templates/skel/config/acl.ini.php diff --git a/cake/console/templates/skel/config/bootstrap.php b/lib/Cake/Console/templates/skel/config/bootstrap.php similarity index 100% rename from cake/console/templates/skel/config/bootstrap.php rename to lib/Cake/Console/templates/skel/config/bootstrap.php diff --git a/cake/console/templates/skel/config/core.php b/lib/Cake/Console/templates/skel/config/core.php similarity index 100% rename from cake/console/templates/skel/config/core.php rename to lib/Cake/Console/templates/skel/config/core.php diff --git a/cake/console/templates/skel/config/database.php.default b/lib/Cake/Console/templates/skel/config/database.php.default similarity index 100% rename from cake/console/templates/skel/config/database.php.default rename to lib/Cake/Console/templates/skel/config/database.php.default diff --git a/cake/console/templates/skel/config/routes.php b/lib/Cake/Console/templates/skel/config/routes.php similarity index 100% rename from cake/console/templates/skel/config/routes.php rename to lib/Cake/Console/templates/skel/config/routes.php diff --git a/cake/console/templates/skel/config/schema/db_acl.php b/lib/Cake/Console/templates/skel/config/schema/db_acl.php similarity index 100% rename from cake/console/templates/skel/config/schema/db_acl.php rename to lib/Cake/Console/templates/skel/config/schema/db_acl.php diff --git a/cake/console/templates/skel/config/schema/db_acl.sql b/lib/Cake/Console/templates/skel/config/schema/db_acl.sql similarity index 100% rename from cake/console/templates/skel/config/schema/db_acl.sql rename to lib/Cake/Console/templates/skel/config/schema/db_acl.sql diff --git a/cake/console/templates/skel/config/schema/i18n.php b/lib/Cake/Console/templates/skel/config/schema/i18n.php similarity index 100% rename from cake/console/templates/skel/config/schema/i18n.php rename to lib/Cake/Console/templates/skel/config/schema/i18n.php diff --git a/cake/console/templates/skel/config/schema/i18n.sql b/lib/Cake/Console/templates/skel/config/schema/i18n.sql similarity index 100% rename from cake/console/templates/skel/config/schema/i18n.sql rename to lib/Cake/Console/templates/skel/config/schema/i18n.sql diff --git a/cake/console/templates/skel/config/schema/sessions.php b/lib/Cake/Console/templates/skel/config/schema/sessions.php similarity index 100% rename from cake/console/templates/skel/config/schema/sessions.php rename to lib/Cake/Console/templates/skel/config/schema/sessions.php diff --git a/cake/console/templates/skel/config/schema/sessions.sql b/lib/Cake/Console/templates/skel/config/schema/sessions.sql similarity index 100% rename from cake/console/templates/skel/config/schema/sessions.sql rename to lib/Cake/Console/templates/skel/config/schema/sessions.sql diff --git a/cake/console/templates/skel/console/cake b/lib/Cake/Console/templates/skel/console/cake similarity index 100% rename from cake/console/templates/skel/console/cake rename to lib/Cake/Console/templates/skel/console/cake diff --git a/cake/console/templates/skel/console/cake.bat b/lib/Cake/Console/templates/skel/console/cake.bat similarity index 100% rename from cake/console/templates/skel/console/cake.bat rename to lib/Cake/Console/templates/skel/console/cake.bat diff --git a/cake/console/templates/skel/console/cake.php b/lib/Cake/Console/templates/skel/console/cake.php similarity index 100% rename from cake/console/templates/skel/console/cake.php rename to lib/Cake/Console/templates/skel/console/cake.php diff --git a/cake/console/templates/skel/console/shells/tasks/empty b/lib/Cake/Console/templates/skel/console/shells/tasks/empty similarity index 100% rename from cake/console/templates/skel/console/shells/tasks/empty rename to lib/Cake/Console/templates/skel/console/shells/tasks/empty diff --git a/cake/console/templates/skel/controllers/components/empty b/lib/Cake/Console/templates/skel/controllers/components/empty similarity index 100% rename from cake/console/templates/skel/controllers/components/empty rename to lib/Cake/Console/templates/skel/controllers/components/empty diff --git a/cake/console/templates/skel/controllers/pages_controller.php b/lib/Cake/Console/templates/skel/controllers/pages_controller.php similarity index 100% rename from cake/console/templates/skel/controllers/pages_controller.php rename to lib/Cake/Console/templates/skel/controllers/pages_controller.php diff --git a/cake/console/templates/skel/index.php b/lib/Cake/Console/templates/skel/index.php similarity index 100% rename from cake/console/templates/skel/index.php rename to lib/Cake/Console/templates/skel/index.php diff --git a/cake/console/templates/skel/libs/empty b/lib/Cake/Console/templates/skel/libs/empty similarity index 100% rename from cake/console/templates/skel/libs/empty rename to lib/Cake/Console/templates/skel/libs/empty diff --git a/cake/console/templates/skel/locale/eng/LC_MESSAGES/empty b/lib/Cake/Console/templates/skel/locale/eng/LC_MESSAGES/empty similarity index 100% rename from cake/console/templates/skel/locale/eng/LC_MESSAGES/empty rename to lib/Cake/Console/templates/skel/locale/eng/LC_MESSAGES/empty diff --git a/cake/console/templates/skel/models/behaviors/empty b/lib/Cake/Console/templates/skel/models/behaviors/empty similarity index 100% rename from cake/console/templates/skel/models/behaviors/empty rename to lib/Cake/Console/templates/skel/models/behaviors/empty diff --git a/cake/console/templates/skel/models/datasources/empty b/lib/Cake/Console/templates/skel/models/datasources/empty similarity index 100% rename from cake/console/templates/skel/models/datasources/empty rename to lib/Cake/Console/templates/skel/models/datasources/empty diff --git a/cake/console/templates/skel/plugins/empty b/lib/Cake/Console/templates/skel/plugins/empty similarity index 100% rename from cake/console/templates/skel/plugins/empty rename to lib/Cake/Console/templates/skel/plugins/empty diff --git a/cake/console/templates/skel/tests/cases/behaviors/empty b/lib/Cake/Console/templates/skel/tests/cases/behaviors/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/behaviors/empty rename to lib/Cake/Console/templates/skel/tests/cases/behaviors/empty diff --git a/cake/console/templates/skel/tests/cases/components/empty b/lib/Cake/Console/templates/skel/tests/cases/components/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/components/empty rename to lib/Cake/Console/templates/skel/tests/cases/components/empty diff --git a/cake/console/templates/skel/tests/cases/controllers/empty b/lib/Cake/Console/templates/skel/tests/cases/controllers/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/controllers/empty rename to lib/Cake/Console/templates/skel/tests/cases/controllers/empty diff --git a/cake/console/templates/skel/tests/cases/datasources/empty b/lib/Cake/Console/templates/skel/tests/cases/datasources/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/datasources/empty rename to lib/Cake/Console/templates/skel/tests/cases/datasources/empty diff --git a/cake/console/templates/skel/tests/cases/helpers/empty b/lib/Cake/Console/templates/skel/tests/cases/helpers/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/helpers/empty rename to lib/Cake/Console/templates/skel/tests/cases/helpers/empty diff --git a/cake/console/templates/skel/tests/cases/models/empty b/lib/Cake/Console/templates/skel/tests/cases/models/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/models/empty rename to lib/Cake/Console/templates/skel/tests/cases/models/empty diff --git a/cake/console/templates/skel/tests/cases/shells/empty b/lib/Cake/Console/templates/skel/tests/cases/shells/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/shells/empty rename to lib/Cake/Console/templates/skel/tests/cases/shells/empty diff --git a/cake/console/templates/skel/tests/fixtures/empty b/lib/Cake/Console/templates/skel/tests/fixtures/empty similarity index 100% rename from cake/console/templates/skel/tests/fixtures/empty rename to lib/Cake/Console/templates/skel/tests/fixtures/empty diff --git a/cake/console/templates/skel/tmp/cache/models/empty b/lib/Cake/Console/templates/skel/tmp/cache/models/empty similarity index 100% rename from cake/console/templates/skel/tmp/cache/models/empty rename to lib/Cake/Console/templates/skel/tmp/cache/models/empty diff --git a/cake/console/templates/skel/tmp/cache/persistent/empty b/lib/Cake/Console/templates/skel/tmp/cache/persistent/empty similarity index 100% rename from cake/console/templates/skel/tmp/cache/persistent/empty rename to lib/Cake/Console/templates/skel/tmp/cache/persistent/empty diff --git a/cake/console/templates/skel/tmp/cache/views/empty b/lib/Cake/Console/templates/skel/tmp/cache/views/empty similarity index 100% rename from cake/console/templates/skel/tmp/cache/views/empty rename to lib/Cake/Console/templates/skel/tmp/cache/views/empty diff --git a/cake/console/templates/skel/tmp/logs/empty b/lib/Cake/Console/templates/skel/tmp/logs/empty similarity index 100% rename from cake/console/templates/skel/tmp/logs/empty rename to lib/Cake/Console/templates/skel/tmp/logs/empty diff --git a/cake/console/templates/skel/tmp/sessions/empty b/lib/Cake/Console/templates/skel/tmp/sessions/empty similarity index 100% rename from cake/console/templates/skel/tmp/sessions/empty rename to lib/Cake/Console/templates/skel/tmp/sessions/empty diff --git a/cake/console/templates/skel/tmp/tests/empty b/lib/Cake/Console/templates/skel/tmp/tests/empty similarity index 100% rename from cake/console/templates/skel/tmp/tests/empty rename to lib/Cake/Console/templates/skel/tmp/tests/empty diff --git a/cake/console/templates/skel/vendors/empty b/lib/Cake/Console/templates/skel/vendors/empty similarity index 100% rename from cake/console/templates/skel/vendors/empty rename to lib/Cake/Console/templates/skel/vendors/empty diff --git a/cake/console/templates/skel/views/elements/email/html/default.ctp b/lib/Cake/Console/templates/skel/views/elements/email/html/default.ctp similarity index 100% rename from cake/console/templates/skel/views/elements/email/html/default.ctp rename to lib/Cake/Console/templates/skel/views/elements/email/html/default.ctp diff --git a/cake/console/templates/skel/views/elements/email/text/default.ctp b/lib/Cake/Console/templates/skel/views/elements/email/text/default.ctp similarity index 100% rename from cake/console/templates/skel/views/elements/email/text/default.ctp rename to lib/Cake/Console/templates/skel/views/elements/email/text/default.ctp diff --git a/cake/console/templates/skel/views/elements/empty b/lib/Cake/Console/templates/skel/views/elements/empty similarity index 100% rename from cake/console/templates/skel/views/elements/empty rename to lib/Cake/Console/templates/skel/views/elements/empty diff --git a/cake/console/templates/skel/views/errors/empty b/lib/Cake/Console/templates/skel/views/errors/empty similarity index 100% rename from cake/console/templates/skel/views/errors/empty rename to lib/Cake/Console/templates/skel/views/errors/empty diff --git a/cake/console/templates/skel/views/helpers/empty b/lib/Cake/Console/templates/skel/views/helpers/empty similarity index 100% rename from cake/console/templates/skel/views/helpers/empty rename to lib/Cake/Console/templates/skel/views/helpers/empty diff --git a/cake/console/templates/skel/views/layouts/ajax.ctp b/lib/Cake/Console/templates/skel/views/layouts/ajax.ctp similarity index 100% rename from cake/console/templates/skel/views/layouts/ajax.ctp rename to lib/Cake/Console/templates/skel/views/layouts/ajax.ctp diff --git a/cake/console/templates/skel/views/layouts/default.ctp b/lib/Cake/Console/templates/skel/views/layouts/default.ctp similarity index 100% rename from cake/console/templates/skel/views/layouts/default.ctp rename to lib/Cake/Console/templates/skel/views/layouts/default.ctp diff --git a/cake/console/templates/skel/views/layouts/email/html/default.ctp b/lib/Cake/Console/templates/skel/views/layouts/email/html/default.ctp similarity index 100% rename from cake/console/templates/skel/views/layouts/email/html/default.ctp rename to lib/Cake/Console/templates/skel/views/layouts/email/html/default.ctp diff --git a/cake/console/templates/skel/views/layouts/email/text/default.ctp b/lib/Cake/Console/templates/skel/views/layouts/email/text/default.ctp similarity index 100% rename from cake/console/templates/skel/views/layouts/email/text/default.ctp rename to lib/Cake/Console/templates/skel/views/layouts/email/text/default.ctp diff --git a/cake/console/templates/skel/views/layouts/flash.ctp b/lib/Cake/Console/templates/skel/views/layouts/flash.ctp similarity index 100% rename from cake/console/templates/skel/views/layouts/flash.ctp rename to lib/Cake/Console/templates/skel/views/layouts/flash.ctp diff --git a/cake/console/templates/skel/views/layouts/js/default.ctp b/lib/Cake/Console/templates/skel/views/layouts/js/default.ctp similarity index 100% rename from cake/console/templates/skel/views/layouts/js/default.ctp rename to lib/Cake/Console/templates/skel/views/layouts/js/default.ctp diff --git a/cake/console/templates/skel/views/layouts/rss/default.ctp b/lib/Cake/Console/templates/skel/views/layouts/rss/default.ctp similarity index 100% rename from cake/console/templates/skel/views/layouts/rss/default.ctp rename to lib/Cake/Console/templates/skel/views/layouts/rss/default.ctp diff --git a/cake/console/templates/skel/views/layouts/xml/default.ctp b/lib/Cake/Console/templates/skel/views/layouts/xml/default.ctp similarity index 100% rename from cake/console/templates/skel/views/layouts/xml/default.ctp rename to lib/Cake/Console/templates/skel/views/layouts/xml/default.ctp diff --git a/cake/console/templates/skel/views/pages/empty b/lib/Cake/Console/templates/skel/views/pages/empty similarity index 100% rename from cake/console/templates/skel/views/pages/empty rename to lib/Cake/Console/templates/skel/views/pages/empty diff --git a/cake/console/templates/skel/views/scaffolds/empty b/lib/Cake/Console/templates/skel/views/scaffolds/empty similarity index 100% rename from cake/console/templates/skel/views/scaffolds/empty rename to lib/Cake/Console/templates/skel/views/scaffolds/empty diff --git a/cake/console/templates/skel/webroot/.htaccess b/lib/Cake/Console/templates/skel/webroot/.htaccess similarity index 100% rename from cake/console/templates/skel/webroot/.htaccess rename to lib/Cake/Console/templates/skel/webroot/.htaccess diff --git a/cake/console/templates/skel/webroot/css.php b/lib/Cake/Console/templates/skel/webroot/css.php similarity index 100% rename from cake/console/templates/skel/webroot/css.php rename to lib/Cake/Console/templates/skel/webroot/css.php diff --git a/cake/console/templates/skel/webroot/css/cake.generic.css b/lib/Cake/Console/templates/skel/webroot/css/cake.generic.css similarity index 100% rename from cake/console/templates/skel/webroot/css/cake.generic.css rename to lib/Cake/Console/templates/skel/webroot/css/cake.generic.css diff --git a/cake/console/templates/skel/webroot/favicon.ico b/lib/Cake/Console/templates/skel/webroot/favicon.ico similarity index 100% rename from cake/console/templates/skel/webroot/favicon.ico rename to lib/Cake/Console/templates/skel/webroot/favicon.ico diff --git a/cake/console/templates/skel/webroot/img/cake.icon.png b/lib/Cake/Console/templates/skel/webroot/img/cake.icon.png similarity index 100% rename from cake/console/templates/skel/webroot/img/cake.icon.png rename to lib/Cake/Console/templates/skel/webroot/img/cake.icon.png diff --git a/cake/console/templates/skel/webroot/img/cake.power.gif b/lib/Cake/Console/templates/skel/webroot/img/cake.power.gif similarity index 100% rename from cake/console/templates/skel/webroot/img/cake.power.gif rename to lib/Cake/Console/templates/skel/webroot/img/cake.power.gif diff --git a/cake/console/templates/skel/webroot/index.php b/lib/Cake/Console/templates/skel/webroot/index.php similarity index 100% rename from cake/console/templates/skel/webroot/index.php rename to lib/Cake/Console/templates/skel/webroot/index.php diff --git a/cake/console/templates/skel/webroot/js/empty b/lib/Cake/Console/templates/skel/webroot/js/empty similarity index 100% rename from cake/console/templates/skel/webroot/js/empty rename to lib/Cake/Console/templates/skel/webroot/js/empty diff --git a/cake/console/templates/skel/webroot/test.php b/lib/Cake/Console/templates/skel/webroot/test.php similarity index 100% rename from cake/console/templates/skel/webroot/test.php rename to lib/Cake/Console/templates/skel/webroot/test.php From e3690ebccba6f8b29f50c4ffbc69d7869a805112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 01:26:10 -0430 Subject: [PATCH 047/214] Making shells run again --- lib/Cake/Console/Command/CommandListShell.php | 8 ++++---- lib/Cake/Console/ConsoleErrorHandler.php | 4 ++-- lib/Cake/Console/ConsoleOptionParser.php | 9 +++++---- lib/Cake/Console/Shell.php | 9 +++++---- lib/Cake/Console/ShellDispatcher.php | 13 +++++-------- lib/Cake/Console/TaskCollection.php | 2 +- lib/Cake/Console/cake.php | 2 +- lib/Cake/Core/App.php | 2 +- lib/Cake/Core/Configure.php | 2 +- lib/Cake/I18n/L10n.php | 2 +- lib/Cake/bootstrap.php | 4 ++-- {cake => lib/Cake}/config/config.php | 0 .../Cake}/config/unicode/casefolding/0080_00ff.php | 0 .../Cake}/config/unicode/casefolding/0100_017f.php | 0 .../Cake}/config/unicode/casefolding/0180_024F.php | 0 .../Cake}/config/unicode/casefolding/0250_02af.php | 0 .../Cake}/config/unicode/casefolding/0370_03ff.php | 0 .../Cake}/config/unicode/casefolding/0400_04ff.php | 0 .../Cake}/config/unicode/casefolding/0500_052f.php | 0 .../Cake}/config/unicode/casefolding/0530_058f.php | 0 .../Cake}/config/unicode/casefolding/1e00_1eff.php | 0 .../Cake}/config/unicode/casefolding/1f00_1fff.php | 0 .../Cake}/config/unicode/casefolding/2100_214f.php | 0 .../Cake}/config/unicode/casefolding/2150_218f.php | 0 .../Cake}/config/unicode/casefolding/2460_24ff.php | 0 .../Cake}/config/unicode/casefolding/2c00_2c5f.php | 0 .../Cake}/config/unicode/casefolding/2c60_2c7f.php | 0 .../Cake}/config/unicode/casefolding/2c80_2cff.php | 0 .../Cake}/config/unicode/casefolding/ff00_ffef.php | 0 29 files changed, 28 insertions(+), 29 deletions(-) rename {cake => lib/Cake}/config/config.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/0080_00ff.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/0100_017f.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/0180_024F.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/0250_02af.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/0370_03ff.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/0400_04ff.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/0500_052f.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/0530_058f.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/1e00_1eff.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/1f00_1fff.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/2100_214f.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/2150_218f.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/2460_24ff.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/2c00_2c5f.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/2c60_2c7f.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/2c80_2cff.php (100%) rename {cake => lib/Cake}/config/unicode/casefolding/ff00_ffef.php (100%) diff --git a/lib/Cake/Console/Command/CommandListShell.php b/lib/Cake/Console/Command/CommandListShell.php index cd05af4ba..4df4dc847 100644 --- a/lib/Cake/Console/Command/CommandListShell.php +++ b/lib/Cake/Console/Command/CommandListShell.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Shell', 'Console'); + /** * Shows a list of commands available from the console. * @@ -111,10 +113,8 @@ class CommandListShell extends Shell { continue; } foreach ($shells as $shell) { - if ($shell !== 'shell.php' && $shell !== 'app_shell.php') { - $shell = str_replace('.php', '', $shell); - $shellList[$shell][$type] = $type; - } + $shell = str_replace('Shell.php', '', $shell); + $shellList[$shell][$type] = $type; } } return $shellList; diff --git a/lib/Cake/Console/ConsoleErrorHandler.php b/lib/Cake/Console/ConsoleErrorHandler.php index 120c09d74..9eaebb2e5 100644 --- a/lib/Cake/Console/ConsoleErrorHandler.php +++ b/lib/Cake/Console/ConsoleErrorHandler.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'ErrorHandler'); -require_once 'console_output.php'; +App::uses('ErrorHandler', 'Error'); +App::uses('ConsoleOutput', 'Console'); /** * Error Handler for Cake console. Does simple printing of the diff --git a/lib/Cake/Console/ConsoleOptionParser.php b/lib/Cake/Console/ConsoleOptionParser.php index 8a9f8af65..8eec763d6 100644 --- a/lib/Cake/Console/ConsoleOptionParser.php +++ b/lib/Cake/Console/ConsoleOptionParser.php @@ -17,10 +17,11 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once CONSOLE_LIBS . 'console_input_option.php'; -require_once CONSOLE_LIBS . 'console_input_argument.php'; -require_once CONSOLE_LIBS . 'console_input_subcommand.php'; -require_once CONSOLE_LIBS . 'help_formatter.php'; +App::uses('TaskCollection', 'Console'); +App::uses('ConsoleOutput', 'Console'); +App::uses('ConsoleInput', 'Console'); +App::uses('ConsoleInputOption', 'Console'); +App::uses('ConsoleOptionParser', 'Console'); /** * Handles parsing the ARGV in the command line and provides support diff --git a/lib/Cake/Console/Shell.php b/lib/Cake/Console/Shell.php index 55c81f94d..4f40bc8de 100644 --- a/lib/Cake/Console/Shell.php +++ b/lib/Cake/Console/Shell.php @@ -17,10 +17,11 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once CONSOLE_LIBS . 'task_collection.php'; -require_once CONSOLE_LIBS . 'console_output.php'; -require_once CONSOLE_LIBS . 'console_input.php'; -require_once CONSOLE_LIBS . 'console_option_parser.php'; + +App::uses('TaskCollection', 'Console'); +App::uses('ConsoleOutput', 'Console'); +App::uses('ConsoleInput', 'Console'); +App::uses('ConsoleOptionParser', 'Console'); /** * Base class for command-line utilities for automating programmer chores. diff --git a/lib/Cake/Console/ShellDispatcher.php b/lib/Cake/Console/ShellDispatcher.php index a80407613..ad75dd1d7 100644 --- a/lib/Cake/Console/ShellDispatcher.php +++ b/lib/Cake/Console/ShellDispatcher.php @@ -133,13 +133,13 @@ class ShellDispatcher { } $boot = file_exists(ROOT . DS . APP_DIR . DS . 'config' . DS . 'bootstrap.php'); - require CORE_PATH . 'cake' . DS . 'bootstrap.php'; + require CORE_PATH . 'Cake' . DS . 'bootstrap.php'; if (!file_exists(APP_PATH . 'config' . DS . 'core.php')) { include_once CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'console' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php'; App::build(); } - require_once CONSOLE_LIBS . 'console_error_handler.php'; + require_once CONSOLE_LIBS . 'ConsoleErrorHandler.php'; set_exception_handler(array('ConsoleErrorHandler', 'handleException')); set_error_handler(array('ConsoleErrorHandler', 'handleError'), Configure::read('Error.level')); @@ -209,14 +209,11 @@ class ShellDispatcher { protected function _getShell($shell) { list($plugin, $shell) = pluginSplit($shell, true); - $loaded = App::import('Shell', $plugin . $shell); $class = Inflector::camelize($shell) . 'Shell'; - - if (!$loaded) { - throw new MissingShellFileException(array('shell' => $shell)); - } + $loaded = App::uses($class, $plugin . 'Console/Command'); + if (!class_exists($class)) { - throw new MissingShellClassException(array('shell' => $class)); + throw new MissingShellFileException(array('shell' => $shell)); } $Shell = new $class(); return $Shell; diff --git a/lib/Cake/Console/TaskCollection.php b/lib/Cake/Console/TaskCollection.php index d28b13b6d..00a1c4b54 100644 --- a/lib/Cake/Console/TaskCollection.php +++ b/lib/Cake/Console/TaskCollection.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'ObjectCollection'); +App::uses('ObjectCollection', 'Utility'); class TaskCollection extends ObjectCollection { /** diff --git a/lib/Cake/Console/cake.php b/lib/Cake/Console/cake.php index 02468c38f..fc0c0b484 100644 --- a/lib/Cake/Console/cake.php +++ b/lib/Cake/Console/cake.php @@ -20,7 +20,7 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR. 'shell_dispatcher.php'); +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR. 'ShellDispatcher.php'); return ShellDispatcher::run($argv); diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 1410637ba..444f99057 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -354,7 +354,7 @@ class App { $paths['helpers'][] = $libs . 'view' . DS . 'helpers' . DS; $paths['plugins'][] = $path . 'plugins' . DS; $paths['vendors'][] = $path . 'vendors' . DS; - $paths['shells'][] = $cake . 'console' . DS . 'shells' . DS; + $paths['shells'][] = $libs . 'Console' . DS . 'Command' . DS; // Provide BC path to vendors/shells $paths['shells'][] = $path . 'vendors' . DS . 'shells' . DS; } diff --git a/lib/Cake/Core/Configure.php b/lib/Cake/Core/Configure.php index fca858832..243956433 100644 --- a/lib/Cake/Core/Configure.php +++ b/lib/Cake/Core/Configure.php @@ -345,7 +345,7 @@ class Configure { */ public static function version() { if (!isset(self::$_values['Cake']['version'])) { - require(CORE_PATH . 'cake' . DS . 'config' . DS . 'config.php'); + require(LIBS . 'config' . DS . 'config.php'); self::write($config); } return self::$_values['Cake']['version']; diff --git a/lib/Cake/I18n/L10n.php b/lib/Cake/I18n/L10n.php index 1844507c3..08b25ca92 100644 --- a/lib/Cake/I18n/L10n.php +++ b/lib/Cake/I18n/L10n.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.4116 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('CakeRequest', 'Core'); +App::uses('CakeRequest', 'Network'); /** * Localization diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index f7ca698e3..a6b0099f6 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -40,7 +40,7 @@ error_reporting(E_ALL & ~E_DEPRECATED); /** * Path to the cake directory. */ - define('CAKE', CORE_PATH . 'lib' . DS . 'Cake' . DS); + define('CAKE', CORE_PATH . 'Cake' . DS); /** * Path to the application's directory. @@ -126,7 +126,7 @@ if (!defined('CONFIGS')) { /** * Path to the console libs direcotry. */ - define('CONSOLE_LIBS', CAKE.'console'.DS.'libs'.DS); + define('CONSOLE_LIBS', CAKE . 'Console' . DS); /** * Path to the tests directory. diff --git a/cake/config/config.php b/lib/Cake/config/config.php similarity index 100% rename from cake/config/config.php rename to lib/Cake/config/config.php diff --git a/cake/config/unicode/casefolding/0080_00ff.php b/lib/Cake/config/unicode/casefolding/0080_00ff.php similarity index 100% rename from cake/config/unicode/casefolding/0080_00ff.php rename to lib/Cake/config/unicode/casefolding/0080_00ff.php diff --git a/cake/config/unicode/casefolding/0100_017f.php b/lib/Cake/config/unicode/casefolding/0100_017f.php similarity index 100% rename from cake/config/unicode/casefolding/0100_017f.php rename to lib/Cake/config/unicode/casefolding/0100_017f.php diff --git a/cake/config/unicode/casefolding/0180_024F.php b/lib/Cake/config/unicode/casefolding/0180_024F.php similarity index 100% rename from cake/config/unicode/casefolding/0180_024F.php rename to lib/Cake/config/unicode/casefolding/0180_024F.php diff --git a/cake/config/unicode/casefolding/0250_02af.php b/lib/Cake/config/unicode/casefolding/0250_02af.php similarity index 100% rename from cake/config/unicode/casefolding/0250_02af.php rename to lib/Cake/config/unicode/casefolding/0250_02af.php diff --git a/cake/config/unicode/casefolding/0370_03ff.php b/lib/Cake/config/unicode/casefolding/0370_03ff.php similarity index 100% rename from cake/config/unicode/casefolding/0370_03ff.php rename to lib/Cake/config/unicode/casefolding/0370_03ff.php diff --git a/cake/config/unicode/casefolding/0400_04ff.php b/lib/Cake/config/unicode/casefolding/0400_04ff.php similarity index 100% rename from cake/config/unicode/casefolding/0400_04ff.php rename to lib/Cake/config/unicode/casefolding/0400_04ff.php diff --git a/cake/config/unicode/casefolding/0500_052f.php b/lib/Cake/config/unicode/casefolding/0500_052f.php similarity index 100% rename from cake/config/unicode/casefolding/0500_052f.php rename to lib/Cake/config/unicode/casefolding/0500_052f.php diff --git a/cake/config/unicode/casefolding/0530_058f.php b/lib/Cake/config/unicode/casefolding/0530_058f.php similarity index 100% rename from cake/config/unicode/casefolding/0530_058f.php rename to lib/Cake/config/unicode/casefolding/0530_058f.php diff --git a/cake/config/unicode/casefolding/1e00_1eff.php b/lib/Cake/config/unicode/casefolding/1e00_1eff.php similarity index 100% rename from cake/config/unicode/casefolding/1e00_1eff.php rename to lib/Cake/config/unicode/casefolding/1e00_1eff.php diff --git a/cake/config/unicode/casefolding/1f00_1fff.php b/lib/Cake/config/unicode/casefolding/1f00_1fff.php similarity index 100% rename from cake/config/unicode/casefolding/1f00_1fff.php rename to lib/Cake/config/unicode/casefolding/1f00_1fff.php diff --git a/cake/config/unicode/casefolding/2100_214f.php b/lib/Cake/config/unicode/casefolding/2100_214f.php similarity index 100% rename from cake/config/unicode/casefolding/2100_214f.php rename to lib/Cake/config/unicode/casefolding/2100_214f.php diff --git a/cake/config/unicode/casefolding/2150_218f.php b/lib/Cake/config/unicode/casefolding/2150_218f.php similarity index 100% rename from cake/config/unicode/casefolding/2150_218f.php rename to lib/Cake/config/unicode/casefolding/2150_218f.php diff --git a/cake/config/unicode/casefolding/2460_24ff.php b/lib/Cake/config/unicode/casefolding/2460_24ff.php similarity index 100% rename from cake/config/unicode/casefolding/2460_24ff.php rename to lib/Cake/config/unicode/casefolding/2460_24ff.php diff --git a/cake/config/unicode/casefolding/2c00_2c5f.php b/lib/Cake/config/unicode/casefolding/2c00_2c5f.php similarity index 100% rename from cake/config/unicode/casefolding/2c00_2c5f.php rename to lib/Cake/config/unicode/casefolding/2c00_2c5f.php diff --git a/cake/config/unicode/casefolding/2c60_2c7f.php b/lib/Cake/config/unicode/casefolding/2c60_2c7f.php similarity index 100% rename from cake/config/unicode/casefolding/2c60_2c7f.php rename to lib/Cake/config/unicode/casefolding/2c60_2c7f.php diff --git a/cake/config/unicode/casefolding/2c80_2cff.php b/lib/Cake/config/unicode/casefolding/2c80_2cff.php similarity index 100% rename from cake/config/unicode/casefolding/2c80_2cff.php rename to lib/Cake/config/unicode/casefolding/2c80_2cff.php diff --git a/cake/config/unicode/casefolding/ff00_ffef.php b/lib/Cake/config/unicode/casefolding/ff00_ffef.php similarity index 100% rename from cake/config/unicode/casefolding/ff00_ffef.php rename to lib/Cake/config/unicode/casefolding/ff00_ffef.php From b5122e6e8120a83b41878715acb0814125130fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 01:44:17 -0430 Subject: [PATCH 048/214] Fixing more console classes --- lib/Cake/Console/Command/CommandListShell.php | 2 -- lib/Cake/Console/Command/Task/ModelTask.php | 5 ++--- lib/Cake/Console/ConsoleOptionParser.php | 1 + lib/Cake/Console/HelpFormatter.php | 2 +- lib/Cake/Console/Shell.php | 1 + lib/Cake/Console/ShellDispatcher.php | 5 ++++- lib/Cake/Console/TaskCollection.php | 4 +--- lib/Cake/Model/Model.php | 8 ++++---- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/Cake/Console/Command/CommandListShell.php b/lib/Cake/Console/Command/CommandListShell.php index 4df4dc847..65a576b48 100644 --- a/lib/Cake/Console/Command/CommandListShell.php +++ b/lib/Cake/Console/Command/CommandListShell.php @@ -18,8 +18,6 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Shell', 'Console'); - /** * Shows a list of commands available from the console. * diff --git a/lib/Cake/Console/Command/Task/ModelTask.php b/lib/Cake/Console/Command/Task/ModelTask.php index 7616ef14c..c893de33a 100644 --- a/lib/Cake/Console/Command/Task/ModelTask.php +++ b/lib/Cake/Console/Command/Task/ModelTask.php @@ -18,7 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'bake.php'; +App::uses('BakeTask', 'Console/Command/Task'); +App::uses('ConnectionManager', 'Model'); /** * Task class for creating and updating model files. @@ -791,7 +792,6 @@ class ModelTask extends BakeTask { if (!isset($useDbConfig)) { $useDbConfig = $this->connection; } - App::import('Model', 'ConnectionManager', false); $db = ConnectionManager::getDataSource($useDbConfig); $useTable = Inflector::tableize($modelName); @@ -820,7 +820,6 @@ class ModelTask extends BakeTask { if (!isset($useDbConfig)) { $useDbConfig = $this->connection; } - App::import('Model', 'ConnectionManager', false); $tables = array(); $db = ConnectionManager::getDataSource($useDbConfig); diff --git a/lib/Cake/Console/ConsoleOptionParser.php b/lib/Cake/Console/ConsoleOptionParser.php index 8eec763d6..179999a1b 100644 --- a/lib/Cake/Console/ConsoleOptionParser.php +++ b/lib/Cake/Console/ConsoleOptionParser.php @@ -21,6 +21,7 @@ App::uses('TaskCollection', 'Console'); App::uses('ConsoleOutput', 'Console'); App::uses('ConsoleInput', 'Console'); App::uses('ConsoleInputOption', 'Console'); +App::uses('ConsoleInputArgument', 'Console'); App::uses('ConsoleOptionParser', 'Console'); /** diff --git a/lib/Cake/Console/HelpFormatter.php b/lib/Cake/Console/HelpFormatter.php index 002689899..0b7add61d 100644 --- a/lib/Cake/Console/HelpFormatter.php +++ b/lib/Cake/Console/HelpFormatter.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'String', false); +App::import('String', 'Utility'); /** * HelpFormatter formats help for console shells. Can format to either diff --git a/lib/Cake/Console/Shell.php b/lib/Cake/Console/Shell.php index 4f40bc8de..ff671ef34 100644 --- a/lib/Cake/Console/Shell.php +++ b/lib/Cake/Console/Shell.php @@ -21,6 +21,7 @@ App::uses('TaskCollection', 'Console'); App::uses('ConsoleOutput', 'Console'); App::uses('ConsoleInput', 'Console'); +App::uses('ConsoleInputSubcommand', 'Console'); App::uses('ConsoleOptionParser', 'Console'); /** diff --git a/lib/Cake/Console/ShellDispatcher.php b/lib/Cake/Console/ShellDispatcher.php index ad75dd1d7..45b07f0c5 100644 --- a/lib/Cake/Console/ShellDispatcher.php +++ b/lib/Cake/Console/ShellDispatcher.php @@ -209,8 +209,11 @@ class ShellDispatcher { protected function _getShell($shell) { list($plugin, $shell) = pluginSplit($shell, true); + $class = Inflector::camelize($shell) . 'Shell'; - $loaded = App::uses($class, $plugin . 'Console/Command'); + + App::uses('Shell', 'Console'); + App::uses($class, $plugin . 'Console/Command'); if (!class_exists($class)) { throw new MissingShellFileException(array('shell' => $shell)); diff --git a/lib/Cake/Console/TaskCollection.php b/lib/Cake/Console/TaskCollection.php index 00a1c4b54..b681d571d 100644 --- a/lib/Cake/Console/TaskCollection.php +++ b/lib/Cake/Console/TaskCollection.php @@ -61,10 +61,8 @@ class TaskCollection extends ObjectCollection { } $taskFile = Inflector::underscore($name); $taskClass = $name . 'Task'; + App::uses($taskClass, 'Console/Command/Task'); if (!class_exists($taskClass)) { - if (!App::import('Shell', $plugin . $this->taskPathPrefix . $name)) { - throw new MissingTaskFileException($taskFile . '.php'); - } if (!class_exists($taskClass)) { throw new MissingTaskClassException($taskClass); } diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 9cb46a682..3c3f234e9 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -23,13 +23,13 @@ /** * Included libs */ -App::uses('ClassRegistry', 'Core'); -App::uses('Validation', 'Core'); -App::uses('String', 'Core'); +App::uses('ClassRegistry', 'Utility'); +App::uses('Validation', 'Utility'); +App::uses('String', 'Utility'); App::uses('BehaviorCollection', 'Model'); App::uses('ModelBehavior', 'Model'); App::uses('ConnectionManager', 'Model'); -App::uses('Xml', 'Core'); +App::uses('Xml', 'Utility'); /** * Object-relational mapper. From 66145db2a9653f507cb2b894d67fd54ad76a130e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 19:50:56 -0430 Subject: [PATCH 049/214] Fixing class loading for bake tasks --- lib/Cake/Console/Command/Task/ControllerTask.php | 2 +- lib/Cake/Console/Command/Task/ExtractTask.php | 2 +- lib/Cake/Console/Command/Task/FixtureTask.php | 4 +++- lib/Cake/Console/Command/Task/ProjectTask.php | 3 ++- lib/Cake/Console/Command/Task/TemplateTask.php | 3 ++- lib/Cake/Console/Command/Task/TestTask.php | 4 ++-- lib/Cake/Console/Command/Task/ViewTask.php | 5 +++-- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/Cake/Console/Command/Task/ControllerTask.php b/lib/Cake/Console/Command/Task/ControllerTask.php index 6ec3c4371..46f512365 100644 --- a/lib/Cake/Console/Command/Task/ControllerTask.php +++ b/lib/Cake/Console/Command/Task/ControllerTask.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'bake.php'; +App::uses('BakeTask', 'Console/Command/Task'); /** * Task class for creating and updating controller files. diff --git a/lib/Cake/Console/Command/Task/ExtractTask.php b/lib/Cake/Console/Command/Task/ExtractTask.php index 34c24314e..89af9153c 100644 --- a/lib/Cake/Console/Command/Task/ExtractTask.php +++ b/lib/Cake/Console/Command/Task/ExtractTask.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); +App::uses('File', 'Utility'); /** * Language string extractor * diff --git a/lib/Cake/Console/Command/Task/FixtureTask.php b/lib/Cake/Console/Command/Task/FixtureTask.php index 3bf60f3ae..cc081c84c 100644 --- a/lib/Cake/Console/Command/Task/FixtureTask.php +++ b/lib/Cake/Console/Command/Task/FixtureTask.php @@ -17,7 +17,9 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'bake.php'; + +App::uses('BakeTask', 'Console/Command/Task'); + /** * Task class for creating and updating fixtures files. * diff --git a/lib/Cake/Console/Command/Task/ProjectTask.php b/lib/Cake/Console/Command/Task/ProjectTask.php index bb2a8f34b..4a5538220 100644 --- a/lib/Cake/Console/Command/Task/ProjectTask.php +++ b/lib/Cake/Console/Command/Task/ProjectTask.php @@ -18,7 +18,8 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); + +App::uses('File', 'Utility'); /** * Task class for creating new project apps and plugins diff --git a/lib/Cake/Console/Command/Task/TemplateTask.php b/lib/Cake/Console/Command/Task/TemplateTask.php index 85eed96c6..b30881581 100644 --- a/lib/Cake/Console/Command/Task/TemplateTask.php +++ b/lib/Cake/Console/Command/Task/TemplateTask.php @@ -17,7 +17,8 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Folder'); + +App::uses('Folder', 'Utility'); class TemplateTask extends Shell { diff --git a/lib/Cake/Console/Command/Task/TestTask.php b/lib/Cake/Console/Command/Task/TestTask.php index 093457421..3a52b6569 100644 --- a/lib/Cake/Console/Command/Task/TestTask.php +++ b/lib/Cake/Console/Command/Task/TestTask.php @@ -18,8 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'bake.php'; -App::import('Model', 'ClassRegistry'); +App::uses('BakeTask', 'Console/Command/Task'); +App::uses('ClassRegistry', 'Utility'); /** * Task class for creating and updating test files. diff --git a/lib/Cake/Console/Command/Task/ViewTask.php b/lib/Cake/Console/Command/Task/ViewTask.php index bf8777238..fc3baa8ae 100644 --- a/lib/Cake/Console/Command/Task/ViewTask.php +++ b/lib/Cake/Console/Command/Task/ViewTask.php @@ -17,8 +17,9 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Controller', 'Controller', false); -include_once dirname(__FILE__) . DS . 'bake.php'; + +App::uses('Controller', 'Controller'); +App::uses('BakeTask', 'Console/Command/Task'); /** * Task class for creating and updating view files. From 1c368abc1a3b10aa657b9877e0fc64140babc11a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 19:51:26 -0430 Subject: [PATCH 050/214] Adding back cache loading for "objects" in App class --- lib/Cake/Core/App.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 444f99057..f22d8925d 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -609,6 +609,7 @@ class App { */ public static function init() { self::$__map = (array)Cache::read('file_map', '_cake_core_'); + self::$__objects = (array)Cache::read('object_map', '_cake_core_'); register_shutdown_function(array('App', 'shutdown')); } From 09120b715c75ff7bf9c4ab103fa2ed1474570f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 19:58:09 -0430 Subject: [PATCH 051/214] Modifying index.php so the framework is able to bootstrap itself again --- app/webroot/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/webroot/index.php b/app/webroot/index.php index 719f172c4..70991f787 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -50,7 +50,7 @@ * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT); + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS .'lib'); } /** @@ -74,7 +74,7 @@ if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { return; } else { - require LIBS . 'dispatcher.php'; + require LIBS . 'Routing' . DS .'Dispatcher.php'; $Dispatcher = new Dispatcher(); $Dispatcher->dispatch(new CakeRequest(isset($_GET['url']) ? $_GET['url'] : null)); } From 7828f7d2fb0e37af468af304c329c7a4ca4df949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 19:59:07 -0430 Subject: [PATCH 052/214] Lazy loading connections in ConnectionManager, changing some class names and imports --- lib/Cake/Model/ConnectionManager.php | 16 ++++++++-------- lib/Cake/Model/Datasource/CakeSession.php | 5 +---- lib/Cake/Model/Datasource/Database/Sqlite.php | 4 +++- lib/Cake/Utility/File.php | 4 +--- lib/Cake/View/pages/home.ctp | 11 ++++------- 5 files changed, 17 insertions(+), 23 deletions(-) diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index de3a4e90c..208d6ba9d 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -69,7 +69,6 @@ class ConnectionManager { include_once CONFIGS . 'database.php'; if (class_exists('DATABASE_CONFIG')) { self::$config = new DATABASE_CONFIG(); - self::_getConnectionObjects(); } register_shutdown_function('ConnectionManager::shutdown'); self::$_init = true; @@ -91,11 +90,16 @@ class ConnectionManager { return $return; } + if (empty(self::$_connectionsEnum[$name])) { + self::_getConnectionObject($name); + } + if (empty(self::$_connectionsEnum[$name])) { trigger_error(__("ConnectionManager::getDataSource - Non-existent data source %s", $name), E_USER_ERROR); $null = null; return $null; } + $conn = self::$_connectionsEnum[$name]; $class = $conn['classname']; @@ -222,13 +226,9 @@ class ConnectionManager { * * @return void */ - protected static function _getConnectionObjects() { - $connections = get_object_vars(self::$config); - - if ($connections != null) { - foreach ($connections as $name => $config) { - self::$_connectionsEnum[$name] = self::_connectionData($config); - } + protected static function _getConnectionObject($name) { + if (!empty(self::$config->{$name})) { + self::$_connectionsEnum[$name] = self::_connectionData(self::$config->{$name}); } else { throw new MissingConnectionException(array('class' => 'ConnectionManager')); } diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index fd67272ad..589153383 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -559,10 +559,7 @@ class CakeSession { */ protected static function _getHandler($handler) { list($plugin, $class) = pluginSplit($handler, true); - $found = App::import('Lib', $plugin . 'session/' . $class); - if (!$found) { - App::import('Core', 'session/' . $class); - } + App::uses($class, $plugin . 'Model/Datasource/Session'); if (!class_exists($class)) { throw new Exception(__('Could not load %s to handle the session.', $class)); } diff --git a/lib/Cake/Model/Datasource/Database/Sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php index e4a50b4c2..817e00cf1 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -18,6 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('DboSource', 'Model/Datasource'); + /** * DBO implementation for the SQLite3 DBMS. * @@ -26,7 +28,7 @@ * @package datasources * @subpackage cake.cake.libs.model.datasources.dbo */ -class DboSqlite extends DboSource { +class Sqlite extends DboSource { /** * Datasource Description diff --git a/lib/Cake/Utility/File.php b/lib/Cake/Utility/File.php index 663004840..2d9e268d7 100644 --- a/lib/Cake/Utility/File.php +++ b/lib/Cake/Utility/File.php @@ -22,9 +22,7 @@ * Included libraries. * */ -if (!class_exists('Folder')) { - require LIBS . 'folder.php'; -} +App::uses('File', 'Utility'); /** * Convenience class for reading, writing and appending to files. diff --git a/lib/Cake/View/pages/home.ctp b/lib/Cake/View/pages/home.ctp index 95ead2a18..81a6d5818 100644 --- a/lib/Cake/View/pages/home.ctp +++ b/lib/Cake/View/pages/home.ctp @@ -72,7 +72,7 @@ endif; ?>

'; __('PCRE has not been compiled with Unicode support.'); @@ -83,15 +83,12 @@ endif; ?> getDataSource('default'); + App::uses('ConnectionManager', 'Model'); + $connected = ConnectionManager::getDataSource('default'); ?>

isConnected()): + if ($connected && $connected->isConnected()): echo ''; echo __('Cake is able to connect to the database.'); echo ''; From 02ad0495593b361a262a99ed520140c799789877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 7 Dec 2010 20:42:50 -0430 Subject: [PATCH 053/214] Fixing more shells, and updating code in home.ctp --- lib/Cake/Console/Command/ConsoleShell.php | 17 ++++++++--------- lib/Cake/Console/Command/SchemaShell.php | 4 ++-- lib/Cake/Console/ConsoleOptionParser.php | 1 + lib/Cake/Console/HelpFormatter.php | 2 +- lib/Cake/Model/CakeSchema.php | 5 +++-- lib/Cake/Utility/File.php | 2 +- lib/Cake/View/pages/home.ctp | 4 ++-- 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/Cake/Console/Command/ConsoleShell.php b/lib/Cake/Console/Command/ConsoleShell.php index 20ab1615d..404c348ed 100644 --- a/lib/Cake/Console/Command/ConsoleShell.php +++ b/lib/Cake/Console/Command/ConsoleShell.php @@ -53,7 +53,7 @@ class ConsoleShell extends Shell { * */ public function initialize() { - require_once CAKE . 'dispatcher.php'; + App::uses('Dispatcher', 'Routing'); $this->Dispatcher = new Dispatcher(); $this->models = App::objects('model'); App::import('Model', $this->models); @@ -335,21 +335,20 @@ class ConsoleShell extends Shell { * @return boolean True if config reload was a success, otherwise false */ protected function _loadRoutes() { - $router = Router::getInstance(); - - $router->reload(); - extract($router->getNamedExpressions()); + Router::reload(); + extract(Router::getNamedExpressions()); if (!@include(CONFIGS . 'routes.php')) { return false; } - $router->parse('/'); + Router::parse('/'); - foreach (array_keys($router->getNamedExpressions()) as $var) { + foreach (array_keys(Router::getNamedExpressions()) as $var) { unset(${$var}); } - for ($i = 0, $len = count($router->routes); $i < $len; $i++) { - $router->routes[$i]->compile(); + + foreach (Router::$routes as $route) { + $route->compile(); } return true; } diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 969fad12a..280a86c69 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -20,8 +20,8 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File', false); -App::import('Model', 'CakeSchema', false); +App::uses('File', 'Utility'); +App::uses('CakeSchema', 'Model'); /** * Schema is a command-line database management utility for automating programmer chores. diff --git a/lib/Cake/Console/ConsoleOptionParser.php b/lib/Cake/Console/ConsoleOptionParser.php index 179999a1b..fabad4c5b 100644 --- a/lib/Cake/Console/ConsoleOptionParser.php +++ b/lib/Cake/Console/ConsoleOptionParser.php @@ -23,6 +23,7 @@ App::uses('ConsoleInput', 'Console'); App::uses('ConsoleInputOption', 'Console'); App::uses('ConsoleInputArgument', 'Console'); App::uses('ConsoleOptionParser', 'Console'); +App::uses('HelpFormatter', 'Console'); /** * Handles parsing the ARGV in the command line and provides support diff --git a/lib/Cake/Console/HelpFormatter.php b/lib/Cake/Console/HelpFormatter.php index 0b7add61d..40f3b3cc8 100644 --- a/lib/Cake/Console/HelpFormatter.php +++ b/lib/Cake/Console/HelpFormatter.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('String', 'Utility'); +App::uses('String', 'Utility'); /** * HelpFormatter formats help for console shells. Can format to either diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index bfe7c3ffe..17bc19f84 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -17,8 +17,9 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Model', 'Core'); -App::uses('ConnectionManager', 'Core'); +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); +App::uses('ConnectionManager', 'Model'); /** * Base Class for Schema management diff --git a/lib/Cake/Utility/File.php b/lib/Cake/Utility/File.php index 2d9e268d7..a7778ceda 100644 --- a/lib/Cake/Utility/File.php +++ b/lib/Cake/Utility/File.php @@ -22,7 +22,7 @@ * Included libraries. * */ -App::uses('File', 'Utility'); +App::uses('Folder', 'Utility'); /** * Convenience class for reading, writing and appending to files. diff --git a/lib/Cake/View/pages/home.ctp b/lib/Cake/View/pages/home.ctp index 81a6d5818..d861c5c12 100644 --- a/lib/Cake/View/pages/home.ctp +++ b/lib/Cake/View/pages/home.ctp @@ -16,14 +16,14 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (Configure::read() == 0): +if (Configure::read('debug') == 0): throw new NotFoundException(); endif; ?>

0): +if (Configure::read('debug') > 0): Debugger::checkSecurityKeys(); endif; ?> From 4c9ad2dec8b5c12ecb3f20db7f067a3315b145e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Wed, 8 Dec 2010 00:34:45 -0430 Subject: [PATCH 054/214] Starting the tedious process of moving the testsuite and tests --- .../lib/cake_test_case.php => lib/Cake/TestSuite/CakeTestCase.php | 0 .../cake_test_suite.php => lib/Cake/TestSuite/CakeTestSuite.php | 0 .../Cake/TestSuite/CakeTestSuiteDispatcher.php | 0 .../Cake/TestSuite/CakeWebTestCase.php | 0 .../Cake/TestSuite/Coverage/BaseCoverageReport.php | 0 .../Cake/TestSuite/Coverage/HtmlCoverageReport.php | 0 .../Cake/TestSuite/Coverage/TextCoverageReport.php | 0 .../Cake/TestSuite/Fixture/CakeFixtureManager.php | 0 .../Cake/TestSuite/Fixture/CakeTestFixture.php | 0 .../Cake/TestSuite/Fixture/CakeTestModel.php | 0 .../Cake/TestSuite/Reporter/CakeBaseReporter.php | 0 .../Cake/TestSuite/Reporter/CakeHtmlReporter.php | 0 .../Cake/TestSuite/Reporter/CakeTextReporter.php | 0 .../lib/test_manager.php => lib/Cake/TestSuite/TestManager.php | 0 .../lib/test_runner.php => lib/Cake/TestSuite/TestRunner.php | 0 {cake/tests/lib => lib/Cake/TestSuite}/templates/footer.php | 0 {cake/tests/lib => lib/Cake/TestSuite}/templates/header.php | 0 {cake/tests/lib => lib/Cake/TestSuite}/templates/menu.php | 0 .../lib => lib/Cake/TestSuite}/templates/missing_conenction.php | 0 {cake/tests/lib => lib/Cake/TestSuite}/templates/phpunit.php | 0 {cake/tests/lib => lib/Cake/TestSuite}/templates/xdebug.php | 0 21 files changed, 0 insertions(+), 0 deletions(-) rename cake/tests/lib/cake_test_case.php => lib/Cake/TestSuite/CakeTestCase.php (100%) rename cake/tests/lib/cake_test_suite.php => lib/Cake/TestSuite/CakeTestSuite.php (100%) rename cake/tests/lib/cake_test_suite_dispatcher.php => lib/Cake/TestSuite/CakeTestSuiteDispatcher.php (100%) rename cake/tests/lib/cake_web_test_case.php => lib/Cake/TestSuite/CakeWebTestCase.php (100%) rename cake/tests/lib/coverage/base_coverage_report.php => lib/Cake/TestSuite/Coverage/BaseCoverageReport.php (100%) rename cake/tests/lib/coverage/html_coverage_report.php => lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php (100%) rename cake/tests/lib/coverage/text_coverage_report.php => lib/Cake/TestSuite/Coverage/TextCoverageReport.php (100%) rename cake/tests/lib/cake_fixture_manager.php => lib/Cake/TestSuite/Fixture/CakeFixtureManager.php (100%) rename cake/tests/lib/cake_test_fixture.php => lib/Cake/TestSuite/Fixture/CakeTestFixture.php (100%) rename cake/tests/lib/cake_test_model.php => lib/Cake/TestSuite/Fixture/CakeTestModel.php (100%) rename cake/tests/lib/reporter/cake_base_reporter.php => lib/Cake/TestSuite/Reporter/CakeBaseReporter.php (100%) rename cake/tests/lib/reporter/cake_html_reporter.php => lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php (100%) rename cake/tests/lib/reporter/cake_text_reporter.php => lib/Cake/TestSuite/Reporter/CakeTextReporter.php (100%) rename cake/tests/lib/test_manager.php => lib/Cake/TestSuite/TestManager.php (100%) rename cake/tests/lib/test_runner.php => lib/Cake/TestSuite/TestRunner.php (100%) rename {cake/tests/lib => lib/Cake/TestSuite}/templates/footer.php (100%) rename {cake/tests/lib => lib/Cake/TestSuite}/templates/header.php (100%) rename {cake/tests/lib => lib/Cake/TestSuite}/templates/menu.php (100%) rename {cake/tests/lib => lib/Cake/TestSuite}/templates/missing_conenction.php (100%) rename {cake/tests/lib => lib/Cake/TestSuite}/templates/phpunit.php (100%) rename {cake/tests/lib => lib/Cake/TestSuite}/templates/xdebug.php (100%) diff --git a/cake/tests/lib/cake_test_case.php b/lib/Cake/TestSuite/CakeTestCase.php similarity index 100% rename from cake/tests/lib/cake_test_case.php rename to lib/Cake/TestSuite/CakeTestCase.php diff --git a/cake/tests/lib/cake_test_suite.php b/lib/Cake/TestSuite/CakeTestSuite.php similarity index 100% rename from cake/tests/lib/cake_test_suite.php rename to lib/Cake/TestSuite/CakeTestSuite.php diff --git a/cake/tests/lib/cake_test_suite_dispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php similarity index 100% rename from cake/tests/lib/cake_test_suite_dispatcher.php rename to lib/Cake/TestSuite/CakeTestSuiteDispatcher.php diff --git a/cake/tests/lib/cake_web_test_case.php b/lib/Cake/TestSuite/CakeWebTestCase.php similarity index 100% rename from cake/tests/lib/cake_web_test_case.php rename to lib/Cake/TestSuite/CakeWebTestCase.php diff --git a/cake/tests/lib/coverage/base_coverage_report.php b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php similarity index 100% rename from cake/tests/lib/coverage/base_coverage_report.php rename to lib/Cake/TestSuite/Coverage/BaseCoverageReport.php diff --git a/cake/tests/lib/coverage/html_coverage_report.php b/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php similarity index 100% rename from cake/tests/lib/coverage/html_coverage_report.php rename to lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php diff --git a/cake/tests/lib/coverage/text_coverage_report.php b/lib/Cake/TestSuite/Coverage/TextCoverageReport.php similarity index 100% rename from cake/tests/lib/coverage/text_coverage_report.php rename to lib/Cake/TestSuite/Coverage/TextCoverageReport.php diff --git a/cake/tests/lib/cake_fixture_manager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php similarity index 100% rename from cake/tests/lib/cake_fixture_manager.php rename to lib/Cake/TestSuite/Fixture/CakeFixtureManager.php diff --git a/cake/tests/lib/cake_test_fixture.php b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php similarity index 100% rename from cake/tests/lib/cake_test_fixture.php rename to lib/Cake/TestSuite/Fixture/CakeTestFixture.php diff --git a/cake/tests/lib/cake_test_model.php b/lib/Cake/TestSuite/Fixture/CakeTestModel.php similarity index 100% rename from cake/tests/lib/cake_test_model.php rename to lib/Cake/TestSuite/Fixture/CakeTestModel.php diff --git a/cake/tests/lib/reporter/cake_base_reporter.php b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php similarity index 100% rename from cake/tests/lib/reporter/cake_base_reporter.php rename to lib/Cake/TestSuite/Reporter/CakeBaseReporter.php diff --git a/cake/tests/lib/reporter/cake_html_reporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php similarity index 100% rename from cake/tests/lib/reporter/cake_html_reporter.php rename to lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php diff --git a/cake/tests/lib/reporter/cake_text_reporter.php b/lib/Cake/TestSuite/Reporter/CakeTextReporter.php similarity index 100% rename from cake/tests/lib/reporter/cake_text_reporter.php rename to lib/Cake/TestSuite/Reporter/CakeTextReporter.php diff --git a/cake/tests/lib/test_manager.php b/lib/Cake/TestSuite/TestManager.php similarity index 100% rename from cake/tests/lib/test_manager.php rename to lib/Cake/TestSuite/TestManager.php diff --git a/cake/tests/lib/test_runner.php b/lib/Cake/TestSuite/TestRunner.php similarity index 100% rename from cake/tests/lib/test_runner.php rename to lib/Cake/TestSuite/TestRunner.php diff --git a/cake/tests/lib/templates/footer.php b/lib/Cake/TestSuite/templates/footer.php similarity index 100% rename from cake/tests/lib/templates/footer.php rename to lib/Cake/TestSuite/templates/footer.php diff --git a/cake/tests/lib/templates/header.php b/lib/Cake/TestSuite/templates/header.php similarity index 100% rename from cake/tests/lib/templates/header.php rename to lib/Cake/TestSuite/templates/header.php diff --git a/cake/tests/lib/templates/menu.php b/lib/Cake/TestSuite/templates/menu.php similarity index 100% rename from cake/tests/lib/templates/menu.php rename to lib/Cake/TestSuite/templates/menu.php diff --git a/cake/tests/lib/templates/missing_conenction.php b/lib/Cake/TestSuite/templates/missing_conenction.php similarity index 100% rename from cake/tests/lib/templates/missing_conenction.php rename to lib/Cake/TestSuite/templates/missing_conenction.php diff --git a/cake/tests/lib/templates/phpunit.php b/lib/Cake/TestSuite/templates/phpunit.php similarity index 100% rename from cake/tests/lib/templates/phpunit.php rename to lib/Cake/TestSuite/templates/phpunit.php diff --git a/cake/tests/lib/templates/xdebug.php b/lib/Cake/TestSuite/templates/xdebug.php similarity index 100% rename from cake/tests/lib/templates/xdebug.php rename to lib/Cake/TestSuite/templates/xdebug.php From 4a287faa1e6b0251e3efab0074ce514d143f3b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Wed, 8 Dec 2010 01:36:38 -0430 Subject: [PATCH 055/214] Moving the tests folder --- {cake => lib/Cake}/tests/cases/basics.test.php | 0 .../Cake}/tests/cases/console/all_console.test.php | 0 .../tests/cases/console/all_console_libs.test.php | 0 .../Cake}/tests/cases/console/all_shells.test.php | 0 .../Cake}/tests/cases/console/all_tasks.test.php | 0 .../console/libs/console_error_handler.test.php | 0 .../console/libs/console_option_parser.test.php | 0 .../cases/console/libs/console_output.test.php | 0 .../cases/console/libs/help_formatter.test.php | 0 .../cases/console/libs/task_collection.test.php | 0 .../tests/cases/console/shell_dispatcher.test.php | 0 .../Cake}/tests/cases/console/shells/acl.test.php | 0 .../Cake}/tests/cases/console/shells/api.test.php | 0 .../Cake}/tests/cases/console/shells/bake.test.php | 0 .../cases/console/shells/command_list.test.php | 0 .../tests/cases/console/shells/schema.test.php | 0 .../Cake}/tests/cases/console/shells/shell.test.php | 0 .../cases/console/shells/tasks/controller.test.php | 0 .../cases/console/shells/tasks/db_config.test.php | 0 .../cases/console/shells/tasks/extract.test.php | 0 .../cases/console/shells/tasks/fixture.test.php | 0 .../tests/cases/console/shells/tasks/model.test.php | 0 .../cases/console/shells/tasks/plugin.test.php | 0 .../cases/console/shells/tasks/project.test.php | 0 .../cases/console/shells/tasks/template.test.php | 0 .../tests/cases/console/shells/tasks/test.test.php | 0 .../tests/cases/console/shells/tasks/view.test.php | 0 .../tests/cases/console/shells/testsuite.test.php | 0 .../Cake}/tests/cases/libs/all_behaviors.test.php | 0 .../tests/cases/libs/all_cache_engines.test.php | 0 .../Cake}/tests/cases/libs/all_components.test.php | 0 .../Cake}/tests/cases/libs/all_configure.test.php | 0 .../Cake}/tests/cases/libs/all_controllers.test.php | 0 .../Cake}/tests/cases/libs/all_database.test.php | 0 .../Cake}/tests/cases/libs/all_error.test.php | 0 .../Cake}/tests/cases/libs/all_helpers.test.php | 0 .../Cake}/tests/cases/libs/all_js_helpers.test.php | 0 .../Cake}/tests/cases/libs/all_libs.test.php | 0 .../tests/cases/libs/all_localization.test.php | 0 .../Cake}/tests/cases/libs/all_model.test.php | 0 .../Cake}/tests/cases/libs/all_routing.test.php | 0 .../Cake}/tests/cases/libs/all_socket.test.php | 0 .../Cake}/tests/cases/libs/all_test_suite.test.php | 0 .../Cake}/tests/cases/libs/all_tests.test.php | 0 .../Cake}/tests/cases/libs/all_views.test.php | 0 .../Cake}/tests/cases/libs/all_xml.test.php | 0 {cake => lib/Cake}/tests/cases/libs/app.test.php | 0 {cake => lib/Cake}/tests/cases/libs/cache.test.php | 0 .../Cake}/tests/cases/libs/cache/apc.test.php | 0 .../Cake}/tests/cases/libs/cache/file.test.php | 0 .../Cake}/tests/cases/libs/cache/memcache.test.php | 0 .../Cake}/tests/cases/libs/cache/xcache.test.php | 0 .../Cake}/tests/cases/libs/cake_log.test.php | 0 .../Cake}/tests/cases/libs/cake_request.test.php | 0 .../Cake}/tests/cases/libs/cake_response.test.php | 0 .../Cake}/tests/cases/libs/cake_session.test.php | 0 .../Cake}/tests/cases/libs/cake_socket.test.php | 0 .../Cake}/tests/cases/libs/cake_test_case.test.php | 0 .../tests/cases/libs/cake_test_fixture.test.php | 0 .../Cake}/tests/cases/libs/class_registry.test.php | 0 .../tests/cases/libs/config/ini_reader.test.php | 0 .../tests/cases/libs/config/php_reader.test.php | 0 .../Cake}/tests/cases/libs/configure.test.php | 0 .../tests/cases/libs/controller/component.test.php | 0 .../libs/controller/component_collection.test.php | 0 .../cases/libs/controller/components/acl.test.php | 0 .../cases/libs/controller/components/auth.test.php | 0 .../libs/controller/components/cookie.test.php | 0 .../cases/libs/controller/components/email.test.php | 0 .../controller/components/request_handler.test.php | 0 .../libs/controller/components/security.test.php | 0 .../libs/controller/components/session.test.php | 0 .../tests/cases/libs/controller/controller.test.php | 0 .../libs/controller/controller_merge_vars.test.php | 0 .../cases/libs/controller/pages_controller.test.php | 0 .../tests/cases/libs/controller/scaffold.test.php | 0 .../Cake}/tests/cases/libs/debugger.test.php | 0 .../Cake}/tests/cases/libs/dispatcher.test.php | 0 .../tests/cases/libs/error/error_handler.test.php | 0 .../cases/libs/error/exception_renderer.test.php | 0 {cake => lib/Cake}/tests/cases/libs/file.test.php | 0 {cake => lib/Cake}/tests/cases/libs/folder.test.php | 0 .../tests/cases/libs/html_coverage_report.test.php | 0 .../Cake}/tests/cases/libs/http_socket.test.php | 0 {cake => lib/Cake}/tests/cases/libs/i18n.test.php | 0 .../Cake}/tests/cases/libs/inflector.test.php | 0 {cake => lib/Cake}/tests/cases/libs/l10n.test.php | 0 .../Cake}/tests/cases/libs/log/file_log.test.php | 0 .../Cake}/tests/cases/libs/magic_db.test.php | 0 .../cases/libs/model/behavior_collection.test.php | 0 .../tests/cases/libs/model/behaviors/acl.test.php | 0 .../cases/libs/model/behaviors/containable.test.php | 0 .../cases/libs/model/behaviors/translate.test.php | 0 .../tests/cases/libs/model/behaviors/tree.test.php | 0 .../tests/cases/libs/model/cake_schema.test.php | 0 .../cases/libs/model/connection_manager.test.php | 0 .../libs/model/datasources/dbo/dbo_mssql.test.php | 0 .../libs/model/datasources/dbo/dbo_mysql.test.php | 0 .../libs/model/datasources/dbo/dbo_oracle.test.php | 0 .../model/datasources/dbo/dbo_postgres.test.php | 0 .../libs/model/datasources/dbo/dbo_sqlite.test.php | 0 .../libs/model/datasources/dbo_source.test.php | 0 .../Cake}/tests/cases/libs/model/db_acl.test.php | 0 .../Cake}/tests/cases/libs/model/model.test.php | 0 .../tests/cases/libs/model/model_delete.test.php | 0 .../cases/libs/model/model_integration.test.php | 0 .../tests/cases/libs/model/model_read.test.php | 0 .../cases/libs/model/model_validation.test.php | 0 .../tests/cases/libs/model/model_write.test.php | 0 .../Cake}/tests/cases/libs/model/models.php | 0 .../Cake}/tests/cases/libs/multibyte.test.php | 0 {cake => lib/Cake}/tests/cases/libs/object.test.php | 0 .../tests/cases/libs/object_collection.test.php | 0 .../tests/cases/libs/route/cake_route.test.php | 0 .../cases/libs/route/plugin_short_route.test.php | 0 .../tests/cases/libs/route/redirect_route.test.php | 0 {cake => lib/Cake}/tests/cases/libs/router.test.php | 0 .../Cake}/tests/cases/libs/sanitize.test.php | 0 .../Cake}/tests/cases/libs/security.test.php | 0 .../tests/cases/libs/session/cache_session.test.php | 0 .../cases/libs/session/database_session.test.php | 0 {cake => lib/Cake}/tests/cases/libs/set.test.php | 0 {cake => lib/Cake}/tests/cases/libs/string.test.php | 0 .../Cake}/tests/cases/libs/test_manager.test.php | 0 .../Cake}/tests/cases/libs/validation.test.php | 0 .../Cake}/tests/cases/libs/view/helper.test.php | 0 .../cases/libs/view/helper_collection.test.php | 0 .../tests/cases/libs/view/helpers/cache.test.php | 0 .../tests/cases/libs/view/helpers/form.test.php | 0 .../tests/cases/libs/view/helpers/html.test.php | 0 .../cases/libs/view/helpers/jquery_engine.test.php | 0 .../Cake}/tests/cases/libs/view/helpers/js.test.php | 0 .../libs/view/helpers/mootools_engine.test.php | 0 .../tests/cases/libs/view/helpers/number.test.php | 0 .../cases/libs/view/helpers/paginator.test.php | 0 .../libs/view/helpers/prototype_engine.test.php | 0 .../tests/cases/libs/view/helpers/rss.test.php | 0 .../tests/cases/libs/view/helpers/session.test.php | 0 .../tests/cases/libs/view/helpers/text.test.php | 0 .../tests/cases/libs/view/helpers/time.test.php | 0 .../Cake}/tests/cases/libs/view/media.test.php | 0 .../Cake}/tests/cases/libs/view/theme.test.php | 0 .../Cake}/tests/cases/libs/view/view.test.php | 0 {cake => lib/Cake}/tests/cases/libs/xml.test.php | 0 .../Cake}/tests/fixtures/account_fixture.php | 0 .../Cake}/tests/fixtures/aco_action_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/aco_fixture.php | 0 .../Cake}/tests/fixtures/aco_two_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/ad_fixture.php | 0 .../Cake}/tests/fixtures/advertisement_fixture.php | 0 .../Cake}/tests/fixtures/after_tree_fixture.php | 0 .../tests/fixtures/another_article_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/apple_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/aro_fixture.php | 0 .../Cake}/tests/fixtures/aro_two_fixture.php | 0 .../Cake}/tests/fixtures/aros_aco_fixture.php | 0 .../Cake}/tests/fixtures/aros_aco_two_fixture.php | 0 .../tests/fixtures/article_featured_fixture.php | 0 .../fixtures/article_featureds_tags_fixture.php | 0 .../Cake}/tests/fixtures/article_fixture.php | 0 .../Cake}/tests/fixtures/articles_tag_fixture.php | 0 .../Cake}/tests/fixtures/assert_tags_test_case.php | 0 .../Cake}/tests/fixtures/attachment_fixture.php | 0 .../fixtures/auth_user_custom_field_fixture.php | 0 .../Cake}/tests/fixtures/auth_user_fixture.php | 0 .../Cake}/tests/fixtures/author_fixture.php | 0 .../Cake}/tests/fixtures/bake_article_fixture.php | 0 .../fixtures/bake_articles_bake_tag_fixture.php | 0 .../Cake}/tests/fixtures/bake_comment_fixture.php | 0 .../Cake}/tests/fixtures/bake_tag_fixture.php | 0 .../Cake}/tests/fixtures/basket_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/bid_fixture.php | 0 .../Cake}/tests/fixtures/binary_test_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/book_fixture.php | 0 .../tests/fixtures/cache_test_model_fixture.php | 0 .../Cake}/tests/fixtures/callback_fixture.php | 0 .../Cake}/tests/fixtures/campaign_fixture.php | 0 .../Cake}/tests/fixtures/category_fixture.php | 0 .../tests/fixtures/category_thread_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/cd_fixture.php | 0 .../Cake}/tests/fixtures/comment_fixture.php | 0 .../tests/fixtures/content_account_fixture.php | 0 .../Cake}/tests/fixtures/content_fixture.php | 0 .../tests/fixtures/counter_cache_post_fixture.php | 0 ...r_cache_post_nonstandard_primary_key_fixture.php | 0 .../tests/fixtures/counter_cache_user_fixture.php | 0 ...r_cache_user_nonstandard_primary_key_fixture.php | 0 .../Cake}/tests/fixtures/data_test_fixture.php | 0 .../Cake}/tests/fixtures/datatype_fixture.php | 0 .../Cake}/tests/fixtures/dependency_fixture.php | 0 .../Cake}/tests/fixtures/device_fixture.php | 0 .../tests/fixtures/device_type_category_fixture.php | 0 .../Cake}/tests/fixtures/device_type_fixture.php | 0 .../tests/fixtures/document_directory_fixture.php | 0 .../Cake}/tests/fixtures/document_fixture.php | 0 .../fixtures/exterior_type_category_fixture.php | 0 .../Cake}/tests/fixtures/feature_set_fixture.php | 0 .../Cake}/tests/fixtures/featured_fixture.php | 0 .../Cake}/tests/fixtures/film_file_fixture.php | 0 .../Cake}/tests/fixtures/fixturized_test_case.php | 0 .../Cake}/tests/fixtures/flag_tree_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/fruit_fixture.php | 0 .../tests/fixtures/fruits_uuid_tag_fixture.php | 0 .../tests/fixtures/group_update_all_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/home_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/image_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/item_fixture.php | 0 .../tests/fixtures/items_portfolio_fixture.php | 0 .../Cake}/tests/fixtures/join_a_b_fixture.php | 0 .../Cake}/tests/fixtures/join_a_c_fixture.php | 0 .../Cake}/tests/fixtures/join_a_fixture.php | 0 .../Cake}/tests/fixtures/join_b_fixture.php | 0 .../Cake}/tests/fixtures/join_c_fixture.php | 0 .../Cake}/tests/fixtures/join_thing_fixture.php | 0 .../Cake}/tests/fixtures/message_fixture.php | 0 .../fixtures/my_categories_my_products_fixture.php | 0 .../fixtures/my_categories_my_users_fixture.php | 0 .../Cake}/tests/fixtures/my_category_fixture.php | 0 .../Cake}/tests/fixtures/my_product_fixture.php | 0 .../Cake}/tests/fixtures/my_user_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/node_fixture.php | 0 .../Cake}/tests/fixtures/number_tree_fixture.php | 0 .../tests/fixtures/number_tree_two_fixture.php | 0 .../tests/fixtures/numeric_article_fixture.php | 0 .../tests/fixtures/overall_favorite_fixture.php | 0 .../Cake}/tests/fixtures/person_fixture.php | 0 .../Cake}/tests/fixtures/portfolio_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/post_fixture.php | 0 .../Cake}/tests/fixtures/posts_tag_fixture.php | 0 .../Cake}/tests/fixtures/primary_model_fixture.php | 0 .../Cake}/tests/fixtures/product_fixture.php | 0 .../tests/fixtures/product_update_all_fixture.php | 0 .../Cake}/tests/fixtures/project_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/rss.xml | 0 {cake => lib/Cake}/tests/fixtures/sample.xml | 0 .../Cake}/tests/fixtures/sample_fixture.php | 0 .../tests/fixtures/secondary_model_fixture.php | 0 .../Cake}/tests/fixtures/session_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/soap_request.xml | 0 {cake => lib/Cake}/tests/fixtures/soap_response.xml | 0 .../Cake}/tests/fixtures/something_else_fixture.php | 0 .../Cake}/tests/fixtures/something_fixture.php | 0 .../Cake}/tests/fixtures/stories_tag_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/story_fixture.php | 0 .../Cake}/tests/fixtures/syfile_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/tag_fixture.php | 0 .../tests/fixtures/test_plugin_article_fixture.php | 0 .../tests/fixtures/test_plugin_comment_fixture.php | 0 .../tests/fixtures/the_paper_monkies_fixture.php | 0 .../Cake}/tests/fixtures/thread_fixture.php | 0 .../tests/fixtures/translate_article_fixture.php | 0 .../Cake}/tests/fixtures/translate_fixture.php | 0 .../tests/fixtures/translate_table_fixture.php | 0 .../fixtures/translate_with_prefix_fixture.php | 0 .../tests/fixtures/translated_article_fixture.php | 0 .../tests/fixtures/translated_item_fixture.php | 0 .../tests/fixtures/unconventional_tree_fixture.php | 0 .../tests/fixtures/underscore_field_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/user_fixture.php | 0 {cake => lib/Cake}/tests/fixtures/uuid_fixture.php | 0 .../Cake}/tests/fixtures/uuid_tag_fixture.php | 0 .../Cake}/tests/fixtures/uuid_tree_fixture.php | 0 .../Cake}/tests/fixtures/uuiditem_fixture.php | 0 .../fixtures/uuiditems_uuidportfolio_fixture.php | 0 .../uuiditems_uuidportfolio_numericid_fixture.php | 0 .../Cake}/tests/fixtures/uuidportfolio_fixture.php | 0 .../Cake}/tests/test_app/config/acl.ini.php | 0 {cake => lib/Cake}/tests/test_app/config/empty.php | 0 {cake => lib/Cake}/tests/test_app/config/nested.ini | 0 .../Cake}/tests/test_app/config/var_test.php | 0 .../Cake}/tests/test_app/console/shells/sample.php | 0 .../Cake}/tests/test_app/console/shells/tasks/empty | 0 .../console/templates/test/classes/test_object.ctp | 0 .../tests/test_app/controllers/components/empty | 0 .../test_app/controllers/tests_apps_controller.php | 0 .../controllers/tests_apps_posts_controller.php | 0 .../tests/test_app/libs/cache/test_app_cache.php | 0 {cake => lib/Cake}/tests/test_app/libs/library.php | 0 .../Cake}/tests/test_app/libs/log/test_app_log.php | 0 .../test_app/libs/session/test_app_lib_session.php | 0 .../locale/cache_test_po/LC_MESSAGES/default.po | 0 .../locale/cache_test_po/LC_MESSAGES/dom1.po | 0 .../locale/cache_test_po/LC_MESSAGES/dom2.po | 0 .../Cake}/tests/test_app/locale/ja_jp/LC_TIME | 0 .../tests/test_app/locale/po/LC_MESSAGES/default.po | 0 .../tests/test_app/locale/po/LC_MONETARY/default.po | 0 {cake => lib/Cake}/tests/test_app/locale/po/LC_TIME | 0 .../test_app/locale/rule_0_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_0_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_0_po/LC_MESSAGES/core.po | 0 .../locale/rule_0_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_10_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_10_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_10_po/LC_MESSAGES/core.po | 0 .../locale/rule_10_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_11_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_11_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_11_po/LC_MESSAGES/core.po | 0 .../locale/rule_11_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_12_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_12_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_12_po/LC_MESSAGES/core.po | 0 .../locale/rule_12_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_13_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_13_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_13_po/LC_MESSAGES/core.po | 0 .../locale/rule_13_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_14_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_14_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_14_po/LC_MESSAGES/core.po | 0 .../locale/rule_14_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_1_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_1_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_1_po/LC_MESSAGES/core.po | 0 .../locale/rule_1_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_2_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_2_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_2_po/LC_MESSAGES/core.po | 0 .../locale/rule_2_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_3_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_3_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_3_po/LC_MESSAGES/core.po | 0 .../locale/rule_3_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_4_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_4_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_4_po/LC_MESSAGES/core.po | 0 .../locale/rule_4_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_5_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_5_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_5_po/LC_MESSAGES/core.po | 0 .../locale/rule_5_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_6_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_6_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_6_po/LC_MESSAGES/core.po | 0 .../locale/rule_6_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_7_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_7_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_7_po/LC_MESSAGES/core.po | 0 .../locale/rule_7_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_8_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_8_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_8_po/LC_MESSAGES/core.po | 0 .../locale/rule_8_po/LC_MESSAGES/default.po | 0 .../test_app/locale/rule_9_mo/LC_MESSAGES/core.mo | Bin .../locale/rule_9_mo/LC_MESSAGES/default.mo | Bin .../test_app/locale/rule_9_po/LC_MESSAGES/core.po | 0 .../locale/rule_9_po/LC_MESSAGES/default.po | 0 .../Cake}/tests/test_app/locale/time_test/LC_TIME | 0 .../Cake}/tests/test_app/models/behaviors/empty | 0 .../models/behaviors/persister_one_behavior.php | 0 .../models/behaviors/persister_two_behavior.php | 0 .../Cake}/tests/test_app/models/comment.php | 0 .../models/datasources/test/test_local_driver.php | 0 .../models/datasources/test2_other_source.php | 0 .../test_app/models/datasources/test2_source.php | 0 .../Cake}/tests/test_app/models/persister_one.php | 0 .../Cake}/tests/test_app/models/persister_two.php | 0 {cake => lib/Cake}/tests/test_app/models/post.php | 0 .../plugins/plugin_js/webroot/js/one/plugin_one.js | 0 .../plugins/plugin_js/webroot/js/plugin_js.js | 0 .../test_app/plugins/test_plugin/config/load.php | 0 .../plugins/test_plugin/config/more.load.php | 0 .../plugins/test_plugin/config/schema/schema.php | 0 .../plugins/test_plugin/console/shells/example.php | 0 .../plugins/test_plugin/console/shells/tasks/empty | 0 .../test_plugin/console/shells/tasks/other_task.php | 0 .../plugins/test_plugin/console/templates/empty | 0 .../controllers/components/other_component.php | 0 .../controllers/components/plugins_component.php | 0 .../components/test_plugin_component.php | 0 .../components/test_plugin_other_component.php | 0 .../controllers/test_plugin_controller.php | 0 .../test_plugin/controllers/tests_controller.php | 0 .../test_plugin/libs/cache/test_plugin_cache.php | 0 .../test_plugin/libs/log/test_plugin_log.php | 0 .../libs/session/test_plugin_session.php | 0 .../test_plugin/libs/test_plugin_library.php | 0 .../locale/po/LC_MESSAGES/test_plugin.po | 0 .../locale/po/LC_MONETARY/test_plugin.po | 0 .../models/behaviors/test_plugin_persister_one.php | 0 .../models/behaviors/test_plugin_persister_two.php | 0 .../models/datasources/dbo/dbo_dummy.php | 0 .../models/datasources/test/test_driver.php | 0 .../models/datasources/test_other_source.php | 0 .../test_plugin/models/datasources/test_source.php | 0 .../test_plugin/models/test_plugin_auth_user.php | 0 .../test_plugin/models/test_plugin_authors.php | 0 .../test_plugin/models/test_plugin_comment.php | 0 .../plugins/test_plugin/models/test_plugin_post.php | 0 .../test_plugin/test_plugin_app_controller.php | 0 .../plugins/test_plugin/test_plugin_app_model.php | 0 .../test_plugin/vendors/sample/sample_plugin.php | 0 .../plugins/test_plugin/vendors/welcome.php | 0 .../test_plugin/views/elements/plugin_element.ctp | 0 .../views/elements/test_plugin_element.ctp | 0 .../test_plugin/views/helpers/other_helper.php | 0 .../test_plugin/views/helpers/plugged_helper.php | 0 .../test_plugin/views/helpers/test_plugin_app.php | 0 .../plugins/test_plugin/views/layouts/default.ctp | 0 .../plugins/test_plugin/views/tests/index.ctp | 0 .../test_plugin/views/tests/scaffold.edit.ctp | 0 .../test_plugin/webroot/css/test_plugin_asset.css | 0 .../plugins/test_plugin/webroot/css/theme_one.htc | 0 .../test_plugin/webroot/css/unknown.extension | 0 .../test_plugin/webroot/flash/plugin_test.swf | 0 .../plugins/test_plugin/webroot/img/cake.icon.gif | Bin .../test_plugin/webroot/js/test_plugin/test.js | 0 .../test_plugin/webroot/pdfs/plugin_test.pdf | Bin .../test_app/plugins/test_plugin/webroot/root.js | 0 .../test_plugin_two/console/shells/example.php | 0 .../test_plugin_two/console/shells/tasks/empty | 0 .../test_plugin_two/console/shells/welcome.php | 0 .../plugins/test_plugin_two/console/templates/empty | 0 {cake => lib/Cake}/tests/test_app/tmp/dir_map | 0 .../Cake}/tests/test_app/vendors/Test/MyTest.php | 0 .../Cake}/tests/test_app/vendors/Test/hello.php | 0 .../Cake}/tests/test_app/vendors/css/test_asset.css | 0 .../Cake}/tests/test_app/vendors/img/test.jpg | Bin .../vendors/sample/configure_test_vendor_sample.php | 0 .../tests/test_app/vendors/somename/some.name.php | 0 .../Cake}/tests/test_app/vendors/welcome.php | 0 .../test_app/views/elements/email/html/custom.ctp | 0 .../test_app/views/elements/email/html/default.ctp | 0 .../test_app/views/elements/email/text/custom.ctp | 0 .../test_app/views/elements/email/text/default.ctp | 0 .../test_app/views/elements/email/text/wide.ctp | 0 .../Cake}/tests/test_app/views/elements/empty | 0 .../views/elements/nocache/contains_nocache.ctp | 0 .../tests/test_app/views/elements/nocache/plain.ctp | 0 .../tests/test_app/views/elements/nocache/sub1.ctp | 0 .../tests/test_app/views/elements/nocache/sub2.ctp | 0 .../test_app/views/elements/session_helper.ctp | 0 .../tests/test_app/views/elements/test_element.ctp | 0 .../Cake}/tests/test_app/views/errors/empty | 0 .../Cake}/tests/test_app/views/helpers/banana.php | 0 .../Cake}/tests/test_app/views/helpers/empty | 0 .../Cake}/tests/test_app/views/layouts/ajax.ctp | 0 .../Cake}/tests/test_app/views/layouts/ajax2.ctp | 0 .../test_app/views/layouts/cache_empty_sections.ctp | 0 .../tests/test_app/views/layouts/cache_layout.ctp | 0 .../Cake}/tests/test_app/views/layouts/default.ctp | 0 .../test_app/views/layouts/email/html/default.ctp | 0 .../test_app/views/layouts/email/html/thin.ctp | 0 .../test_app/views/layouts/email/text/default.ctp | 0 .../Cake}/tests/test_app/views/layouts/flash.ctp | 0 .../tests/test_app/views/layouts/js/default.ctp | 0 .../tests/test_app/views/layouts/multi_cache.ctp | 0 .../tests/test_app/views/layouts/rss/default.ctp | 0 .../tests/test_app/views/layouts/xml/default.ctp | 0 {cake => lib/Cake}/tests/test_app/views/pages/empty | 0 .../Cake}/tests/test_app/views/pages/extract.ctp | 0 .../Cake}/tests/test_app/views/pages/home.ctp | 0 .../test_app/views/posts/cache_empty_sections.ctp | 0 .../Cake}/tests/test_app/views/posts/cache_form.ctp | 0 .../tests/test_app/views/posts/helper_overwrite.ctp | 0 .../Cake}/tests/test_app/views/posts/index.ctp | 0 .../tests/test_app/views/posts/multiple_nocache.ctp | 0 .../views/posts/nocache_multiple_element.ctp | 0 .../tests/test_app/views/posts/scaffold.edit.ctp | 0 .../test_app/views/posts/sequencial_nocache.ctp | 0 .../test_app/views/posts/test_nocache_tags.ctp | 0 .../Cake}/tests/test_app/views/scaffolds/empty | 0 .../Cake}/tests/test_app/views/tests_apps/index.ctp | 0 .../themed/test_theme/elements/test_element.ctp | 0 .../views/themed/test_theme/layouts/default.ctp | 0 .../plugins/test_plugin/layouts/plugin_default.ctp | 0 .../test_theme/plugins/test_plugin/tests/index.ctp | 0 .../views/themed/test_theme/posts/index.ctp | 0 .../themed/test_theme/posts/scaffold.index.ctp | 0 .../themed/test_theme/webroot/css/test_asset.css | 0 .../themed/test_theme/webroot/css/theme_webroot.css | 0 .../themed/test_theme/webroot/flash/theme_test.swf | 0 .../themed/test_theme/webroot/img/cake.power.gif | Bin .../views/themed/test_theme/webroot/img/test.jpg | Bin .../themed/test_theme/webroot/js/one/theme_one.js | 0 .../views/themed/test_theme/webroot/js/theme.js | 0 .../themed/test_theme/webroot/pdfs/theme_test.pdf | Bin .../webroot/theme/test_theme/css/theme_webroot.css | 0 .../webroot/theme/test_theme/css/webroot_test.css | 0 .../webroot/theme/test_theme/img/cake.power.gif | Bin .../test_app/webroot/theme/test_theme/img/test.jpg | Bin 481 files changed, 0 insertions(+), 0 deletions(-) rename {cake => lib/Cake}/tests/cases/basics.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/all_console.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/all_console_libs.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/all_shells.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/all_tasks.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/libs/console_error_handler.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/libs/console_option_parser.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/libs/console_output.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/libs/help_formatter.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/libs/task_collection.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shell_dispatcher.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/acl.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/api.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/bake.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/command_list.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/schema.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/shell.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/controller.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/db_config.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/extract.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/fixture.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/model.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/plugin.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/project.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/template.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/test.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/tasks/view.test.php (100%) rename {cake => lib/Cake}/tests/cases/console/shells/testsuite.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_behaviors.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_cache_engines.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_components.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_configure.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_controllers.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_database.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_error.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_helpers.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_js_helpers.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_libs.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_localization.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_model.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_routing.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_socket.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_test_suite.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_tests.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_views.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/all_xml.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/app.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cache.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cache/apc.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cache/file.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cache/memcache.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cache/xcache.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cake_log.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cake_request.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cake_response.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cake_session.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cake_socket.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cake_test_case.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/cake_test_fixture.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/class_registry.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/config/ini_reader.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/config/php_reader.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/configure.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/component.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/component_collection.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/components/acl.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/components/auth.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/components/cookie.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/components/email.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/components/request_handler.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/components/security.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/components/session.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/controller.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/controller_merge_vars.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/pages_controller.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/controller/scaffold.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/debugger.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/dispatcher.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/error/error_handler.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/error/exception_renderer.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/file.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/folder.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/html_coverage_report.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/http_socket.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/i18n.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/inflector.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/l10n.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/log/file_log.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/magic_db.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/behavior_collection.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/behaviors/acl.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/behaviors/containable.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/behaviors/translate.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/behaviors/tree.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/cake_schema.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/connection_manager.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/datasources/dbo_source.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/db_acl.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/model.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/model_delete.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/model_integration.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/model_read.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/model_validation.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/model_write.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/model/models.php (100%) rename {cake => lib/Cake}/tests/cases/libs/multibyte.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/object.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/object_collection.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/route/cake_route.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/route/plugin_short_route.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/route/redirect_route.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/router.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/sanitize.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/security.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/session/cache_session.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/session/database_session.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/set.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/string.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/test_manager.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/validation.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helper.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helper_collection.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/cache.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/form.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/html.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/jquery_engine.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/js.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/mootools_engine.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/number.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/paginator.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/prototype_engine.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/rss.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/session.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/text.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/helpers/time.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/media.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/theme.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/view/view.test.php (100%) rename {cake => lib/Cake}/tests/cases/libs/xml.test.php (100%) rename {cake => lib/Cake}/tests/fixtures/account_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/aco_action_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/aco_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/aco_two_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/ad_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/advertisement_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/after_tree_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/another_article_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/apple_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/aro_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/aro_two_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/aros_aco_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/aros_aco_two_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/article_featured_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/article_featureds_tags_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/article_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/articles_tag_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/assert_tags_test_case.php (100%) rename {cake => lib/Cake}/tests/fixtures/attachment_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/auth_user_custom_field_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/auth_user_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/author_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/bake_article_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/bake_articles_bake_tag_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/bake_comment_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/bake_tag_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/basket_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/bid_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/binary_test_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/book_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/cache_test_model_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/callback_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/campaign_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/category_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/category_thread_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/cd_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/comment_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/content_account_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/content_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/counter_cache_post_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/counter_cache_user_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/data_test_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/datatype_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/dependency_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/device_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/device_type_category_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/device_type_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/document_directory_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/document_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/exterior_type_category_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/feature_set_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/featured_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/film_file_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/fixturized_test_case.php (100%) rename {cake => lib/Cake}/tests/fixtures/flag_tree_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/fruit_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/fruits_uuid_tag_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/group_update_all_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/home_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/image_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/item_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/items_portfolio_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/join_a_b_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/join_a_c_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/join_a_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/join_b_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/join_c_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/join_thing_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/message_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/my_categories_my_products_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/my_categories_my_users_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/my_category_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/my_product_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/my_user_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/node_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/number_tree_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/number_tree_two_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/numeric_article_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/overall_favorite_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/person_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/portfolio_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/post_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/posts_tag_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/primary_model_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/product_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/product_update_all_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/project_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/rss.xml (100%) rename {cake => lib/Cake}/tests/fixtures/sample.xml (100%) rename {cake => lib/Cake}/tests/fixtures/sample_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/secondary_model_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/session_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/soap_request.xml (100%) rename {cake => lib/Cake}/tests/fixtures/soap_response.xml (100%) rename {cake => lib/Cake}/tests/fixtures/something_else_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/something_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/stories_tag_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/story_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/syfile_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/tag_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/test_plugin_article_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/test_plugin_comment_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/the_paper_monkies_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/thread_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/translate_article_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/translate_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/translate_table_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/translate_with_prefix_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/translated_article_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/translated_item_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/unconventional_tree_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/underscore_field_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/user_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/uuid_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/uuid_tag_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/uuid_tree_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/uuiditem_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/uuiditems_uuidportfolio_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php (100%) rename {cake => lib/Cake}/tests/fixtures/uuidportfolio_fixture.php (100%) rename {cake => lib/Cake}/tests/test_app/config/acl.ini.php (100%) rename {cake => lib/Cake}/tests/test_app/config/empty.php (100%) rename {cake => lib/Cake}/tests/test_app/config/nested.ini (100%) rename {cake => lib/Cake}/tests/test_app/config/var_test.php (100%) rename {cake => lib/Cake}/tests/test_app/console/shells/sample.php (100%) rename {cake => lib/Cake}/tests/test_app/console/shells/tasks/empty (100%) rename {cake => lib/Cake}/tests/test_app/console/templates/test/classes/test_object.ctp (100%) rename {cake => lib/Cake}/tests/test_app/controllers/components/empty (100%) rename {cake => lib/Cake}/tests/test_app/controllers/tests_apps_controller.php (100%) rename {cake => lib/Cake}/tests/test_app/controllers/tests_apps_posts_controller.php (100%) rename {cake => lib/Cake}/tests/test_app/libs/cache/test_app_cache.php (100%) rename {cake => lib/Cake}/tests/test_app/libs/library.php (100%) rename {cake => lib/Cake}/tests/test_app/libs/log/test_app_log.php (100%) rename {cake => lib/Cake}/tests/test_app/libs/session/test_app_lib_session.php (100%) rename {cake => lib/Cake}/tests/test_app/locale/cache_test_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom1.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom2.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/ja_jp/LC_TIME (100%) rename {cake => lib/Cake}/tests/test_app/locale/po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/po/LC_MONETARY/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/po/LC_TIME (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_0_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_0_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_0_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_0_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_10_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_10_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_10_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_10_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_11_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_11_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_11_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_11_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_12_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_12_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_12_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_12_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_13_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_13_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_13_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_13_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_14_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_14_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_14_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_14_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_1_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_1_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_1_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_1_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_2_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_2_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_2_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_2_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_3_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_3_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_3_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_3_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_4_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_4_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_4_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_4_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_5_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_5_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_5_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_5_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_6_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_6_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_6_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_6_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_7_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_7_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_7_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_7_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_8_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_8_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_8_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_8_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_9_mo/LC_MESSAGES/core.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_9_mo/LC_MESSAGES/default.mo (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_9_po/LC_MESSAGES/core.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/rule_9_po/LC_MESSAGES/default.po (100%) rename {cake => lib/Cake}/tests/test_app/locale/time_test/LC_TIME (100%) rename {cake => lib/Cake}/tests/test_app/models/behaviors/empty (100%) rename {cake => lib/Cake}/tests/test_app/models/behaviors/persister_one_behavior.php (100%) rename {cake => lib/Cake}/tests/test_app/models/behaviors/persister_two_behavior.php (100%) rename {cake => lib/Cake}/tests/test_app/models/comment.php (100%) rename {cake => lib/Cake}/tests/test_app/models/datasources/test/test_local_driver.php (100%) rename {cake => lib/Cake}/tests/test_app/models/datasources/test2_other_source.php (100%) rename {cake => lib/Cake}/tests/test_app/models/datasources/test2_source.php (100%) rename {cake => lib/Cake}/tests/test_app/models/persister_one.php (100%) rename {cake => lib/Cake}/tests/test_app/models/persister_two.php (100%) rename {cake => lib/Cake}/tests/test_app/models/post.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/plugin_js/webroot/js/one/plugin_one.js (100%) rename {cake => lib/Cake}/tests/test_app/plugins/plugin_js/webroot/js/plugin_js.js (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/config/load.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/config/more.load.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/config/schema/schema.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/console/shells/example.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/console/shells/tasks/empty (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/console/shells/tasks/other_task.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/console/templates/empty (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/controllers/components/other_component.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/controllers/tests_controller.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/libs/session/test_plugin_session.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/locale/po/LC_MESSAGES/test_plugin.po (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/locale/po/LC_MONETARY/test_plugin.po (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/datasources/dbo/dbo_dummy.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/datasources/test/test_driver.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/datasources/test_other_source.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/datasources/test_source.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/models/test_plugin_post.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/test_plugin_app_model.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/vendors/welcome.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/views/elements/plugin_element.ctp (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/views/elements/test_plugin_element.ctp (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/views/helpers/test_plugin_app.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/views/layouts/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/views/tests/index.ctp (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/webroot/css/test_plugin_asset.css (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/webroot/css/theme_one.htc (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/webroot/css/unknown.extension (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/webroot/flash/plugin_test.swf (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/webroot/img/cake.icon.gif (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/webroot/js/test_plugin/test.js (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/webroot/pdfs/plugin_test.pdf (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/webroot/root.js (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin_two/console/shells/example.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin_two/console/shells/tasks/empty (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin_two/console/shells/welcome.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin_two/console/templates/empty (100%) rename {cake => lib/Cake}/tests/test_app/tmp/dir_map (100%) rename {cake => lib/Cake}/tests/test_app/vendors/Test/MyTest.php (100%) rename {cake => lib/Cake}/tests/test_app/vendors/Test/hello.php (100%) rename {cake => lib/Cake}/tests/test_app/vendors/css/test_asset.css (100%) rename {cake => lib/Cake}/tests/test_app/vendors/img/test.jpg (100%) rename {cake => lib/Cake}/tests/test_app/vendors/sample/configure_test_vendor_sample.php (100%) rename {cake => lib/Cake}/tests/test_app/vendors/somename/some.name.php (100%) rename {cake => lib/Cake}/tests/test_app/vendors/welcome.php (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/email/html/custom.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/email/html/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/email/text/custom.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/email/text/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/email/text/wide.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/empty (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/nocache/contains_nocache.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/nocache/plain.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/nocache/sub1.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/nocache/sub2.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/session_helper.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/test_element.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/errors/empty (100%) rename {cake => lib/Cake}/tests/test_app/views/helpers/banana.php (100%) rename {cake => lib/Cake}/tests/test_app/views/helpers/empty (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/ajax.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/ajax2.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/cache_empty_sections.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/cache_layout.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/email/html/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/email/html/thin.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/email/text/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/flash.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/js/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/multi_cache.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/rss/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/xml/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/pages/empty (100%) rename {cake => lib/Cake}/tests/test_app/views/pages/extract.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/pages/home.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/cache_empty_sections.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/cache_form.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/helper_overwrite.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/index.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/multiple_nocache.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/nocache_multiple_element.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/scaffold.edit.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/sequencial_nocache.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/test_nocache_tags.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/scaffolds/empty (100%) rename {cake => lib/Cake}/tests/test_app/views/tests_apps/index.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/elements/test_element.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/layouts/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/plugins/test_plugin/layouts/plugin_default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/plugins/test_plugin/tests/index.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/posts/index.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/posts/scaffold.index.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/webroot/css/test_asset.css (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/webroot/css/theme_webroot.css (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/webroot/flash/theme_test.swf (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/webroot/img/cake.power.gif (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/webroot/img/test.jpg (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/webroot/js/one/theme_one.js (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/webroot/js/theme.js (100%) rename {cake => lib/Cake}/tests/test_app/views/themed/test_theme/webroot/pdfs/theme_test.pdf (100%) rename {cake => lib/Cake}/tests/test_app/webroot/theme/test_theme/css/theme_webroot.css (100%) rename {cake => lib/Cake}/tests/test_app/webroot/theme/test_theme/css/webroot_test.css (100%) rename {cake => lib/Cake}/tests/test_app/webroot/theme/test_theme/img/cake.power.gif (100%) rename {cake => lib/Cake}/tests/test_app/webroot/theme/test_theme/img/test.jpg (100%) diff --git a/cake/tests/cases/basics.test.php b/lib/Cake/tests/cases/basics.test.php similarity index 100% rename from cake/tests/cases/basics.test.php rename to lib/Cake/tests/cases/basics.test.php diff --git a/cake/tests/cases/console/all_console.test.php b/lib/Cake/tests/cases/console/all_console.test.php similarity index 100% rename from cake/tests/cases/console/all_console.test.php rename to lib/Cake/tests/cases/console/all_console.test.php diff --git a/cake/tests/cases/console/all_console_libs.test.php b/lib/Cake/tests/cases/console/all_console_libs.test.php similarity index 100% rename from cake/tests/cases/console/all_console_libs.test.php rename to lib/Cake/tests/cases/console/all_console_libs.test.php diff --git a/cake/tests/cases/console/all_shells.test.php b/lib/Cake/tests/cases/console/all_shells.test.php similarity index 100% rename from cake/tests/cases/console/all_shells.test.php rename to lib/Cake/tests/cases/console/all_shells.test.php diff --git a/cake/tests/cases/console/all_tasks.test.php b/lib/Cake/tests/cases/console/all_tasks.test.php similarity index 100% rename from cake/tests/cases/console/all_tasks.test.php rename to lib/Cake/tests/cases/console/all_tasks.test.php diff --git a/cake/tests/cases/console/libs/console_error_handler.test.php b/lib/Cake/tests/cases/console/libs/console_error_handler.test.php similarity index 100% rename from cake/tests/cases/console/libs/console_error_handler.test.php rename to lib/Cake/tests/cases/console/libs/console_error_handler.test.php diff --git a/cake/tests/cases/console/libs/console_option_parser.test.php b/lib/Cake/tests/cases/console/libs/console_option_parser.test.php similarity index 100% rename from cake/tests/cases/console/libs/console_option_parser.test.php rename to lib/Cake/tests/cases/console/libs/console_option_parser.test.php diff --git a/cake/tests/cases/console/libs/console_output.test.php b/lib/Cake/tests/cases/console/libs/console_output.test.php similarity index 100% rename from cake/tests/cases/console/libs/console_output.test.php rename to lib/Cake/tests/cases/console/libs/console_output.test.php diff --git a/cake/tests/cases/console/libs/help_formatter.test.php b/lib/Cake/tests/cases/console/libs/help_formatter.test.php similarity index 100% rename from cake/tests/cases/console/libs/help_formatter.test.php rename to lib/Cake/tests/cases/console/libs/help_formatter.test.php diff --git a/cake/tests/cases/console/libs/task_collection.test.php b/lib/Cake/tests/cases/console/libs/task_collection.test.php similarity index 100% rename from cake/tests/cases/console/libs/task_collection.test.php rename to lib/Cake/tests/cases/console/libs/task_collection.test.php diff --git a/cake/tests/cases/console/shell_dispatcher.test.php b/lib/Cake/tests/cases/console/shell_dispatcher.test.php similarity index 100% rename from cake/tests/cases/console/shell_dispatcher.test.php rename to lib/Cake/tests/cases/console/shell_dispatcher.test.php diff --git a/cake/tests/cases/console/shells/acl.test.php b/lib/Cake/tests/cases/console/shells/acl.test.php similarity index 100% rename from cake/tests/cases/console/shells/acl.test.php rename to lib/Cake/tests/cases/console/shells/acl.test.php diff --git a/cake/tests/cases/console/shells/api.test.php b/lib/Cake/tests/cases/console/shells/api.test.php similarity index 100% rename from cake/tests/cases/console/shells/api.test.php rename to lib/Cake/tests/cases/console/shells/api.test.php diff --git a/cake/tests/cases/console/shells/bake.test.php b/lib/Cake/tests/cases/console/shells/bake.test.php similarity index 100% rename from cake/tests/cases/console/shells/bake.test.php rename to lib/Cake/tests/cases/console/shells/bake.test.php diff --git a/cake/tests/cases/console/shells/command_list.test.php b/lib/Cake/tests/cases/console/shells/command_list.test.php similarity index 100% rename from cake/tests/cases/console/shells/command_list.test.php rename to lib/Cake/tests/cases/console/shells/command_list.test.php diff --git a/cake/tests/cases/console/shells/schema.test.php b/lib/Cake/tests/cases/console/shells/schema.test.php similarity index 100% rename from cake/tests/cases/console/shells/schema.test.php rename to lib/Cake/tests/cases/console/shells/schema.test.php diff --git a/cake/tests/cases/console/shells/shell.test.php b/lib/Cake/tests/cases/console/shells/shell.test.php similarity index 100% rename from cake/tests/cases/console/shells/shell.test.php rename to lib/Cake/tests/cases/console/shells/shell.test.php diff --git a/cake/tests/cases/console/shells/tasks/controller.test.php b/lib/Cake/tests/cases/console/shells/tasks/controller.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/controller.test.php rename to lib/Cake/tests/cases/console/shells/tasks/controller.test.php diff --git a/cake/tests/cases/console/shells/tasks/db_config.test.php b/lib/Cake/tests/cases/console/shells/tasks/db_config.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/db_config.test.php rename to lib/Cake/tests/cases/console/shells/tasks/db_config.test.php diff --git a/cake/tests/cases/console/shells/tasks/extract.test.php b/lib/Cake/tests/cases/console/shells/tasks/extract.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/extract.test.php rename to lib/Cake/tests/cases/console/shells/tasks/extract.test.php diff --git a/cake/tests/cases/console/shells/tasks/fixture.test.php b/lib/Cake/tests/cases/console/shells/tasks/fixture.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/fixture.test.php rename to lib/Cake/tests/cases/console/shells/tasks/fixture.test.php diff --git a/cake/tests/cases/console/shells/tasks/model.test.php b/lib/Cake/tests/cases/console/shells/tasks/model.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/model.test.php rename to lib/Cake/tests/cases/console/shells/tasks/model.test.php diff --git a/cake/tests/cases/console/shells/tasks/plugin.test.php b/lib/Cake/tests/cases/console/shells/tasks/plugin.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/plugin.test.php rename to lib/Cake/tests/cases/console/shells/tasks/plugin.test.php diff --git a/cake/tests/cases/console/shells/tasks/project.test.php b/lib/Cake/tests/cases/console/shells/tasks/project.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/project.test.php rename to lib/Cake/tests/cases/console/shells/tasks/project.test.php diff --git a/cake/tests/cases/console/shells/tasks/template.test.php b/lib/Cake/tests/cases/console/shells/tasks/template.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/template.test.php rename to lib/Cake/tests/cases/console/shells/tasks/template.test.php diff --git a/cake/tests/cases/console/shells/tasks/test.test.php b/lib/Cake/tests/cases/console/shells/tasks/test.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/test.test.php rename to lib/Cake/tests/cases/console/shells/tasks/test.test.php diff --git a/cake/tests/cases/console/shells/tasks/view.test.php b/lib/Cake/tests/cases/console/shells/tasks/view.test.php similarity index 100% rename from cake/tests/cases/console/shells/tasks/view.test.php rename to lib/Cake/tests/cases/console/shells/tasks/view.test.php diff --git a/cake/tests/cases/console/shells/testsuite.test.php b/lib/Cake/tests/cases/console/shells/testsuite.test.php similarity index 100% rename from cake/tests/cases/console/shells/testsuite.test.php rename to lib/Cake/tests/cases/console/shells/testsuite.test.php diff --git a/cake/tests/cases/libs/all_behaviors.test.php b/lib/Cake/tests/cases/libs/all_behaviors.test.php similarity index 100% rename from cake/tests/cases/libs/all_behaviors.test.php rename to lib/Cake/tests/cases/libs/all_behaviors.test.php diff --git a/cake/tests/cases/libs/all_cache_engines.test.php b/lib/Cake/tests/cases/libs/all_cache_engines.test.php similarity index 100% rename from cake/tests/cases/libs/all_cache_engines.test.php rename to lib/Cake/tests/cases/libs/all_cache_engines.test.php diff --git a/cake/tests/cases/libs/all_components.test.php b/lib/Cake/tests/cases/libs/all_components.test.php similarity index 100% rename from cake/tests/cases/libs/all_components.test.php rename to lib/Cake/tests/cases/libs/all_components.test.php diff --git a/cake/tests/cases/libs/all_configure.test.php b/lib/Cake/tests/cases/libs/all_configure.test.php similarity index 100% rename from cake/tests/cases/libs/all_configure.test.php rename to lib/Cake/tests/cases/libs/all_configure.test.php diff --git a/cake/tests/cases/libs/all_controllers.test.php b/lib/Cake/tests/cases/libs/all_controllers.test.php similarity index 100% rename from cake/tests/cases/libs/all_controllers.test.php rename to lib/Cake/tests/cases/libs/all_controllers.test.php diff --git a/cake/tests/cases/libs/all_database.test.php b/lib/Cake/tests/cases/libs/all_database.test.php similarity index 100% rename from cake/tests/cases/libs/all_database.test.php rename to lib/Cake/tests/cases/libs/all_database.test.php diff --git a/cake/tests/cases/libs/all_error.test.php b/lib/Cake/tests/cases/libs/all_error.test.php similarity index 100% rename from cake/tests/cases/libs/all_error.test.php rename to lib/Cake/tests/cases/libs/all_error.test.php diff --git a/cake/tests/cases/libs/all_helpers.test.php b/lib/Cake/tests/cases/libs/all_helpers.test.php similarity index 100% rename from cake/tests/cases/libs/all_helpers.test.php rename to lib/Cake/tests/cases/libs/all_helpers.test.php diff --git a/cake/tests/cases/libs/all_js_helpers.test.php b/lib/Cake/tests/cases/libs/all_js_helpers.test.php similarity index 100% rename from cake/tests/cases/libs/all_js_helpers.test.php rename to lib/Cake/tests/cases/libs/all_js_helpers.test.php diff --git a/cake/tests/cases/libs/all_libs.test.php b/lib/Cake/tests/cases/libs/all_libs.test.php similarity index 100% rename from cake/tests/cases/libs/all_libs.test.php rename to lib/Cake/tests/cases/libs/all_libs.test.php diff --git a/cake/tests/cases/libs/all_localization.test.php b/lib/Cake/tests/cases/libs/all_localization.test.php similarity index 100% rename from cake/tests/cases/libs/all_localization.test.php rename to lib/Cake/tests/cases/libs/all_localization.test.php diff --git a/cake/tests/cases/libs/all_model.test.php b/lib/Cake/tests/cases/libs/all_model.test.php similarity index 100% rename from cake/tests/cases/libs/all_model.test.php rename to lib/Cake/tests/cases/libs/all_model.test.php diff --git a/cake/tests/cases/libs/all_routing.test.php b/lib/Cake/tests/cases/libs/all_routing.test.php similarity index 100% rename from cake/tests/cases/libs/all_routing.test.php rename to lib/Cake/tests/cases/libs/all_routing.test.php diff --git a/cake/tests/cases/libs/all_socket.test.php b/lib/Cake/tests/cases/libs/all_socket.test.php similarity index 100% rename from cake/tests/cases/libs/all_socket.test.php rename to lib/Cake/tests/cases/libs/all_socket.test.php diff --git a/cake/tests/cases/libs/all_test_suite.test.php b/lib/Cake/tests/cases/libs/all_test_suite.test.php similarity index 100% rename from cake/tests/cases/libs/all_test_suite.test.php rename to lib/Cake/tests/cases/libs/all_test_suite.test.php diff --git a/cake/tests/cases/libs/all_tests.test.php b/lib/Cake/tests/cases/libs/all_tests.test.php similarity index 100% rename from cake/tests/cases/libs/all_tests.test.php rename to lib/Cake/tests/cases/libs/all_tests.test.php diff --git a/cake/tests/cases/libs/all_views.test.php b/lib/Cake/tests/cases/libs/all_views.test.php similarity index 100% rename from cake/tests/cases/libs/all_views.test.php rename to lib/Cake/tests/cases/libs/all_views.test.php diff --git a/cake/tests/cases/libs/all_xml.test.php b/lib/Cake/tests/cases/libs/all_xml.test.php similarity index 100% rename from cake/tests/cases/libs/all_xml.test.php rename to lib/Cake/tests/cases/libs/all_xml.test.php diff --git a/cake/tests/cases/libs/app.test.php b/lib/Cake/tests/cases/libs/app.test.php similarity index 100% rename from cake/tests/cases/libs/app.test.php rename to lib/Cake/tests/cases/libs/app.test.php diff --git a/cake/tests/cases/libs/cache.test.php b/lib/Cake/tests/cases/libs/cache.test.php similarity index 100% rename from cake/tests/cases/libs/cache.test.php rename to lib/Cake/tests/cases/libs/cache.test.php diff --git a/cake/tests/cases/libs/cache/apc.test.php b/lib/Cake/tests/cases/libs/cache/apc.test.php similarity index 100% rename from cake/tests/cases/libs/cache/apc.test.php rename to lib/Cake/tests/cases/libs/cache/apc.test.php diff --git a/cake/tests/cases/libs/cache/file.test.php b/lib/Cake/tests/cases/libs/cache/file.test.php similarity index 100% rename from cake/tests/cases/libs/cache/file.test.php rename to lib/Cake/tests/cases/libs/cache/file.test.php diff --git a/cake/tests/cases/libs/cache/memcache.test.php b/lib/Cake/tests/cases/libs/cache/memcache.test.php similarity index 100% rename from cake/tests/cases/libs/cache/memcache.test.php rename to lib/Cake/tests/cases/libs/cache/memcache.test.php diff --git a/cake/tests/cases/libs/cache/xcache.test.php b/lib/Cake/tests/cases/libs/cache/xcache.test.php similarity index 100% rename from cake/tests/cases/libs/cache/xcache.test.php rename to lib/Cake/tests/cases/libs/cache/xcache.test.php diff --git a/cake/tests/cases/libs/cake_log.test.php b/lib/Cake/tests/cases/libs/cake_log.test.php similarity index 100% rename from cake/tests/cases/libs/cake_log.test.php rename to lib/Cake/tests/cases/libs/cake_log.test.php diff --git a/cake/tests/cases/libs/cake_request.test.php b/lib/Cake/tests/cases/libs/cake_request.test.php similarity index 100% rename from cake/tests/cases/libs/cake_request.test.php rename to lib/Cake/tests/cases/libs/cake_request.test.php diff --git a/cake/tests/cases/libs/cake_response.test.php b/lib/Cake/tests/cases/libs/cake_response.test.php similarity index 100% rename from cake/tests/cases/libs/cake_response.test.php rename to lib/Cake/tests/cases/libs/cake_response.test.php diff --git a/cake/tests/cases/libs/cake_session.test.php b/lib/Cake/tests/cases/libs/cake_session.test.php similarity index 100% rename from cake/tests/cases/libs/cake_session.test.php rename to lib/Cake/tests/cases/libs/cake_session.test.php diff --git a/cake/tests/cases/libs/cake_socket.test.php b/lib/Cake/tests/cases/libs/cake_socket.test.php similarity index 100% rename from cake/tests/cases/libs/cake_socket.test.php rename to lib/Cake/tests/cases/libs/cake_socket.test.php diff --git a/cake/tests/cases/libs/cake_test_case.test.php b/lib/Cake/tests/cases/libs/cake_test_case.test.php similarity index 100% rename from cake/tests/cases/libs/cake_test_case.test.php rename to lib/Cake/tests/cases/libs/cake_test_case.test.php diff --git a/cake/tests/cases/libs/cake_test_fixture.test.php b/lib/Cake/tests/cases/libs/cake_test_fixture.test.php similarity index 100% rename from cake/tests/cases/libs/cake_test_fixture.test.php rename to lib/Cake/tests/cases/libs/cake_test_fixture.test.php diff --git a/cake/tests/cases/libs/class_registry.test.php b/lib/Cake/tests/cases/libs/class_registry.test.php similarity index 100% rename from cake/tests/cases/libs/class_registry.test.php rename to lib/Cake/tests/cases/libs/class_registry.test.php diff --git a/cake/tests/cases/libs/config/ini_reader.test.php b/lib/Cake/tests/cases/libs/config/ini_reader.test.php similarity index 100% rename from cake/tests/cases/libs/config/ini_reader.test.php rename to lib/Cake/tests/cases/libs/config/ini_reader.test.php diff --git a/cake/tests/cases/libs/config/php_reader.test.php b/lib/Cake/tests/cases/libs/config/php_reader.test.php similarity index 100% rename from cake/tests/cases/libs/config/php_reader.test.php rename to lib/Cake/tests/cases/libs/config/php_reader.test.php diff --git a/cake/tests/cases/libs/configure.test.php b/lib/Cake/tests/cases/libs/configure.test.php similarity index 100% rename from cake/tests/cases/libs/configure.test.php rename to lib/Cake/tests/cases/libs/configure.test.php diff --git a/cake/tests/cases/libs/controller/component.test.php b/lib/Cake/tests/cases/libs/controller/component.test.php similarity index 100% rename from cake/tests/cases/libs/controller/component.test.php rename to lib/Cake/tests/cases/libs/controller/component.test.php diff --git a/cake/tests/cases/libs/controller/component_collection.test.php b/lib/Cake/tests/cases/libs/controller/component_collection.test.php similarity index 100% rename from cake/tests/cases/libs/controller/component_collection.test.php rename to lib/Cake/tests/cases/libs/controller/component_collection.test.php diff --git a/cake/tests/cases/libs/controller/components/acl.test.php b/lib/Cake/tests/cases/libs/controller/components/acl.test.php similarity index 100% rename from cake/tests/cases/libs/controller/components/acl.test.php rename to lib/Cake/tests/cases/libs/controller/components/acl.test.php diff --git a/cake/tests/cases/libs/controller/components/auth.test.php b/lib/Cake/tests/cases/libs/controller/components/auth.test.php similarity index 100% rename from cake/tests/cases/libs/controller/components/auth.test.php rename to lib/Cake/tests/cases/libs/controller/components/auth.test.php diff --git a/cake/tests/cases/libs/controller/components/cookie.test.php b/lib/Cake/tests/cases/libs/controller/components/cookie.test.php similarity index 100% rename from cake/tests/cases/libs/controller/components/cookie.test.php rename to lib/Cake/tests/cases/libs/controller/components/cookie.test.php diff --git a/cake/tests/cases/libs/controller/components/email.test.php b/lib/Cake/tests/cases/libs/controller/components/email.test.php similarity index 100% rename from cake/tests/cases/libs/controller/components/email.test.php rename to lib/Cake/tests/cases/libs/controller/components/email.test.php diff --git a/cake/tests/cases/libs/controller/components/request_handler.test.php b/lib/Cake/tests/cases/libs/controller/components/request_handler.test.php similarity index 100% rename from cake/tests/cases/libs/controller/components/request_handler.test.php rename to lib/Cake/tests/cases/libs/controller/components/request_handler.test.php diff --git a/cake/tests/cases/libs/controller/components/security.test.php b/lib/Cake/tests/cases/libs/controller/components/security.test.php similarity index 100% rename from cake/tests/cases/libs/controller/components/security.test.php rename to lib/Cake/tests/cases/libs/controller/components/security.test.php diff --git a/cake/tests/cases/libs/controller/components/session.test.php b/lib/Cake/tests/cases/libs/controller/components/session.test.php similarity index 100% rename from cake/tests/cases/libs/controller/components/session.test.php rename to lib/Cake/tests/cases/libs/controller/components/session.test.php diff --git a/cake/tests/cases/libs/controller/controller.test.php b/lib/Cake/tests/cases/libs/controller/controller.test.php similarity index 100% rename from cake/tests/cases/libs/controller/controller.test.php rename to lib/Cake/tests/cases/libs/controller/controller.test.php diff --git a/cake/tests/cases/libs/controller/controller_merge_vars.test.php b/lib/Cake/tests/cases/libs/controller/controller_merge_vars.test.php similarity index 100% rename from cake/tests/cases/libs/controller/controller_merge_vars.test.php rename to lib/Cake/tests/cases/libs/controller/controller_merge_vars.test.php diff --git a/cake/tests/cases/libs/controller/pages_controller.test.php b/lib/Cake/tests/cases/libs/controller/pages_controller.test.php similarity index 100% rename from cake/tests/cases/libs/controller/pages_controller.test.php rename to lib/Cake/tests/cases/libs/controller/pages_controller.test.php diff --git a/cake/tests/cases/libs/controller/scaffold.test.php b/lib/Cake/tests/cases/libs/controller/scaffold.test.php similarity index 100% rename from cake/tests/cases/libs/controller/scaffold.test.php rename to lib/Cake/tests/cases/libs/controller/scaffold.test.php diff --git a/cake/tests/cases/libs/debugger.test.php b/lib/Cake/tests/cases/libs/debugger.test.php similarity index 100% rename from cake/tests/cases/libs/debugger.test.php rename to lib/Cake/tests/cases/libs/debugger.test.php diff --git a/cake/tests/cases/libs/dispatcher.test.php b/lib/Cake/tests/cases/libs/dispatcher.test.php similarity index 100% rename from cake/tests/cases/libs/dispatcher.test.php rename to lib/Cake/tests/cases/libs/dispatcher.test.php diff --git a/cake/tests/cases/libs/error/error_handler.test.php b/lib/Cake/tests/cases/libs/error/error_handler.test.php similarity index 100% rename from cake/tests/cases/libs/error/error_handler.test.php rename to lib/Cake/tests/cases/libs/error/error_handler.test.php diff --git a/cake/tests/cases/libs/error/exception_renderer.test.php b/lib/Cake/tests/cases/libs/error/exception_renderer.test.php similarity index 100% rename from cake/tests/cases/libs/error/exception_renderer.test.php rename to lib/Cake/tests/cases/libs/error/exception_renderer.test.php diff --git a/cake/tests/cases/libs/file.test.php b/lib/Cake/tests/cases/libs/file.test.php similarity index 100% rename from cake/tests/cases/libs/file.test.php rename to lib/Cake/tests/cases/libs/file.test.php diff --git a/cake/tests/cases/libs/folder.test.php b/lib/Cake/tests/cases/libs/folder.test.php similarity index 100% rename from cake/tests/cases/libs/folder.test.php rename to lib/Cake/tests/cases/libs/folder.test.php diff --git a/cake/tests/cases/libs/html_coverage_report.test.php b/lib/Cake/tests/cases/libs/html_coverage_report.test.php similarity index 100% rename from cake/tests/cases/libs/html_coverage_report.test.php rename to lib/Cake/tests/cases/libs/html_coverage_report.test.php diff --git a/cake/tests/cases/libs/http_socket.test.php b/lib/Cake/tests/cases/libs/http_socket.test.php similarity index 100% rename from cake/tests/cases/libs/http_socket.test.php rename to lib/Cake/tests/cases/libs/http_socket.test.php diff --git a/cake/tests/cases/libs/i18n.test.php b/lib/Cake/tests/cases/libs/i18n.test.php similarity index 100% rename from cake/tests/cases/libs/i18n.test.php rename to lib/Cake/tests/cases/libs/i18n.test.php diff --git a/cake/tests/cases/libs/inflector.test.php b/lib/Cake/tests/cases/libs/inflector.test.php similarity index 100% rename from cake/tests/cases/libs/inflector.test.php rename to lib/Cake/tests/cases/libs/inflector.test.php diff --git a/cake/tests/cases/libs/l10n.test.php b/lib/Cake/tests/cases/libs/l10n.test.php similarity index 100% rename from cake/tests/cases/libs/l10n.test.php rename to lib/Cake/tests/cases/libs/l10n.test.php diff --git a/cake/tests/cases/libs/log/file_log.test.php b/lib/Cake/tests/cases/libs/log/file_log.test.php similarity index 100% rename from cake/tests/cases/libs/log/file_log.test.php rename to lib/Cake/tests/cases/libs/log/file_log.test.php diff --git a/cake/tests/cases/libs/magic_db.test.php b/lib/Cake/tests/cases/libs/magic_db.test.php similarity index 100% rename from cake/tests/cases/libs/magic_db.test.php rename to lib/Cake/tests/cases/libs/magic_db.test.php diff --git a/cake/tests/cases/libs/model/behavior_collection.test.php b/lib/Cake/tests/cases/libs/model/behavior_collection.test.php similarity index 100% rename from cake/tests/cases/libs/model/behavior_collection.test.php rename to lib/Cake/tests/cases/libs/model/behavior_collection.test.php diff --git a/cake/tests/cases/libs/model/behaviors/acl.test.php b/lib/Cake/tests/cases/libs/model/behaviors/acl.test.php similarity index 100% rename from cake/tests/cases/libs/model/behaviors/acl.test.php rename to lib/Cake/tests/cases/libs/model/behaviors/acl.test.php diff --git a/cake/tests/cases/libs/model/behaviors/containable.test.php b/lib/Cake/tests/cases/libs/model/behaviors/containable.test.php similarity index 100% rename from cake/tests/cases/libs/model/behaviors/containable.test.php rename to lib/Cake/tests/cases/libs/model/behaviors/containable.test.php diff --git a/cake/tests/cases/libs/model/behaviors/translate.test.php b/lib/Cake/tests/cases/libs/model/behaviors/translate.test.php similarity index 100% rename from cake/tests/cases/libs/model/behaviors/translate.test.php rename to lib/Cake/tests/cases/libs/model/behaviors/translate.test.php diff --git a/cake/tests/cases/libs/model/behaviors/tree.test.php b/lib/Cake/tests/cases/libs/model/behaviors/tree.test.php similarity index 100% rename from cake/tests/cases/libs/model/behaviors/tree.test.php rename to lib/Cake/tests/cases/libs/model/behaviors/tree.test.php diff --git a/cake/tests/cases/libs/model/cake_schema.test.php b/lib/Cake/tests/cases/libs/model/cake_schema.test.php similarity index 100% rename from cake/tests/cases/libs/model/cake_schema.test.php rename to lib/Cake/tests/cases/libs/model/cake_schema.test.php diff --git a/cake/tests/cases/libs/model/connection_manager.test.php b/lib/Cake/tests/cases/libs/model/connection_manager.test.php similarity index 100% rename from cake/tests/cases/libs/model/connection_manager.test.php rename to lib/Cake/tests/cases/libs/model/connection_manager.test.php diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php similarity index 100% rename from cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php rename to lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php similarity index 100% rename from cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php rename to lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php similarity index 100% rename from cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php rename to lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php similarity index 100% rename from cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php rename to lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php similarity index 100% rename from cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php rename to lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php diff --git a/cake/tests/cases/libs/model/datasources/dbo_source.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo_source.test.php similarity index 100% rename from cake/tests/cases/libs/model/datasources/dbo_source.test.php rename to lib/Cake/tests/cases/libs/model/datasources/dbo_source.test.php diff --git a/cake/tests/cases/libs/model/db_acl.test.php b/lib/Cake/tests/cases/libs/model/db_acl.test.php similarity index 100% rename from cake/tests/cases/libs/model/db_acl.test.php rename to lib/Cake/tests/cases/libs/model/db_acl.test.php diff --git a/cake/tests/cases/libs/model/model.test.php b/lib/Cake/tests/cases/libs/model/model.test.php similarity index 100% rename from cake/tests/cases/libs/model/model.test.php rename to lib/Cake/tests/cases/libs/model/model.test.php diff --git a/cake/tests/cases/libs/model/model_delete.test.php b/lib/Cake/tests/cases/libs/model/model_delete.test.php similarity index 100% rename from cake/tests/cases/libs/model/model_delete.test.php rename to lib/Cake/tests/cases/libs/model/model_delete.test.php diff --git a/cake/tests/cases/libs/model/model_integration.test.php b/lib/Cake/tests/cases/libs/model/model_integration.test.php similarity index 100% rename from cake/tests/cases/libs/model/model_integration.test.php rename to lib/Cake/tests/cases/libs/model/model_integration.test.php diff --git a/cake/tests/cases/libs/model/model_read.test.php b/lib/Cake/tests/cases/libs/model/model_read.test.php similarity index 100% rename from cake/tests/cases/libs/model/model_read.test.php rename to lib/Cake/tests/cases/libs/model/model_read.test.php diff --git a/cake/tests/cases/libs/model/model_validation.test.php b/lib/Cake/tests/cases/libs/model/model_validation.test.php similarity index 100% rename from cake/tests/cases/libs/model/model_validation.test.php rename to lib/Cake/tests/cases/libs/model/model_validation.test.php diff --git a/cake/tests/cases/libs/model/model_write.test.php b/lib/Cake/tests/cases/libs/model/model_write.test.php similarity index 100% rename from cake/tests/cases/libs/model/model_write.test.php rename to lib/Cake/tests/cases/libs/model/model_write.test.php diff --git a/cake/tests/cases/libs/model/models.php b/lib/Cake/tests/cases/libs/model/models.php similarity index 100% rename from cake/tests/cases/libs/model/models.php rename to lib/Cake/tests/cases/libs/model/models.php diff --git a/cake/tests/cases/libs/multibyte.test.php b/lib/Cake/tests/cases/libs/multibyte.test.php similarity index 100% rename from cake/tests/cases/libs/multibyte.test.php rename to lib/Cake/tests/cases/libs/multibyte.test.php diff --git a/cake/tests/cases/libs/object.test.php b/lib/Cake/tests/cases/libs/object.test.php similarity index 100% rename from cake/tests/cases/libs/object.test.php rename to lib/Cake/tests/cases/libs/object.test.php diff --git a/cake/tests/cases/libs/object_collection.test.php b/lib/Cake/tests/cases/libs/object_collection.test.php similarity index 100% rename from cake/tests/cases/libs/object_collection.test.php rename to lib/Cake/tests/cases/libs/object_collection.test.php diff --git a/cake/tests/cases/libs/route/cake_route.test.php b/lib/Cake/tests/cases/libs/route/cake_route.test.php similarity index 100% rename from cake/tests/cases/libs/route/cake_route.test.php rename to lib/Cake/tests/cases/libs/route/cake_route.test.php diff --git a/cake/tests/cases/libs/route/plugin_short_route.test.php b/lib/Cake/tests/cases/libs/route/plugin_short_route.test.php similarity index 100% rename from cake/tests/cases/libs/route/plugin_short_route.test.php rename to lib/Cake/tests/cases/libs/route/plugin_short_route.test.php diff --git a/cake/tests/cases/libs/route/redirect_route.test.php b/lib/Cake/tests/cases/libs/route/redirect_route.test.php similarity index 100% rename from cake/tests/cases/libs/route/redirect_route.test.php rename to lib/Cake/tests/cases/libs/route/redirect_route.test.php diff --git a/cake/tests/cases/libs/router.test.php b/lib/Cake/tests/cases/libs/router.test.php similarity index 100% rename from cake/tests/cases/libs/router.test.php rename to lib/Cake/tests/cases/libs/router.test.php diff --git a/cake/tests/cases/libs/sanitize.test.php b/lib/Cake/tests/cases/libs/sanitize.test.php similarity index 100% rename from cake/tests/cases/libs/sanitize.test.php rename to lib/Cake/tests/cases/libs/sanitize.test.php diff --git a/cake/tests/cases/libs/security.test.php b/lib/Cake/tests/cases/libs/security.test.php similarity index 100% rename from cake/tests/cases/libs/security.test.php rename to lib/Cake/tests/cases/libs/security.test.php diff --git a/cake/tests/cases/libs/session/cache_session.test.php b/lib/Cake/tests/cases/libs/session/cache_session.test.php similarity index 100% rename from cake/tests/cases/libs/session/cache_session.test.php rename to lib/Cake/tests/cases/libs/session/cache_session.test.php diff --git a/cake/tests/cases/libs/session/database_session.test.php b/lib/Cake/tests/cases/libs/session/database_session.test.php similarity index 100% rename from cake/tests/cases/libs/session/database_session.test.php rename to lib/Cake/tests/cases/libs/session/database_session.test.php diff --git a/cake/tests/cases/libs/set.test.php b/lib/Cake/tests/cases/libs/set.test.php similarity index 100% rename from cake/tests/cases/libs/set.test.php rename to lib/Cake/tests/cases/libs/set.test.php diff --git a/cake/tests/cases/libs/string.test.php b/lib/Cake/tests/cases/libs/string.test.php similarity index 100% rename from cake/tests/cases/libs/string.test.php rename to lib/Cake/tests/cases/libs/string.test.php diff --git a/cake/tests/cases/libs/test_manager.test.php b/lib/Cake/tests/cases/libs/test_manager.test.php similarity index 100% rename from cake/tests/cases/libs/test_manager.test.php rename to lib/Cake/tests/cases/libs/test_manager.test.php diff --git a/cake/tests/cases/libs/validation.test.php b/lib/Cake/tests/cases/libs/validation.test.php similarity index 100% rename from cake/tests/cases/libs/validation.test.php rename to lib/Cake/tests/cases/libs/validation.test.php diff --git a/cake/tests/cases/libs/view/helper.test.php b/lib/Cake/tests/cases/libs/view/helper.test.php similarity index 100% rename from cake/tests/cases/libs/view/helper.test.php rename to lib/Cake/tests/cases/libs/view/helper.test.php diff --git a/cake/tests/cases/libs/view/helper_collection.test.php b/lib/Cake/tests/cases/libs/view/helper_collection.test.php similarity index 100% rename from cake/tests/cases/libs/view/helper_collection.test.php rename to lib/Cake/tests/cases/libs/view/helper_collection.test.php diff --git a/cake/tests/cases/libs/view/helpers/cache.test.php b/lib/Cake/tests/cases/libs/view/helpers/cache.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/cache.test.php rename to lib/Cake/tests/cases/libs/view/helpers/cache.test.php diff --git a/cake/tests/cases/libs/view/helpers/form.test.php b/lib/Cake/tests/cases/libs/view/helpers/form.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/form.test.php rename to lib/Cake/tests/cases/libs/view/helpers/form.test.php diff --git a/cake/tests/cases/libs/view/helpers/html.test.php b/lib/Cake/tests/cases/libs/view/helpers/html.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/html.test.php rename to lib/Cake/tests/cases/libs/view/helpers/html.test.php diff --git a/cake/tests/cases/libs/view/helpers/jquery_engine.test.php b/lib/Cake/tests/cases/libs/view/helpers/jquery_engine.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/jquery_engine.test.php rename to lib/Cake/tests/cases/libs/view/helpers/jquery_engine.test.php diff --git a/cake/tests/cases/libs/view/helpers/js.test.php b/lib/Cake/tests/cases/libs/view/helpers/js.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/js.test.php rename to lib/Cake/tests/cases/libs/view/helpers/js.test.php diff --git a/cake/tests/cases/libs/view/helpers/mootools_engine.test.php b/lib/Cake/tests/cases/libs/view/helpers/mootools_engine.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/mootools_engine.test.php rename to lib/Cake/tests/cases/libs/view/helpers/mootools_engine.test.php diff --git a/cake/tests/cases/libs/view/helpers/number.test.php b/lib/Cake/tests/cases/libs/view/helpers/number.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/number.test.php rename to lib/Cake/tests/cases/libs/view/helpers/number.test.php diff --git a/cake/tests/cases/libs/view/helpers/paginator.test.php b/lib/Cake/tests/cases/libs/view/helpers/paginator.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/paginator.test.php rename to lib/Cake/tests/cases/libs/view/helpers/paginator.test.php diff --git a/cake/tests/cases/libs/view/helpers/prototype_engine.test.php b/lib/Cake/tests/cases/libs/view/helpers/prototype_engine.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/prototype_engine.test.php rename to lib/Cake/tests/cases/libs/view/helpers/prototype_engine.test.php diff --git a/cake/tests/cases/libs/view/helpers/rss.test.php b/lib/Cake/tests/cases/libs/view/helpers/rss.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/rss.test.php rename to lib/Cake/tests/cases/libs/view/helpers/rss.test.php diff --git a/cake/tests/cases/libs/view/helpers/session.test.php b/lib/Cake/tests/cases/libs/view/helpers/session.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/session.test.php rename to lib/Cake/tests/cases/libs/view/helpers/session.test.php diff --git a/cake/tests/cases/libs/view/helpers/text.test.php b/lib/Cake/tests/cases/libs/view/helpers/text.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/text.test.php rename to lib/Cake/tests/cases/libs/view/helpers/text.test.php diff --git a/cake/tests/cases/libs/view/helpers/time.test.php b/lib/Cake/tests/cases/libs/view/helpers/time.test.php similarity index 100% rename from cake/tests/cases/libs/view/helpers/time.test.php rename to lib/Cake/tests/cases/libs/view/helpers/time.test.php diff --git a/cake/tests/cases/libs/view/media.test.php b/lib/Cake/tests/cases/libs/view/media.test.php similarity index 100% rename from cake/tests/cases/libs/view/media.test.php rename to lib/Cake/tests/cases/libs/view/media.test.php diff --git a/cake/tests/cases/libs/view/theme.test.php b/lib/Cake/tests/cases/libs/view/theme.test.php similarity index 100% rename from cake/tests/cases/libs/view/theme.test.php rename to lib/Cake/tests/cases/libs/view/theme.test.php diff --git a/cake/tests/cases/libs/view/view.test.php b/lib/Cake/tests/cases/libs/view/view.test.php similarity index 100% rename from cake/tests/cases/libs/view/view.test.php rename to lib/Cake/tests/cases/libs/view/view.test.php diff --git a/cake/tests/cases/libs/xml.test.php b/lib/Cake/tests/cases/libs/xml.test.php similarity index 100% rename from cake/tests/cases/libs/xml.test.php rename to lib/Cake/tests/cases/libs/xml.test.php diff --git a/cake/tests/fixtures/account_fixture.php b/lib/Cake/tests/fixtures/account_fixture.php similarity index 100% rename from cake/tests/fixtures/account_fixture.php rename to lib/Cake/tests/fixtures/account_fixture.php diff --git a/cake/tests/fixtures/aco_action_fixture.php b/lib/Cake/tests/fixtures/aco_action_fixture.php similarity index 100% rename from cake/tests/fixtures/aco_action_fixture.php rename to lib/Cake/tests/fixtures/aco_action_fixture.php diff --git a/cake/tests/fixtures/aco_fixture.php b/lib/Cake/tests/fixtures/aco_fixture.php similarity index 100% rename from cake/tests/fixtures/aco_fixture.php rename to lib/Cake/tests/fixtures/aco_fixture.php diff --git a/cake/tests/fixtures/aco_two_fixture.php b/lib/Cake/tests/fixtures/aco_two_fixture.php similarity index 100% rename from cake/tests/fixtures/aco_two_fixture.php rename to lib/Cake/tests/fixtures/aco_two_fixture.php diff --git a/cake/tests/fixtures/ad_fixture.php b/lib/Cake/tests/fixtures/ad_fixture.php similarity index 100% rename from cake/tests/fixtures/ad_fixture.php rename to lib/Cake/tests/fixtures/ad_fixture.php diff --git a/cake/tests/fixtures/advertisement_fixture.php b/lib/Cake/tests/fixtures/advertisement_fixture.php similarity index 100% rename from cake/tests/fixtures/advertisement_fixture.php rename to lib/Cake/tests/fixtures/advertisement_fixture.php diff --git a/cake/tests/fixtures/after_tree_fixture.php b/lib/Cake/tests/fixtures/after_tree_fixture.php similarity index 100% rename from cake/tests/fixtures/after_tree_fixture.php rename to lib/Cake/tests/fixtures/after_tree_fixture.php diff --git a/cake/tests/fixtures/another_article_fixture.php b/lib/Cake/tests/fixtures/another_article_fixture.php similarity index 100% rename from cake/tests/fixtures/another_article_fixture.php rename to lib/Cake/tests/fixtures/another_article_fixture.php diff --git a/cake/tests/fixtures/apple_fixture.php b/lib/Cake/tests/fixtures/apple_fixture.php similarity index 100% rename from cake/tests/fixtures/apple_fixture.php rename to lib/Cake/tests/fixtures/apple_fixture.php diff --git a/cake/tests/fixtures/aro_fixture.php b/lib/Cake/tests/fixtures/aro_fixture.php similarity index 100% rename from cake/tests/fixtures/aro_fixture.php rename to lib/Cake/tests/fixtures/aro_fixture.php diff --git a/cake/tests/fixtures/aro_two_fixture.php b/lib/Cake/tests/fixtures/aro_two_fixture.php similarity index 100% rename from cake/tests/fixtures/aro_two_fixture.php rename to lib/Cake/tests/fixtures/aro_two_fixture.php diff --git a/cake/tests/fixtures/aros_aco_fixture.php b/lib/Cake/tests/fixtures/aros_aco_fixture.php similarity index 100% rename from cake/tests/fixtures/aros_aco_fixture.php rename to lib/Cake/tests/fixtures/aros_aco_fixture.php diff --git a/cake/tests/fixtures/aros_aco_two_fixture.php b/lib/Cake/tests/fixtures/aros_aco_two_fixture.php similarity index 100% rename from cake/tests/fixtures/aros_aco_two_fixture.php rename to lib/Cake/tests/fixtures/aros_aco_two_fixture.php diff --git a/cake/tests/fixtures/article_featured_fixture.php b/lib/Cake/tests/fixtures/article_featured_fixture.php similarity index 100% rename from cake/tests/fixtures/article_featured_fixture.php rename to lib/Cake/tests/fixtures/article_featured_fixture.php diff --git a/cake/tests/fixtures/article_featureds_tags_fixture.php b/lib/Cake/tests/fixtures/article_featureds_tags_fixture.php similarity index 100% rename from cake/tests/fixtures/article_featureds_tags_fixture.php rename to lib/Cake/tests/fixtures/article_featureds_tags_fixture.php diff --git a/cake/tests/fixtures/article_fixture.php b/lib/Cake/tests/fixtures/article_fixture.php similarity index 100% rename from cake/tests/fixtures/article_fixture.php rename to lib/Cake/tests/fixtures/article_fixture.php diff --git a/cake/tests/fixtures/articles_tag_fixture.php b/lib/Cake/tests/fixtures/articles_tag_fixture.php similarity index 100% rename from cake/tests/fixtures/articles_tag_fixture.php rename to lib/Cake/tests/fixtures/articles_tag_fixture.php diff --git a/cake/tests/fixtures/assert_tags_test_case.php b/lib/Cake/tests/fixtures/assert_tags_test_case.php similarity index 100% rename from cake/tests/fixtures/assert_tags_test_case.php rename to lib/Cake/tests/fixtures/assert_tags_test_case.php diff --git a/cake/tests/fixtures/attachment_fixture.php b/lib/Cake/tests/fixtures/attachment_fixture.php similarity index 100% rename from cake/tests/fixtures/attachment_fixture.php rename to lib/Cake/tests/fixtures/attachment_fixture.php diff --git a/cake/tests/fixtures/auth_user_custom_field_fixture.php b/lib/Cake/tests/fixtures/auth_user_custom_field_fixture.php similarity index 100% rename from cake/tests/fixtures/auth_user_custom_field_fixture.php rename to lib/Cake/tests/fixtures/auth_user_custom_field_fixture.php diff --git a/cake/tests/fixtures/auth_user_fixture.php b/lib/Cake/tests/fixtures/auth_user_fixture.php similarity index 100% rename from cake/tests/fixtures/auth_user_fixture.php rename to lib/Cake/tests/fixtures/auth_user_fixture.php diff --git a/cake/tests/fixtures/author_fixture.php b/lib/Cake/tests/fixtures/author_fixture.php similarity index 100% rename from cake/tests/fixtures/author_fixture.php rename to lib/Cake/tests/fixtures/author_fixture.php diff --git a/cake/tests/fixtures/bake_article_fixture.php b/lib/Cake/tests/fixtures/bake_article_fixture.php similarity index 100% rename from cake/tests/fixtures/bake_article_fixture.php rename to lib/Cake/tests/fixtures/bake_article_fixture.php diff --git a/cake/tests/fixtures/bake_articles_bake_tag_fixture.php b/lib/Cake/tests/fixtures/bake_articles_bake_tag_fixture.php similarity index 100% rename from cake/tests/fixtures/bake_articles_bake_tag_fixture.php rename to lib/Cake/tests/fixtures/bake_articles_bake_tag_fixture.php diff --git a/cake/tests/fixtures/bake_comment_fixture.php b/lib/Cake/tests/fixtures/bake_comment_fixture.php similarity index 100% rename from cake/tests/fixtures/bake_comment_fixture.php rename to lib/Cake/tests/fixtures/bake_comment_fixture.php diff --git a/cake/tests/fixtures/bake_tag_fixture.php b/lib/Cake/tests/fixtures/bake_tag_fixture.php similarity index 100% rename from cake/tests/fixtures/bake_tag_fixture.php rename to lib/Cake/tests/fixtures/bake_tag_fixture.php diff --git a/cake/tests/fixtures/basket_fixture.php b/lib/Cake/tests/fixtures/basket_fixture.php similarity index 100% rename from cake/tests/fixtures/basket_fixture.php rename to lib/Cake/tests/fixtures/basket_fixture.php diff --git a/cake/tests/fixtures/bid_fixture.php b/lib/Cake/tests/fixtures/bid_fixture.php similarity index 100% rename from cake/tests/fixtures/bid_fixture.php rename to lib/Cake/tests/fixtures/bid_fixture.php diff --git a/cake/tests/fixtures/binary_test_fixture.php b/lib/Cake/tests/fixtures/binary_test_fixture.php similarity index 100% rename from cake/tests/fixtures/binary_test_fixture.php rename to lib/Cake/tests/fixtures/binary_test_fixture.php diff --git a/cake/tests/fixtures/book_fixture.php b/lib/Cake/tests/fixtures/book_fixture.php similarity index 100% rename from cake/tests/fixtures/book_fixture.php rename to lib/Cake/tests/fixtures/book_fixture.php diff --git a/cake/tests/fixtures/cache_test_model_fixture.php b/lib/Cake/tests/fixtures/cache_test_model_fixture.php similarity index 100% rename from cake/tests/fixtures/cache_test_model_fixture.php rename to lib/Cake/tests/fixtures/cache_test_model_fixture.php diff --git a/cake/tests/fixtures/callback_fixture.php b/lib/Cake/tests/fixtures/callback_fixture.php similarity index 100% rename from cake/tests/fixtures/callback_fixture.php rename to lib/Cake/tests/fixtures/callback_fixture.php diff --git a/cake/tests/fixtures/campaign_fixture.php b/lib/Cake/tests/fixtures/campaign_fixture.php similarity index 100% rename from cake/tests/fixtures/campaign_fixture.php rename to lib/Cake/tests/fixtures/campaign_fixture.php diff --git a/cake/tests/fixtures/category_fixture.php b/lib/Cake/tests/fixtures/category_fixture.php similarity index 100% rename from cake/tests/fixtures/category_fixture.php rename to lib/Cake/tests/fixtures/category_fixture.php diff --git a/cake/tests/fixtures/category_thread_fixture.php b/lib/Cake/tests/fixtures/category_thread_fixture.php similarity index 100% rename from cake/tests/fixtures/category_thread_fixture.php rename to lib/Cake/tests/fixtures/category_thread_fixture.php diff --git a/cake/tests/fixtures/cd_fixture.php b/lib/Cake/tests/fixtures/cd_fixture.php similarity index 100% rename from cake/tests/fixtures/cd_fixture.php rename to lib/Cake/tests/fixtures/cd_fixture.php diff --git a/cake/tests/fixtures/comment_fixture.php b/lib/Cake/tests/fixtures/comment_fixture.php similarity index 100% rename from cake/tests/fixtures/comment_fixture.php rename to lib/Cake/tests/fixtures/comment_fixture.php diff --git a/cake/tests/fixtures/content_account_fixture.php b/lib/Cake/tests/fixtures/content_account_fixture.php similarity index 100% rename from cake/tests/fixtures/content_account_fixture.php rename to lib/Cake/tests/fixtures/content_account_fixture.php diff --git a/cake/tests/fixtures/content_fixture.php b/lib/Cake/tests/fixtures/content_fixture.php similarity index 100% rename from cake/tests/fixtures/content_fixture.php rename to lib/Cake/tests/fixtures/content_fixture.php diff --git a/cake/tests/fixtures/counter_cache_post_fixture.php b/lib/Cake/tests/fixtures/counter_cache_post_fixture.php similarity index 100% rename from cake/tests/fixtures/counter_cache_post_fixture.php rename to lib/Cake/tests/fixtures/counter_cache_post_fixture.php diff --git a/cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php b/lib/Cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php similarity index 100% rename from cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php rename to lib/Cake/tests/fixtures/counter_cache_post_nonstandard_primary_key_fixture.php diff --git a/cake/tests/fixtures/counter_cache_user_fixture.php b/lib/Cake/tests/fixtures/counter_cache_user_fixture.php similarity index 100% rename from cake/tests/fixtures/counter_cache_user_fixture.php rename to lib/Cake/tests/fixtures/counter_cache_user_fixture.php diff --git a/cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php b/lib/Cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php similarity index 100% rename from cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php rename to lib/Cake/tests/fixtures/counter_cache_user_nonstandard_primary_key_fixture.php diff --git a/cake/tests/fixtures/data_test_fixture.php b/lib/Cake/tests/fixtures/data_test_fixture.php similarity index 100% rename from cake/tests/fixtures/data_test_fixture.php rename to lib/Cake/tests/fixtures/data_test_fixture.php diff --git a/cake/tests/fixtures/datatype_fixture.php b/lib/Cake/tests/fixtures/datatype_fixture.php similarity index 100% rename from cake/tests/fixtures/datatype_fixture.php rename to lib/Cake/tests/fixtures/datatype_fixture.php diff --git a/cake/tests/fixtures/dependency_fixture.php b/lib/Cake/tests/fixtures/dependency_fixture.php similarity index 100% rename from cake/tests/fixtures/dependency_fixture.php rename to lib/Cake/tests/fixtures/dependency_fixture.php diff --git a/cake/tests/fixtures/device_fixture.php b/lib/Cake/tests/fixtures/device_fixture.php similarity index 100% rename from cake/tests/fixtures/device_fixture.php rename to lib/Cake/tests/fixtures/device_fixture.php diff --git a/cake/tests/fixtures/device_type_category_fixture.php b/lib/Cake/tests/fixtures/device_type_category_fixture.php similarity index 100% rename from cake/tests/fixtures/device_type_category_fixture.php rename to lib/Cake/tests/fixtures/device_type_category_fixture.php diff --git a/cake/tests/fixtures/device_type_fixture.php b/lib/Cake/tests/fixtures/device_type_fixture.php similarity index 100% rename from cake/tests/fixtures/device_type_fixture.php rename to lib/Cake/tests/fixtures/device_type_fixture.php diff --git a/cake/tests/fixtures/document_directory_fixture.php b/lib/Cake/tests/fixtures/document_directory_fixture.php similarity index 100% rename from cake/tests/fixtures/document_directory_fixture.php rename to lib/Cake/tests/fixtures/document_directory_fixture.php diff --git a/cake/tests/fixtures/document_fixture.php b/lib/Cake/tests/fixtures/document_fixture.php similarity index 100% rename from cake/tests/fixtures/document_fixture.php rename to lib/Cake/tests/fixtures/document_fixture.php diff --git a/cake/tests/fixtures/exterior_type_category_fixture.php b/lib/Cake/tests/fixtures/exterior_type_category_fixture.php similarity index 100% rename from cake/tests/fixtures/exterior_type_category_fixture.php rename to lib/Cake/tests/fixtures/exterior_type_category_fixture.php diff --git a/cake/tests/fixtures/feature_set_fixture.php b/lib/Cake/tests/fixtures/feature_set_fixture.php similarity index 100% rename from cake/tests/fixtures/feature_set_fixture.php rename to lib/Cake/tests/fixtures/feature_set_fixture.php diff --git a/cake/tests/fixtures/featured_fixture.php b/lib/Cake/tests/fixtures/featured_fixture.php similarity index 100% rename from cake/tests/fixtures/featured_fixture.php rename to lib/Cake/tests/fixtures/featured_fixture.php diff --git a/cake/tests/fixtures/film_file_fixture.php b/lib/Cake/tests/fixtures/film_file_fixture.php similarity index 100% rename from cake/tests/fixtures/film_file_fixture.php rename to lib/Cake/tests/fixtures/film_file_fixture.php diff --git a/cake/tests/fixtures/fixturized_test_case.php b/lib/Cake/tests/fixtures/fixturized_test_case.php similarity index 100% rename from cake/tests/fixtures/fixturized_test_case.php rename to lib/Cake/tests/fixtures/fixturized_test_case.php diff --git a/cake/tests/fixtures/flag_tree_fixture.php b/lib/Cake/tests/fixtures/flag_tree_fixture.php similarity index 100% rename from cake/tests/fixtures/flag_tree_fixture.php rename to lib/Cake/tests/fixtures/flag_tree_fixture.php diff --git a/cake/tests/fixtures/fruit_fixture.php b/lib/Cake/tests/fixtures/fruit_fixture.php similarity index 100% rename from cake/tests/fixtures/fruit_fixture.php rename to lib/Cake/tests/fixtures/fruit_fixture.php diff --git a/cake/tests/fixtures/fruits_uuid_tag_fixture.php b/lib/Cake/tests/fixtures/fruits_uuid_tag_fixture.php similarity index 100% rename from cake/tests/fixtures/fruits_uuid_tag_fixture.php rename to lib/Cake/tests/fixtures/fruits_uuid_tag_fixture.php diff --git a/cake/tests/fixtures/group_update_all_fixture.php b/lib/Cake/tests/fixtures/group_update_all_fixture.php similarity index 100% rename from cake/tests/fixtures/group_update_all_fixture.php rename to lib/Cake/tests/fixtures/group_update_all_fixture.php diff --git a/cake/tests/fixtures/home_fixture.php b/lib/Cake/tests/fixtures/home_fixture.php similarity index 100% rename from cake/tests/fixtures/home_fixture.php rename to lib/Cake/tests/fixtures/home_fixture.php diff --git a/cake/tests/fixtures/image_fixture.php b/lib/Cake/tests/fixtures/image_fixture.php similarity index 100% rename from cake/tests/fixtures/image_fixture.php rename to lib/Cake/tests/fixtures/image_fixture.php diff --git a/cake/tests/fixtures/item_fixture.php b/lib/Cake/tests/fixtures/item_fixture.php similarity index 100% rename from cake/tests/fixtures/item_fixture.php rename to lib/Cake/tests/fixtures/item_fixture.php diff --git a/cake/tests/fixtures/items_portfolio_fixture.php b/lib/Cake/tests/fixtures/items_portfolio_fixture.php similarity index 100% rename from cake/tests/fixtures/items_portfolio_fixture.php rename to lib/Cake/tests/fixtures/items_portfolio_fixture.php diff --git a/cake/tests/fixtures/join_a_b_fixture.php b/lib/Cake/tests/fixtures/join_a_b_fixture.php similarity index 100% rename from cake/tests/fixtures/join_a_b_fixture.php rename to lib/Cake/tests/fixtures/join_a_b_fixture.php diff --git a/cake/tests/fixtures/join_a_c_fixture.php b/lib/Cake/tests/fixtures/join_a_c_fixture.php similarity index 100% rename from cake/tests/fixtures/join_a_c_fixture.php rename to lib/Cake/tests/fixtures/join_a_c_fixture.php diff --git a/cake/tests/fixtures/join_a_fixture.php b/lib/Cake/tests/fixtures/join_a_fixture.php similarity index 100% rename from cake/tests/fixtures/join_a_fixture.php rename to lib/Cake/tests/fixtures/join_a_fixture.php diff --git a/cake/tests/fixtures/join_b_fixture.php b/lib/Cake/tests/fixtures/join_b_fixture.php similarity index 100% rename from cake/tests/fixtures/join_b_fixture.php rename to lib/Cake/tests/fixtures/join_b_fixture.php diff --git a/cake/tests/fixtures/join_c_fixture.php b/lib/Cake/tests/fixtures/join_c_fixture.php similarity index 100% rename from cake/tests/fixtures/join_c_fixture.php rename to lib/Cake/tests/fixtures/join_c_fixture.php diff --git a/cake/tests/fixtures/join_thing_fixture.php b/lib/Cake/tests/fixtures/join_thing_fixture.php similarity index 100% rename from cake/tests/fixtures/join_thing_fixture.php rename to lib/Cake/tests/fixtures/join_thing_fixture.php diff --git a/cake/tests/fixtures/message_fixture.php b/lib/Cake/tests/fixtures/message_fixture.php similarity index 100% rename from cake/tests/fixtures/message_fixture.php rename to lib/Cake/tests/fixtures/message_fixture.php diff --git a/cake/tests/fixtures/my_categories_my_products_fixture.php b/lib/Cake/tests/fixtures/my_categories_my_products_fixture.php similarity index 100% rename from cake/tests/fixtures/my_categories_my_products_fixture.php rename to lib/Cake/tests/fixtures/my_categories_my_products_fixture.php diff --git a/cake/tests/fixtures/my_categories_my_users_fixture.php b/lib/Cake/tests/fixtures/my_categories_my_users_fixture.php similarity index 100% rename from cake/tests/fixtures/my_categories_my_users_fixture.php rename to lib/Cake/tests/fixtures/my_categories_my_users_fixture.php diff --git a/cake/tests/fixtures/my_category_fixture.php b/lib/Cake/tests/fixtures/my_category_fixture.php similarity index 100% rename from cake/tests/fixtures/my_category_fixture.php rename to lib/Cake/tests/fixtures/my_category_fixture.php diff --git a/cake/tests/fixtures/my_product_fixture.php b/lib/Cake/tests/fixtures/my_product_fixture.php similarity index 100% rename from cake/tests/fixtures/my_product_fixture.php rename to lib/Cake/tests/fixtures/my_product_fixture.php diff --git a/cake/tests/fixtures/my_user_fixture.php b/lib/Cake/tests/fixtures/my_user_fixture.php similarity index 100% rename from cake/tests/fixtures/my_user_fixture.php rename to lib/Cake/tests/fixtures/my_user_fixture.php diff --git a/cake/tests/fixtures/node_fixture.php b/lib/Cake/tests/fixtures/node_fixture.php similarity index 100% rename from cake/tests/fixtures/node_fixture.php rename to lib/Cake/tests/fixtures/node_fixture.php diff --git a/cake/tests/fixtures/number_tree_fixture.php b/lib/Cake/tests/fixtures/number_tree_fixture.php similarity index 100% rename from cake/tests/fixtures/number_tree_fixture.php rename to lib/Cake/tests/fixtures/number_tree_fixture.php diff --git a/cake/tests/fixtures/number_tree_two_fixture.php b/lib/Cake/tests/fixtures/number_tree_two_fixture.php similarity index 100% rename from cake/tests/fixtures/number_tree_two_fixture.php rename to lib/Cake/tests/fixtures/number_tree_two_fixture.php diff --git a/cake/tests/fixtures/numeric_article_fixture.php b/lib/Cake/tests/fixtures/numeric_article_fixture.php similarity index 100% rename from cake/tests/fixtures/numeric_article_fixture.php rename to lib/Cake/tests/fixtures/numeric_article_fixture.php diff --git a/cake/tests/fixtures/overall_favorite_fixture.php b/lib/Cake/tests/fixtures/overall_favorite_fixture.php similarity index 100% rename from cake/tests/fixtures/overall_favorite_fixture.php rename to lib/Cake/tests/fixtures/overall_favorite_fixture.php diff --git a/cake/tests/fixtures/person_fixture.php b/lib/Cake/tests/fixtures/person_fixture.php similarity index 100% rename from cake/tests/fixtures/person_fixture.php rename to lib/Cake/tests/fixtures/person_fixture.php diff --git a/cake/tests/fixtures/portfolio_fixture.php b/lib/Cake/tests/fixtures/portfolio_fixture.php similarity index 100% rename from cake/tests/fixtures/portfolio_fixture.php rename to lib/Cake/tests/fixtures/portfolio_fixture.php diff --git a/cake/tests/fixtures/post_fixture.php b/lib/Cake/tests/fixtures/post_fixture.php similarity index 100% rename from cake/tests/fixtures/post_fixture.php rename to lib/Cake/tests/fixtures/post_fixture.php diff --git a/cake/tests/fixtures/posts_tag_fixture.php b/lib/Cake/tests/fixtures/posts_tag_fixture.php similarity index 100% rename from cake/tests/fixtures/posts_tag_fixture.php rename to lib/Cake/tests/fixtures/posts_tag_fixture.php diff --git a/cake/tests/fixtures/primary_model_fixture.php b/lib/Cake/tests/fixtures/primary_model_fixture.php similarity index 100% rename from cake/tests/fixtures/primary_model_fixture.php rename to lib/Cake/tests/fixtures/primary_model_fixture.php diff --git a/cake/tests/fixtures/product_fixture.php b/lib/Cake/tests/fixtures/product_fixture.php similarity index 100% rename from cake/tests/fixtures/product_fixture.php rename to lib/Cake/tests/fixtures/product_fixture.php diff --git a/cake/tests/fixtures/product_update_all_fixture.php b/lib/Cake/tests/fixtures/product_update_all_fixture.php similarity index 100% rename from cake/tests/fixtures/product_update_all_fixture.php rename to lib/Cake/tests/fixtures/product_update_all_fixture.php diff --git a/cake/tests/fixtures/project_fixture.php b/lib/Cake/tests/fixtures/project_fixture.php similarity index 100% rename from cake/tests/fixtures/project_fixture.php rename to lib/Cake/tests/fixtures/project_fixture.php diff --git a/cake/tests/fixtures/rss.xml b/lib/Cake/tests/fixtures/rss.xml similarity index 100% rename from cake/tests/fixtures/rss.xml rename to lib/Cake/tests/fixtures/rss.xml diff --git a/cake/tests/fixtures/sample.xml b/lib/Cake/tests/fixtures/sample.xml similarity index 100% rename from cake/tests/fixtures/sample.xml rename to lib/Cake/tests/fixtures/sample.xml diff --git a/cake/tests/fixtures/sample_fixture.php b/lib/Cake/tests/fixtures/sample_fixture.php similarity index 100% rename from cake/tests/fixtures/sample_fixture.php rename to lib/Cake/tests/fixtures/sample_fixture.php diff --git a/cake/tests/fixtures/secondary_model_fixture.php b/lib/Cake/tests/fixtures/secondary_model_fixture.php similarity index 100% rename from cake/tests/fixtures/secondary_model_fixture.php rename to lib/Cake/tests/fixtures/secondary_model_fixture.php diff --git a/cake/tests/fixtures/session_fixture.php b/lib/Cake/tests/fixtures/session_fixture.php similarity index 100% rename from cake/tests/fixtures/session_fixture.php rename to lib/Cake/tests/fixtures/session_fixture.php diff --git a/cake/tests/fixtures/soap_request.xml b/lib/Cake/tests/fixtures/soap_request.xml similarity index 100% rename from cake/tests/fixtures/soap_request.xml rename to lib/Cake/tests/fixtures/soap_request.xml diff --git a/cake/tests/fixtures/soap_response.xml b/lib/Cake/tests/fixtures/soap_response.xml similarity index 100% rename from cake/tests/fixtures/soap_response.xml rename to lib/Cake/tests/fixtures/soap_response.xml diff --git a/cake/tests/fixtures/something_else_fixture.php b/lib/Cake/tests/fixtures/something_else_fixture.php similarity index 100% rename from cake/tests/fixtures/something_else_fixture.php rename to lib/Cake/tests/fixtures/something_else_fixture.php diff --git a/cake/tests/fixtures/something_fixture.php b/lib/Cake/tests/fixtures/something_fixture.php similarity index 100% rename from cake/tests/fixtures/something_fixture.php rename to lib/Cake/tests/fixtures/something_fixture.php diff --git a/cake/tests/fixtures/stories_tag_fixture.php b/lib/Cake/tests/fixtures/stories_tag_fixture.php similarity index 100% rename from cake/tests/fixtures/stories_tag_fixture.php rename to lib/Cake/tests/fixtures/stories_tag_fixture.php diff --git a/cake/tests/fixtures/story_fixture.php b/lib/Cake/tests/fixtures/story_fixture.php similarity index 100% rename from cake/tests/fixtures/story_fixture.php rename to lib/Cake/tests/fixtures/story_fixture.php diff --git a/cake/tests/fixtures/syfile_fixture.php b/lib/Cake/tests/fixtures/syfile_fixture.php similarity index 100% rename from cake/tests/fixtures/syfile_fixture.php rename to lib/Cake/tests/fixtures/syfile_fixture.php diff --git a/cake/tests/fixtures/tag_fixture.php b/lib/Cake/tests/fixtures/tag_fixture.php similarity index 100% rename from cake/tests/fixtures/tag_fixture.php rename to lib/Cake/tests/fixtures/tag_fixture.php diff --git a/cake/tests/fixtures/test_plugin_article_fixture.php b/lib/Cake/tests/fixtures/test_plugin_article_fixture.php similarity index 100% rename from cake/tests/fixtures/test_plugin_article_fixture.php rename to lib/Cake/tests/fixtures/test_plugin_article_fixture.php diff --git a/cake/tests/fixtures/test_plugin_comment_fixture.php b/lib/Cake/tests/fixtures/test_plugin_comment_fixture.php similarity index 100% rename from cake/tests/fixtures/test_plugin_comment_fixture.php rename to lib/Cake/tests/fixtures/test_plugin_comment_fixture.php diff --git a/cake/tests/fixtures/the_paper_monkies_fixture.php b/lib/Cake/tests/fixtures/the_paper_monkies_fixture.php similarity index 100% rename from cake/tests/fixtures/the_paper_monkies_fixture.php rename to lib/Cake/tests/fixtures/the_paper_monkies_fixture.php diff --git a/cake/tests/fixtures/thread_fixture.php b/lib/Cake/tests/fixtures/thread_fixture.php similarity index 100% rename from cake/tests/fixtures/thread_fixture.php rename to lib/Cake/tests/fixtures/thread_fixture.php diff --git a/cake/tests/fixtures/translate_article_fixture.php b/lib/Cake/tests/fixtures/translate_article_fixture.php similarity index 100% rename from cake/tests/fixtures/translate_article_fixture.php rename to lib/Cake/tests/fixtures/translate_article_fixture.php diff --git a/cake/tests/fixtures/translate_fixture.php b/lib/Cake/tests/fixtures/translate_fixture.php similarity index 100% rename from cake/tests/fixtures/translate_fixture.php rename to lib/Cake/tests/fixtures/translate_fixture.php diff --git a/cake/tests/fixtures/translate_table_fixture.php b/lib/Cake/tests/fixtures/translate_table_fixture.php similarity index 100% rename from cake/tests/fixtures/translate_table_fixture.php rename to lib/Cake/tests/fixtures/translate_table_fixture.php diff --git a/cake/tests/fixtures/translate_with_prefix_fixture.php b/lib/Cake/tests/fixtures/translate_with_prefix_fixture.php similarity index 100% rename from cake/tests/fixtures/translate_with_prefix_fixture.php rename to lib/Cake/tests/fixtures/translate_with_prefix_fixture.php diff --git a/cake/tests/fixtures/translated_article_fixture.php b/lib/Cake/tests/fixtures/translated_article_fixture.php similarity index 100% rename from cake/tests/fixtures/translated_article_fixture.php rename to lib/Cake/tests/fixtures/translated_article_fixture.php diff --git a/cake/tests/fixtures/translated_item_fixture.php b/lib/Cake/tests/fixtures/translated_item_fixture.php similarity index 100% rename from cake/tests/fixtures/translated_item_fixture.php rename to lib/Cake/tests/fixtures/translated_item_fixture.php diff --git a/cake/tests/fixtures/unconventional_tree_fixture.php b/lib/Cake/tests/fixtures/unconventional_tree_fixture.php similarity index 100% rename from cake/tests/fixtures/unconventional_tree_fixture.php rename to lib/Cake/tests/fixtures/unconventional_tree_fixture.php diff --git a/cake/tests/fixtures/underscore_field_fixture.php b/lib/Cake/tests/fixtures/underscore_field_fixture.php similarity index 100% rename from cake/tests/fixtures/underscore_field_fixture.php rename to lib/Cake/tests/fixtures/underscore_field_fixture.php diff --git a/cake/tests/fixtures/user_fixture.php b/lib/Cake/tests/fixtures/user_fixture.php similarity index 100% rename from cake/tests/fixtures/user_fixture.php rename to lib/Cake/tests/fixtures/user_fixture.php diff --git a/cake/tests/fixtures/uuid_fixture.php b/lib/Cake/tests/fixtures/uuid_fixture.php similarity index 100% rename from cake/tests/fixtures/uuid_fixture.php rename to lib/Cake/tests/fixtures/uuid_fixture.php diff --git a/cake/tests/fixtures/uuid_tag_fixture.php b/lib/Cake/tests/fixtures/uuid_tag_fixture.php similarity index 100% rename from cake/tests/fixtures/uuid_tag_fixture.php rename to lib/Cake/tests/fixtures/uuid_tag_fixture.php diff --git a/cake/tests/fixtures/uuid_tree_fixture.php b/lib/Cake/tests/fixtures/uuid_tree_fixture.php similarity index 100% rename from cake/tests/fixtures/uuid_tree_fixture.php rename to lib/Cake/tests/fixtures/uuid_tree_fixture.php diff --git a/cake/tests/fixtures/uuiditem_fixture.php b/lib/Cake/tests/fixtures/uuiditem_fixture.php similarity index 100% rename from cake/tests/fixtures/uuiditem_fixture.php rename to lib/Cake/tests/fixtures/uuiditem_fixture.php diff --git a/cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php b/lib/Cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php similarity index 100% rename from cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php rename to lib/Cake/tests/fixtures/uuiditems_uuidportfolio_fixture.php diff --git a/cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php b/lib/Cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php similarity index 100% rename from cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php rename to lib/Cake/tests/fixtures/uuiditems_uuidportfolio_numericid_fixture.php diff --git a/cake/tests/fixtures/uuidportfolio_fixture.php b/lib/Cake/tests/fixtures/uuidportfolio_fixture.php similarity index 100% rename from cake/tests/fixtures/uuidportfolio_fixture.php rename to lib/Cake/tests/fixtures/uuidportfolio_fixture.php diff --git a/cake/tests/test_app/config/acl.ini.php b/lib/Cake/tests/test_app/config/acl.ini.php similarity index 100% rename from cake/tests/test_app/config/acl.ini.php rename to lib/Cake/tests/test_app/config/acl.ini.php diff --git a/cake/tests/test_app/config/empty.php b/lib/Cake/tests/test_app/config/empty.php similarity index 100% rename from cake/tests/test_app/config/empty.php rename to lib/Cake/tests/test_app/config/empty.php diff --git a/cake/tests/test_app/config/nested.ini b/lib/Cake/tests/test_app/config/nested.ini similarity index 100% rename from cake/tests/test_app/config/nested.ini rename to lib/Cake/tests/test_app/config/nested.ini diff --git a/cake/tests/test_app/config/var_test.php b/lib/Cake/tests/test_app/config/var_test.php similarity index 100% rename from cake/tests/test_app/config/var_test.php rename to lib/Cake/tests/test_app/config/var_test.php diff --git a/cake/tests/test_app/console/shells/sample.php b/lib/Cake/tests/test_app/console/shells/sample.php similarity index 100% rename from cake/tests/test_app/console/shells/sample.php rename to lib/Cake/tests/test_app/console/shells/sample.php diff --git a/cake/tests/test_app/console/shells/tasks/empty b/lib/Cake/tests/test_app/console/shells/tasks/empty similarity index 100% rename from cake/tests/test_app/console/shells/tasks/empty rename to lib/Cake/tests/test_app/console/shells/tasks/empty diff --git a/cake/tests/test_app/console/templates/test/classes/test_object.ctp b/lib/Cake/tests/test_app/console/templates/test/classes/test_object.ctp similarity index 100% rename from cake/tests/test_app/console/templates/test/classes/test_object.ctp rename to lib/Cake/tests/test_app/console/templates/test/classes/test_object.ctp diff --git a/cake/tests/test_app/controllers/components/empty b/lib/Cake/tests/test_app/controllers/components/empty similarity index 100% rename from cake/tests/test_app/controllers/components/empty rename to lib/Cake/tests/test_app/controllers/components/empty diff --git a/cake/tests/test_app/controllers/tests_apps_controller.php b/lib/Cake/tests/test_app/controllers/tests_apps_controller.php similarity index 100% rename from cake/tests/test_app/controllers/tests_apps_controller.php rename to lib/Cake/tests/test_app/controllers/tests_apps_controller.php diff --git a/cake/tests/test_app/controllers/tests_apps_posts_controller.php b/lib/Cake/tests/test_app/controllers/tests_apps_posts_controller.php similarity index 100% rename from cake/tests/test_app/controllers/tests_apps_posts_controller.php rename to lib/Cake/tests/test_app/controllers/tests_apps_posts_controller.php diff --git a/cake/tests/test_app/libs/cache/test_app_cache.php b/lib/Cake/tests/test_app/libs/cache/test_app_cache.php similarity index 100% rename from cake/tests/test_app/libs/cache/test_app_cache.php rename to lib/Cake/tests/test_app/libs/cache/test_app_cache.php diff --git a/cake/tests/test_app/libs/library.php b/lib/Cake/tests/test_app/libs/library.php similarity index 100% rename from cake/tests/test_app/libs/library.php rename to lib/Cake/tests/test_app/libs/library.php diff --git a/cake/tests/test_app/libs/log/test_app_log.php b/lib/Cake/tests/test_app/libs/log/test_app_log.php similarity index 100% rename from cake/tests/test_app/libs/log/test_app_log.php rename to lib/Cake/tests/test_app/libs/log/test_app_log.php diff --git a/cake/tests/test_app/libs/session/test_app_lib_session.php b/lib/Cake/tests/test_app/libs/session/test_app_lib_session.php similarity index 100% rename from cake/tests/test_app/libs/session/test_app_lib_session.php rename to lib/Cake/tests/test_app/libs/session/test_app_lib_session.php diff --git a/cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom1.po b/lib/Cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom1.po similarity index 100% rename from cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom1.po rename to lib/Cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom1.po diff --git a/cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom2.po b/lib/Cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom2.po similarity index 100% rename from cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom2.po rename to lib/Cake/tests/test_app/locale/cache_test_po/LC_MESSAGES/dom2.po diff --git a/cake/tests/test_app/locale/ja_jp/LC_TIME b/lib/Cake/tests/test_app/locale/ja_jp/LC_TIME similarity index 100% rename from cake/tests/test_app/locale/ja_jp/LC_TIME rename to lib/Cake/tests/test_app/locale/ja_jp/LC_TIME diff --git a/cake/tests/test_app/locale/po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/po/LC_MONETARY/default.po b/lib/Cake/tests/test_app/locale/po/LC_MONETARY/default.po similarity index 100% rename from cake/tests/test_app/locale/po/LC_MONETARY/default.po rename to lib/Cake/tests/test_app/locale/po/LC_MONETARY/default.po diff --git a/cake/tests/test_app/locale/po/LC_TIME b/lib/Cake/tests/test_app/locale/po/LC_TIME similarity index 100% rename from cake/tests/test_app/locale/po/LC_TIME rename to lib/Cake/tests/test_app/locale/po/LC_TIME diff --git a/cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_0_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_0_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_10_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_10_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_11_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_11_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_12_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_12_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_13_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_13_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_14_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_14_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_1_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_1_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_2_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_2_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_3_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_3_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_4_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_4_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_5_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_5_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_6_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_6_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_7_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_7_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_8_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_8_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/core.mo b/lib/Cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/core.mo similarity index 100% rename from cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/core.mo rename to lib/Cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/core.mo diff --git a/cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/default.mo b/lib/Cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/default.mo similarity index 100% rename from cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/default.mo rename to lib/Cake/tests/test_app/locale/rule_9_mo/LC_MESSAGES/default.mo diff --git a/cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/core.po b/lib/Cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/core.po similarity index 100% rename from cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/core.po rename to lib/Cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/core.po diff --git a/cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/default.po b/lib/Cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/default.po similarity index 100% rename from cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/default.po rename to lib/Cake/tests/test_app/locale/rule_9_po/LC_MESSAGES/default.po diff --git a/cake/tests/test_app/locale/time_test/LC_TIME b/lib/Cake/tests/test_app/locale/time_test/LC_TIME similarity index 100% rename from cake/tests/test_app/locale/time_test/LC_TIME rename to lib/Cake/tests/test_app/locale/time_test/LC_TIME diff --git a/cake/tests/test_app/models/behaviors/empty b/lib/Cake/tests/test_app/models/behaviors/empty similarity index 100% rename from cake/tests/test_app/models/behaviors/empty rename to lib/Cake/tests/test_app/models/behaviors/empty diff --git a/cake/tests/test_app/models/behaviors/persister_one_behavior.php b/lib/Cake/tests/test_app/models/behaviors/persister_one_behavior.php similarity index 100% rename from cake/tests/test_app/models/behaviors/persister_one_behavior.php rename to lib/Cake/tests/test_app/models/behaviors/persister_one_behavior.php diff --git a/cake/tests/test_app/models/behaviors/persister_two_behavior.php b/lib/Cake/tests/test_app/models/behaviors/persister_two_behavior.php similarity index 100% rename from cake/tests/test_app/models/behaviors/persister_two_behavior.php rename to lib/Cake/tests/test_app/models/behaviors/persister_two_behavior.php diff --git a/cake/tests/test_app/models/comment.php b/lib/Cake/tests/test_app/models/comment.php similarity index 100% rename from cake/tests/test_app/models/comment.php rename to lib/Cake/tests/test_app/models/comment.php diff --git a/cake/tests/test_app/models/datasources/test/test_local_driver.php b/lib/Cake/tests/test_app/models/datasources/test/test_local_driver.php similarity index 100% rename from cake/tests/test_app/models/datasources/test/test_local_driver.php rename to lib/Cake/tests/test_app/models/datasources/test/test_local_driver.php diff --git a/cake/tests/test_app/models/datasources/test2_other_source.php b/lib/Cake/tests/test_app/models/datasources/test2_other_source.php similarity index 100% rename from cake/tests/test_app/models/datasources/test2_other_source.php rename to lib/Cake/tests/test_app/models/datasources/test2_other_source.php diff --git a/cake/tests/test_app/models/datasources/test2_source.php b/lib/Cake/tests/test_app/models/datasources/test2_source.php similarity index 100% rename from cake/tests/test_app/models/datasources/test2_source.php rename to lib/Cake/tests/test_app/models/datasources/test2_source.php diff --git a/cake/tests/test_app/models/persister_one.php b/lib/Cake/tests/test_app/models/persister_one.php similarity index 100% rename from cake/tests/test_app/models/persister_one.php rename to lib/Cake/tests/test_app/models/persister_one.php diff --git a/cake/tests/test_app/models/persister_two.php b/lib/Cake/tests/test_app/models/persister_two.php similarity index 100% rename from cake/tests/test_app/models/persister_two.php rename to lib/Cake/tests/test_app/models/persister_two.php diff --git a/cake/tests/test_app/models/post.php b/lib/Cake/tests/test_app/models/post.php similarity index 100% rename from cake/tests/test_app/models/post.php rename to lib/Cake/tests/test_app/models/post.php diff --git a/cake/tests/test_app/plugins/plugin_js/webroot/js/one/plugin_one.js b/lib/Cake/tests/test_app/plugins/plugin_js/webroot/js/one/plugin_one.js similarity index 100% rename from cake/tests/test_app/plugins/plugin_js/webroot/js/one/plugin_one.js rename to lib/Cake/tests/test_app/plugins/plugin_js/webroot/js/one/plugin_one.js diff --git a/cake/tests/test_app/plugins/plugin_js/webroot/js/plugin_js.js b/lib/Cake/tests/test_app/plugins/plugin_js/webroot/js/plugin_js.js similarity index 100% rename from cake/tests/test_app/plugins/plugin_js/webroot/js/plugin_js.js rename to lib/Cake/tests/test_app/plugins/plugin_js/webroot/js/plugin_js.js diff --git a/cake/tests/test_app/plugins/test_plugin/config/load.php b/lib/Cake/tests/test_app/plugins/test_plugin/config/load.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/config/load.php rename to lib/Cake/tests/test_app/plugins/test_plugin/config/load.php diff --git a/cake/tests/test_app/plugins/test_plugin/config/more.load.php b/lib/Cake/tests/test_app/plugins/test_plugin/config/more.load.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/config/more.load.php rename to lib/Cake/tests/test_app/plugins/test_plugin/config/more.load.php diff --git a/cake/tests/test_app/plugins/test_plugin/config/schema/schema.php b/lib/Cake/tests/test_app/plugins/test_plugin/config/schema/schema.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/config/schema/schema.php rename to lib/Cake/tests/test_app/plugins/test_plugin/config/schema/schema.php diff --git a/cake/tests/test_app/plugins/test_plugin/console/shells/example.php b/lib/Cake/tests/test_app/plugins/test_plugin/console/shells/example.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/console/shells/example.php rename to lib/Cake/tests/test_app/plugins/test_plugin/console/shells/example.php diff --git a/cake/tests/test_app/plugins/test_plugin/console/shells/tasks/empty b/lib/Cake/tests/test_app/plugins/test_plugin/console/shells/tasks/empty similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/console/shells/tasks/empty rename to lib/Cake/tests/test_app/plugins/test_plugin/console/shells/tasks/empty diff --git a/cake/tests/test_app/plugins/test_plugin/console/shells/tasks/other_task.php b/lib/Cake/tests/test_app/plugins/test_plugin/console/shells/tasks/other_task.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/console/shells/tasks/other_task.php rename to lib/Cake/tests/test_app/plugins/test_plugin/console/shells/tasks/other_task.php diff --git a/cake/tests/test_app/plugins/test_plugin/console/templates/empty b/lib/Cake/tests/test_app/plugins/test_plugin/console/templates/empty similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/console/templates/empty rename to lib/Cake/tests/test_app/plugins/test_plugin/console/templates/empty diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php b/lib/Cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php rename to lib/Cake/tests/test_app/plugins/test_plugin/controllers/components/other_component.php diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php b/lib/Cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php rename to lib/Cake/tests/test_app/plugins/test_plugin/controllers/components/plugins_component.php diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php b/lib/Cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php rename to lib/Cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_component.php diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php b/lib/Cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php rename to lib/Cake/tests/test_app/plugins/test_plugin/controllers/components/test_plugin_other_component.php diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php b/lib/Cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php rename to lib/Cake/tests/test_app/plugins/test_plugin/controllers/test_plugin_controller.php diff --git a/cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php b/lib/Cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php rename to lib/Cake/tests/test_app/plugins/test_plugin/controllers/tests_controller.php diff --git a/cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php b/lib/Cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php rename to lib/Cake/tests/test_app/plugins/test_plugin/libs/cache/test_plugin_cache.php diff --git a/cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php b/lib/Cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php rename to lib/Cake/tests/test_app/plugins/test_plugin/libs/log/test_plugin_log.php diff --git a/cake/tests/test_app/plugins/test_plugin/libs/session/test_plugin_session.php b/lib/Cake/tests/test_app/plugins/test_plugin/libs/session/test_plugin_session.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/libs/session/test_plugin_session.php rename to lib/Cake/tests/test_app/plugins/test_plugin/libs/session/test_plugin_session.php diff --git a/cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php b/lib/Cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php rename to lib/Cake/tests/test_app/plugins/test_plugin/libs/test_plugin_library.php diff --git a/cake/tests/test_app/plugins/test_plugin/locale/po/LC_MESSAGES/test_plugin.po b/lib/Cake/tests/test_app/plugins/test_plugin/locale/po/LC_MESSAGES/test_plugin.po similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/locale/po/LC_MESSAGES/test_plugin.po rename to lib/Cake/tests/test_app/plugins/test_plugin/locale/po/LC_MESSAGES/test_plugin.po diff --git a/cake/tests/test_app/plugins/test_plugin/locale/po/LC_MONETARY/test_plugin.po b/lib/Cake/tests/test_app/plugins/test_plugin/locale/po/LC_MONETARY/test_plugin.po similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/locale/po/LC_MONETARY/test_plugin.po rename to lib/Cake/tests/test_app/plugins/test_plugin/locale/po/LC_MONETARY/test_plugin.po diff --git a/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_one.php diff --git a/cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/behaviors/test_plugin_persister_two.php diff --git a/cake/tests/test_app/plugins/test_plugin/models/datasources/dbo/dbo_dummy.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/datasources/dbo/dbo_dummy.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/datasources/dbo/dbo_dummy.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/datasources/dbo/dbo_dummy.php diff --git a/cake/tests/test_app/plugins/test_plugin/models/datasources/test/test_driver.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/datasources/test/test_driver.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/datasources/test/test_driver.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/datasources/test/test_driver.php diff --git a/cake/tests/test_app/plugins/test_plugin/models/datasources/test_other_source.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/datasources/test_other_source.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/datasources/test_other_source.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/datasources/test_other_source.php diff --git a/cake/tests/test_app/plugins/test_plugin/models/datasources/test_source.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/datasources/test_source.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/datasources/test_source.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/datasources/test_source.php diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/test_plugin_authors.php diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php b/lib/Cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php rename to lib/Cake/tests/test_app/plugins/test_plugin/models/test_plugin_post.php diff --git a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php b/lib/Cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php rename to lib/Cake/tests/test_app/plugins/test_plugin/test_plugin_app_controller.php diff --git a/cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php b/lib/Cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php rename to lib/Cake/tests/test_app/plugins/test_plugin/test_plugin_app_model.php diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php b/lib/Cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php rename to lib/Cake/tests/test_app/plugins/test_plugin/vendors/sample/sample_plugin.php diff --git a/cake/tests/test_app/plugins/test_plugin/vendors/welcome.php b/lib/Cake/tests/test_app/plugins/test_plugin/vendors/welcome.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/vendors/welcome.php rename to lib/Cake/tests/test_app/plugins/test_plugin/vendors/welcome.php diff --git a/cake/tests/test_app/plugins/test_plugin/views/elements/plugin_element.ctp b/lib/Cake/tests/test_app/plugins/test_plugin/views/elements/plugin_element.ctp similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/views/elements/plugin_element.ctp rename to lib/Cake/tests/test_app/plugins/test_plugin/views/elements/plugin_element.ctp diff --git a/cake/tests/test_app/plugins/test_plugin/views/elements/test_plugin_element.ctp b/lib/Cake/tests/test_app/plugins/test_plugin/views/elements/test_plugin_element.ctp similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/views/elements/test_plugin_element.ctp rename to lib/Cake/tests/test_app/plugins/test_plugin/views/elements/test_plugin_element.ctp diff --git a/cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php b/lib/Cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php rename to lib/Cake/tests/test_app/plugins/test_plugin/views/helpers/other_helper.php diff --git a/cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php b/lib/Cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php rename to lib/Cake/tests/test_app/plugins/test_plugin/views/helpers/plugged_helper.php diff --git a/cake/tests/test_app/plugins/test_plugin/views/helpers/test_plugin_app.php b/lib/Cake/tests/test_app/plugins/test_plugin/views/helpers/test_plugin_app.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/views/helpers/test_plugin_app.php rename to lib/Cake/tests/test_app/plugins/test_plugin/views/helpers/test_plugin_app.php diff --git a/cake/tests/test_app/plugins/test_plugin/views/layouts/default.ctp b/lib/Cake/tests/test_app/plugins/test_plugin/views/layouts/default.ctp similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/views/layouts/default.ctp rename to lib/Cake/tests/test_app/plugins/test_plugin/views/layouts/default.ctp diff --git a/cake/tests/test_app/plugins/test_plugin/views/tests/index.ctp b/lib/Cake/tests/test_app/plugins/test_plugin/views/tests/index.ctp similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/views/tests/index.ctp rename to lib/Cake/tests/test_app/plugins/test_plugin/views/tests/index.ctp diff --git a/cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp b/lib/Cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp rename to lib/Cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/css/test_plugin_asset.css b/lib/Cake/tests/test_app/plugins/test_plugin/webroot/css/test_plugin_asset.css similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/webroot/css/test_plugin_asset.css rename to lib/Cake/tests/test_app/plugins/test_plugin/webroot/css/test_plugin_asset.css diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/css/theme_one.htc b/lib/Cake/tests/test_app/plugins/test_plugin/webroot/css/theme_one.htc similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/webroot/css/theme_one.htc rename to lib/Cake/tests/test_app/plugins/test_plugin/webroot/css/theme_one.htc diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/css/unknown.extension b/lib/Cake/tests/test_app/plugins/test_plugin/webroot/css/unknown.extension similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/webroot/css/unknown.extension rename to lib/Cake/tests/test_app/plugins/test_plugin/webroot/css/unknown.extension diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/flash/plugin_test.swf b/lib/Cake/tests/test_app/plugins/test_plugin/webroot/flash/plugin_test.swf similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/webroot/flash/plugin_test.swf rename to lib/Cake/tests/test_app/plugins/test_plugin/webroot/flash/plugin_test.swf diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/img/cake.icon.gif b/lib/Cake/tests/test_app/plugins/test_plugin/webroot/img/cake.icon.gif similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/webroot/img/cake.icon.gif rename to lib/Cake/tests/test_app/plugins/test_plugin/webroot/img/cake.icon.gif diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/js/test_plugin/test.js b/lib/Cake/tests/test_app/plugins/test_plugin/webroot/js/test_plugin/test.js similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/webroot/js/test_plugin/test.js rename to lib/Cake/tests/test_app/plugins/test_plugin/webroot/js/test_plugin/test.js diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/pdfs/plugin_test.pdf b/lib/Cake/tests/test_app/plugins/test_plugin/webroot/pdfs/plugin_test.pdf similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/webroot/pdfs/plugin_test.pdf rename to lib/Cake/tests/test_app/plugins/test_plugin/webroot/pdfs/plugin_test.pdf diff --git a/cake/tests/test_app/plugins/test_plugin/webroot/root.js b/lib/Cake/tests/test_app/plugins/test_plugin/webroot/root.js similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/webroot/root.js rename to lib/Cake/tests/test_app/plugins/test_plugin/webroot/root.js diff --git a/cake/tests/test_app/plugins/test_plugin_two/console/shells/example.php b/lib/Cake/tests/test_app/plugins/test_plugin_two/console/shells/example.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin_two/console/shells/example.php rename to lib/Cake/tests/test_app/plugins/test_plugin_two/console/shells/example.php diff --git a/cake/tests/test_app/plugins/test_plugin_two/console/shells/tasks/empty b/lib/Cake/tests/test_app/plugins/test_plugin_two/console/shells/tasks/empty similarity index 100% rename from cake/tests/test_app/plugins/test_plugin_two/console/shells/tasks/empty rename to lib/Cake/tests/test_app/plugins/test_plugin_two/console/shells/tasks/empty diff --git a/cake/tests/test_app/plugins/test_plugin_two/console/shells/welcome.php b/lib/Cake/tests/test_app/plugins/test_plugin_two/console/shells/welcome.php similarity index 100% rename from cake/tests/test_app/plugins/test_plugin_two/console/shells/welcome.php rename to lib/Cake/tests/test_app/plugins/test_plugin_two/console/shells/welcome.php diff --git a/cake/tests/test_app/plugins/test_plugin_two/console/templates/empty b/lib/Cake/tests/test_app/plugins/test_plugin_two/console/templates/empty similarity index 100% rename from cake/tests/test_app/plugins/test_plugin_two/console/templates/empty rename to lib/Cake/tests/test_app/plugins/test_plugin_two/console/templates/empty diff --git a/cake/tests/test_app/tmp/dir_map b/lib/Cake/tests/test_app/tmp/dir_map similarity index 100% rename from cake/tests/test_app/tmp/dir_map rename to lib/Cake/tests/test_app/tmp/dir_map diff --git a/cake/tests/test_app/vendors/Test/MyTest.php b/lib/Cake/tests/test_app/vendors/Test/MyTest.php similarity index 100% rename from cake/tests/test_app/vendors/Test/MyTest.php rename to lib/Cake/tests/test_app/vendors/Test/MyTest.php diff --git a/cake/tests/test_app/vendors/Test/hello.php b/lib/Cake/tests/test_app/vendors/Test/hello.php similarity index 100% rename from cake/tests/test_app/vendors/Test/hello.php rename to lib/Cake/tests/test_app/vendors/Test/hello.php diff --git a/cake/tests/test_app/vendors/css/test_asset.css b/lib/Cake/tests/test_app/vendors/css/test_asset.css similarity index 100% rename from cake/tests/test_app/vendors/css/test_asset.css rename to lib/Cake/tests/test_app/vendors/css/test_asset.css diff --git a/cake/tests/test_app/vendors/img/test.jpg b/lib/Cake/tests/test_app/vendors/img/test.jpg similarity index 100% rename from cake/tests/test_app/vendors/img/test.jpg rename to lib/Cake/tests/test_app/vendors/img/test.jpg diff --git a/cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php b/lib/Cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php similarity index 100% rename from cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php rename to lib/Cake/tests/test_app/vendors/sample/configure_test_vendor_sample.php diff --git a/cake/tests/test_app/vendors/somename/some.name.php b/lib/Cake/tests/test_app/vendors/somename/some.name.php similarity index 100% rename from cake/tests/test_app/vendors/somename/some.name.php rename to lib/Cake/tests/test_app/vendors/somename/some.name.php diff --git a/cake/tests/test_app/vendors/welcome.php b/lib/Cake/tests/test_app/vendors/welcome.php similarity index 100% rename from cake/tests/test_app/vendors/welcome.php rename to lib/Cake/tests/test_app/vendors/welcome.php diff --git a/cake/tests/test_app/views/elements/email/html/custom.ctp b/lib/Cake/tests/test_app/views/elements/email/html/custom.ctp similarity index 100% rename from cake/tests/test_app/views/elements/email/html/custom.ctp rename to lib/Cake/tests/test_app/views/elements/email/html/custom.ctp diff --git a/cake/tests/test_app/views/elements/email/html/default.ctp b/lib/Cake/tests/test_app/views/elements/email/html/default.ctp similarity index 100% rename from cake/tests/test_app/views/elements/email/html/default.ctp rename to lib/Cake/tests/test_app/views/elements/email/html/default.ctp diff --git a/cake/tests/test_app/views/elements/email/text/custom.ctp b/lib/Cake/tests/test_app/views/elements/email/text/custom.ctp similarity index 100% rename from cake/tests/test_app/views/elements/email/text/custom.ctp rename to lib/Cake/tests/test_app/views/elements/email/text/custom.ctp diff --git a/cake/tests/test_app/views/elements/email/text/default.ctp b/lib/Cake/tests/test_app/views/elements/email/text/default.ctp similarity index 100% rename from cake/tests/test_app/views/elements/email/text/default.ctp rename to lib/Cake/tests/test_app/views/elements/email/text/default.ctp diff --git a/cake/tests/test_app/views/elements/email/text/wide.ctp b/lib/Cake/tests/test_app/views/elements/email/text/wide.ctp similarity index 100% rename from cake/tests/test_app/views/elements/email/text/wide.ctp rename to lib/Cake/tests/test_app/views/elements/email/text/wide.ctp diff --git a/cake/tests/test_app/views/elements/empty b/lib/Cake/tests/test_app/views/elements/empty similarity index 100% rename from cake/tests/test_app/views/elements/empty rename to lib/Cake/tests/test_app/views/elements/empty diff --git a/cake/tests/test_app/views/elements/nocache/contains_nocache.ctp b/lib/Cake/tests/test_app/views/elements/nocache/contains_nocache.ctp similarity index 100% rename from cake/tests/test_app/views/elements/nocache/contains_nocache.ctp rename to lib/Cake/tests/test_app/views/elements/nocache/contains_nocache.ctp diff --git a/cake/tests/test_app/views/elements/nocache/plain.ctp b/lib/Cake/tests/test_app/views/elements/nocache/plain.ctp similarity index 100% rename from cake/tests/test_app/views/elements/nocache/plain.ctp rename to lib/Cake/tests/test_app/views/elements/nocache/plain.ctp diff --git a/cake/tests/test_app/views/elements/nocache/sub1.ctp b/lib/Cake/tests/test_app/views/elements/nocache/sub1.ctp similarity index 100% rename from cake/tests/test_app/views/elements/nocache/sub1.ctp rename to lib/Cake/tests/test_app/views/elements/nocache/sub1.ctp diff --git a/cake/tests/test_app/views/elements/nocache/sub2.ctp b/lib/Cake/tests/test_app/views/elements/nocache/sub2.ctp similarity index 100% rename from cake/tests/test_app/views/elements/nocache/sub2.ctp rename to lib/Cake/tests/test_app/views/elements/nocache/sub2.ctp diff --git a/cake/tests/test_app/views/elements/session_helper.ctp b/lib/Cake/tests/test_app/views/elements/session_helper.ctp similarity index 100% rename from cake/tests/test_app/views/elements/session_helper.ctp rename to lib/Cake/tests/test_app/views/elements/session_helper.ctp diff --git a/cake/tests/test_app/views/elements/test_element.ctp b/lib/Cake/tests/test_app/views/elements/test_element.ctp similarity index 100% rename from cake/tests/test_app/views/elements/test_element.ctp rename to lib/Cake/tests/test_app/views/elements/test_element.ctp diff --git a/cake/tests/test_app/views/errors/empty b/lib/Cake/tests/test_app/views/errors/empty similarity index 100% rename from cake/tests/test_app/views/errors/empty rename to lib/Cake/tests/test_app/views/errors/empty diff --git a/cake/tests/test_app/views/helpers/banana.php b/lib/Cake/tests/test_app/views/helpers/banana.php similarity index 100% rename from cake/tests/test_app/views/helpers/banana.php rename to lib/Cake/tests/test_app/views/helpers/banana.php diff --git a/cake/tests/test_app/views/helpers/empty b/lib/Cake/tests/test_app/views/helpers/empty similarity index 100% rename from cake/tests/test_app/views/helpers/empty rename to lib/Cake/tests/test_app/views/helpers/empty diff --git a/cake/tests/test_app/views/layouts/ajax.ctp b/lib/Cake/tests/test_app/views/layouts/ajax.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/ajax.ctp rename to lib/Cake/tests/test_app/views/layouts/ajax.ctp diff --git a/cake/tests/test_app/views/layouts/ajax2.ctp b/lib/Cake/tests/test_app/views/layouts/ajax2.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/ajax2.ctp rename to lib/Cake/tests/test_app/views/layouts/ajax2.ctp diff --git a/cake/tests/test_app/views/layouts/cache_empty_sections.ctp b/lib/Cake/tests/test_app/views/layouts/cache_empty_sections.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/cache_empty_sections.ctp rename to lib/Cake/tests/test_app/views/layouts/cache_empty_sections.ctp diff --git a/cake/tests/test_app/views/layouts/cache_layout.ctp b/lib/Cake/tests/test_app/views/layouts/cache_layout.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/cache_layout.ctp rename to lib/Cake/tests/test_app/views/layouts/cache_layout.ctp diff --git a/cake/tests/test_app/views/layouts/default.ctp b/lib/Cake/tests/test_app/views/layouts/default.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/default.ctp rename to lib/Cake/tests/test_app/views/layouts/default.ctp diff --git a/cake/tests/test_app/views/layouts/email/html/default.ctp b/lib/Cake/tests/test_app/views/layouts/email/html/default.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/email/html/default.ctp rename to lib/Cake/tests/test_app/views/layouts/email/html/default.ctp diff --git a/cake/tests/test_app/views/layouts/email/html/thin.ctp b/lib/Cake/tests/test_app/views/layouts/email/html/thin.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/email/html/thin.ctp rename to lib/Cake/tests/test_app/views/layouts/email/html/thin.ctp diff --git a/cake/tests/test_app/views/layouts/email/text/default.ctp b/lib/Cake/tests/test_app/views/layouts/email/text/default.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/email/text/default.ctp rename to lib/Cake/tests/test_app/views/layouts/email/text/default.ctp diff --git a/cake/tests/test_app/views/layouts/flash.ctp b/lib/Cake/tests/test_app/views/layouts/flash.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/flash.ctp rename to lib/Cake/tests/test_app/views/layouts/flash.ctp diff --git a/cake/tests/test_app/views/layouts/js/default.ctp b/lib/Cake/tests/test_app/views/layouts/js/default.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/js/default.ctp rename to lib/Cake/tests/test_app/views/layouts/js/default.ctp diff --git a/cake/tests/test_app/views/layouts/multi_cache.ctp b/lib/Cake/tests/test_app/views/layouts/multi_cache.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/multi_cache.ctp rename to lib/Cake/tests/test_app/views/layouts/multi_cache.ctp diff --git a/cake/tests/test_app/views/layouts/rss/default.ctp b/lib/Cake/tests/test_app/views/layouts/rss/default.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/rss/default.ctp rename to lib/Cake/tests/test_app/views/layouts/rss/default.ctp diff --git a/cake/tests/test_app/views/layouts/xml/default.ctp b/lib/Cake/tests/test_app/views/layouts/xml/default.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/xml/default.ctp rename to lib/Cake/tests/test_app/views/layouts/xml/default.ctp diff --git a/cake/tests/test_app/views/pages/empty b/lib/Cake/tests/test_app/views/pages/empty similarity index 100% rename from cake/tests/test_app/views/pages/empty rename to lib/Cake/tests/test_app/views/pages/empty diff --git a/cake/tests/test_app/views/pages/extract.ctp b/lib/Cake/tests/test_app/views/pages/extract.ctp similarity index 100% rename from cake/tests/test_app/views/pages/extract.ctp rename to lib/Cake/tests/test_app/views/pages/extract.ctp diff --git a/cake/tests/test_app/views/pages/home.ctp b/lib/Cake/tests/test_app/views/pages/home.ctp similarity index 100% rename from cake/tests/test_app/views/pages/home.ctp rename to lib/Cake/tests/test_app/views/pages/home.ctp diff --git a/cake/tests/test_app/views/posts/cache_empty_sections.ctp b/lib/Cake/tests/test_app/views/posts/cache_empty_sections.ctp similarity index 100% rename from cake/tests/test_app/views/posts/cache_empty_sections.ctp rename to lib/Cake/tests/test_app/views/posts/cache_empty_sections.ctp diff --git a/cake/tests/test_app/views/posts/cache_form.ctp b/lib/Cake/tests/test_app/views/posts/cache_form.ctp similarity index 100% rename from cake/tests/test_app/views/posts/cache_form.ctp rename to lib/Cake/tests/test_app/views/posts/cache_form.ctp diff --git a/cake/tests/test_app/views/posts/helper_overwrite.ctp b/lib/Cake/tests/test_app/views/posts/helper_overwrite.ctp similarity index 100% rename from cake/tests/test_app/views/posts/helper_overwrite.ctp rename to lib/Cake/tests/test_app/views/posts/helper_overwrite.ctp diff --git a/cake/tests/test_app/views/posts/index.ctp b/lib/Cake/tests/test_app/views/posts/index.ctp similarity index 100% rename from cake/tests/test_app/views/posts/index.ctp rename to lib/Cake/tests/test_app/views/posts/index.ctp diff --git a/cake/tests/test_app/views/posts/multiple_nocache.ctp b/lib/Cake/tests/test_app/views/posts/multiple_nocache.ctp similarity index 100% rename from cake/tests/test_app/views/posts/multiple_nocache.ctp rename to lib/Cake/tests/test_app/views/posts/multiple_nocache.ctp diff --git a/cake/tests/test_app/views/posts/nocache_multiple_element.ctp b/lib/Cake/tests/test_app/views/posts/nocache_multiple_element.ctp similarity index 100% rename from cake/tests/test_app/views/posts/nocache_multiple_element.ctp rename to lib/Cake/tests/test_app/views/posts/nocache_multiple_element.ctp diff --git a/cake/tests/test_app/views/posts/scaffold.edit.ctp b/lib/Cake/tests/test_app/views/posts/scaffold.edit.ctp similarity index 100% rename from cake/tests/test_app/views/posts/scaffold.edit.ctp rename to lib/Cake/tests/test_app/views/posts/scaffold.edit.ctp diff --git a/cake/tests/test_app/views/posts/sequencial_nocache.ctp b/lib/Cake/tests/test_app/views/posts/sequencial_nocache.ctp similarity index 100% rename from cake/tests/test_app/views/posts/sequencial_nocache.ctp rename to lib/Cake/tests/test_app/views/posts/sequencial_nocache.ctp diff --git a/cake/tests/test_app/views/posts/test_nocache_tags.ctp b/lib/Cake/tests/test_app/views/posts/test_nocache_tags.ctp similarity index 100% rename from cake/tests/test_app/views/posts/test_nocache_tags.ctp rename to lib/Cake/tests/test_app/views/posts/test_nocache_tags.ctp diff --git a/cake/tests/test_app/views/scaffolds/empty b/lib/Cake/tests/test_app/views/scaffolds/empty similarity index 100% rename from cake/tests/test_app/views/scaffolds/empty rename to lib/Cake/tests/test_app/views/scaffolds/empty diff --git a/cake/tests/test_app/views/tests_apps/index.ctp b/lib/Cake/tests/test_app/views/tests_apps/index.ctp similarity index 100% rename from cake/tests/test_app/views/tests_apps/index.ctp rename to lib/Cake/tests/test_app/views/tests_apps/index.ctp diff --git a/cake/tests/test_app/views/themed/test_theme/elements/test_element.ctp b/lib/Cake/tests/test_app/views/themed/test_theme/elements/test_element.ctp similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/elements/test_element.ctp rename to lib/Cake/tests/test_app/views/themed/test_theme/elements/test_element.ctp diff --git a/cake/tests/test_app/views/themed/test_theme/layouts/default.ctp b/lib/Cake/tests/test_app/views/themed/test_theme/layouts/default.ctp similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/layouts/default.ctp rename to lib/Cake/tests/test_app/views/themed/test_theme/layouts/default.ctp diff --git a/cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/layouts/plugin_default.ctp b/lib/Cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/layouts/plugin_default.ctp similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/layouts/plugin_default.ctp rename to lib/Cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/layouts/plugin_default.ctp diff --git a/cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/tests/index.ctp b/lib/Cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/tests/index.ctp similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/tests/index.ctp rename to lib/Cake/tests/test_app/views/themed/test_theme/plugins/test_plugin/tests/index.ctp diff --git a/cake/tests/test_app/views/themed/test_theme/posts/index.ctp b/lib/Cake/tests/test_app/views/themed/test_theme/posts/index.ctp similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/posts/index.ctp rename to lib/Cake/tests/test_app/views/themed/test_theme/posts/index.ctp diff --git a/cake/tests/test_app/views/themed/test_theme/posts/scaffold.index.ctp b/lib/Cake/tests/test_app/views/themed/test_theme/posts/scaffold.index.ctp similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/posts/scaffold.index.ctp rename to lib/Cake/tests/test_app/views/themed/test_theme/posts/scaffold.index.ctp diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/css/test_asset.css b/lib/Cake/tests/test_app/views/themed/test_theme/webroot/css/test_asset.css similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/webroot/css/test_asset.css rename to lib/Cake/tests/test_app/views/themed/test_theme/webroot/css/test_asset.css diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/css/theme_webroot.css b/lib/Cake/tests/test_app/views/themed/test_theme/webroot/css/theme_webroot.css similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/webroot/css/theme_webroot.css rename to lib/Cake/tests/test_app/views/themed/test_theme/webroot/css/theme_webroot.css diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/flash/theme_test.swf b/lib/Cake/tests/test_app/views/themed/test_theme/webroot/flash/theme_test.swf similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/webroot/flash/theme_test.swf rename to lib/Cake/tests/test_app/views/themed/test_theme/webroot/flash/theme_test.swf diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/img/cake.power.gif b/lib/Cake/tests/test_app/views/themed/test_theme/webroot/img/cake.power.gif similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/webroot/img/cake.power.gif rename to lib/Cake/tests/test_app/views/themed/test_theme/webroot/img/cake.power.gif diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/img/test.jpg b/lib/Cake/tests/test_app/views/themed/test_theme/webroot/img/test.jpg similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/webroot/img/test.jpg rename to lib/Cake/tests/test_app/views/themed/test_theme/webroot/img/test.jpg diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/js/one/theme_one.js b/lib/Cake/tests/test_app/views/themed/test_theme/webroot/js/one/theme_one.js similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/webroot/js/one/theme_one.js rename to lib/Cake/tests/test_app/views/themed/test_theme/webroot/js/one/theme_one.js diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/js/theme.js b/lib/Cake/tests/test_app/views/themed/test_theme/webroot/js/theme.js similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/webroot/js/theme.js rename to lib/Cake/tests/test_app/views/themed/test_theme/webroot/js/theme.js diff --git a/cake/tests/test_app/views/themed/test_theme/webroot/pdfs/theme_test.pdf b/lib/Cake/tests/test_app/views/themed/test_theme/webroot/pdfs/theme_test.pdf similarity index 100% rename from cake/tests/test_app/views/themed/test_theme/webroot/pdfs/theme_test.pdf rename to lib/Cake/tests/test_app/views/themed/test_theme/webroot/pdfs/theme_test.pdf diff --git a/cake/tests/test_app/webroot/theme/test_theme/css/theme_webroot.css b/lib/Cake/tests/test_app/webroot/theme/test_theme/css/theme_webroot.css similarity index 100% rename from cake/tests/test_app/webroot/theme/test_theme/css/theme_webroot.css rename to lib/Cake/tests/test_app/webroot/theme/test_theme/css/theme_webroot.css diff --git a/cake/tests/test_app/webroot/theme/test_theme/css/webroot_test.css b/lib/Cake/tests/test_app/webroot/theme/test_theme/css/webroot_test.css similarity index 100% rename from cake/tests/test_app/webroot/theme/test_theme/css/webroot_test.css rename to lib/Cake/tests/test_app/webroot/theme/test_theme/css/webroot_test.css diff --git a/cake/tests/test_app/webroot/theme/test_theme/img/cake.power.gif b/lib/Cake/tests/test_app/webroot/theme/test_theme/img/cake.power.gif similarity index 100% rename from cake/tests/test_app/webroot/theme/test_theme/img/cake.power.gif rename to lib/Cake/tests/test_app/webroot/theme/test_theme/img/cake.power.gif diff --git a/cake/tests/test_app/webroot/theme/test_theme/img/test.jpg b/lib/Cake/tests/test_app/webroot/theme/test_theme/img/test.jpg similarity index 100% rename from cake/tests/test_app/webroot/theme/test_theme/img/test.jpg rename to lib/Cake/tests/test_app/webroot/theme/test_theme/img/test.jpg From 848461f7a0d82e39b06969f9adf5728be97e5b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Wed, 8 Dec 2010 01:49:36 -0430 Subject: [PATCH 056/214] Making the testsuite run again --- lib/Cake/Console/Command/Task/ExtractTask.php | 2 +- lib/Cake/Console/Command/TestSuiteShell.php | 10 +++++----- lib/Cake/Model/ConnectionManager.php | 2 +- lib/Cake/TestSuite/CakeTestCase.php | 6 +++--- .../TestSuite/Fixture/CakeFixtureManager.php | 19 ++----------------- lib/Cake/TestSuite/Fixture/CakeTestModel.php | 3 ++- lib/Cake/TestSuite/TestManager.php | 10 +++++----- lib/Cake/TestSuite/TestRunner.php | 2 +- lib/Cake/tests/cases/libs/xml.test.php | 3 ++- 9 files changed, 22 insertions(+), 35 deletions(-) diff --git a/lib/Cake/Console/Command/Task/ExtractTask.php b/lib/Cake/Console/Command/Task/ExtractTask.php index 89af9153c..e79df6b8d 100644 --- a/lib/Cake/Console/Command/Task/ExtractTask.php +++ b/lib/Cake/Console/Command/Task/ExtractTask.php @@ -114,7 +114,7 @@ class ExtractTask extends Shell { $this->__paths = explode(',', $this->params['paths']); } else { $defaultPath = APP_PATH; - $message = __("What is the full path you would like to extract?\nExample: %s\n[Q]uit [D]one", $this->Dispatch->params['root'] . DS . 'myapp'); + $message = __("What is the full path you would like to extract?\nExample: %s\n[Q]uit [D]one", $defaultPath); while (true) { $response = $this->in($message, null, $defaultPath); if (strtoupper($response) === 'Q') { diff --git a/lib/Cake/Console/Command/TestSuiteShell.php b/lib/Cake/Console/Command/TestSuiteShell.php index 8814242a2..3b3b1f901 100644 --- a/lib/Cake/Console/Command/TestSuiteShell.php +++ b/lib/Cake/Console/Command/TestSuiteShell.php @@ -19,6 +19,11 @@ * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +App::uses('CakeTestSuiteDispatcher', 'TestSuite'); +App::uses('TestRunner', 'TestSuite'); +App::uses('TestManager', 'TestSuite'); + class TestSuiteShell extends Shell { /** @@ -155,8 +160,6 @@ class TestSuiteShell extends Shell { * @return void */ public function initialize() { - require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_suite_dispatcher.php'; - $corePath = App::core('cake'); if (isset($corePath[0])) { define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); @@ -166,7 +169,6 @@ class TestSuiteShell extends Shell { $this->_dispatcher = new CakeTestSuiteDispatcher(); $this->_dispatcher->loadTestFramework(); - require_once CAKE . 'tests' . DS . 'lib' . DS . 'test_manager.php'; } /** @@ -252,8 +254,6 @@ class TestSuiteShell extends Shell { * @return void */ protected function run($runnerArgs, $options = array()) { - require_once CAKE . 'tests' . DS . 'lib' . DS . 'test_runner.php'; - restore_error_handler(); restore_error_handler(); diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index 208d6ba9d..324dcf554 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -230,7 +230,7 @@ class ConnectionManager { if (!empty(self::$config->{$name})) { self::$_connectionsEnum[$name] = self::_connectionData(self::$config->{$name}); } else { - throw new MissingConnectionException(array('class' => 'ConnectionManager')); + throw new MissingConnectionException(array('class' => $name)); } } diff --git a/lib/Cake/TestSuite/CakeTestCase.php b/lib/Cake/TestSuite/CakeTestCase.php index 184dc7912..95819c5e1 100644 --- a/lib/Cake/TestSuite/CakeTestCase.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -20,9 +20,9 @@ PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); -require_once CAKE_TESTS_LIB . 'cake_fixture_manager.php'; -require_once CAKE_TESTS_LIB . 'cake_test_model.php'; -require_once CAKE_TESTS_LIB . 'cake_test_fixture.php'; +App::uses('CakeFixtureManager', 'TestSuite/Fixture'); +App::uses('CakeTestModel', 'TestSuite/Fixture'); +App::uses('CakeTestFixture', 'TestSuite/Fixture'); /** * CakeTestCase class diff --git a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php index 099da5557..ea09473e7 100644 --- a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php +++ b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php @@ -55,7 +55,7 @@ class CakeFixtureManager { * @param CakeTestCase $test the test case to inspect * @return void */ - public function fixturize(CakeTestCase $test) { + public function fixturize($test) { if (empty($test->fixtures) || !empty($this->_processed[get_class($test)])) { $test->db = $this->_db; return; @@ -81,22 +81,7 @@ class CakeFixtureManager { if ($this->_initialized) { return; } - $testDbAvailable = in_array('test', array_keys(ConnectionManager::enumConnectionObjects())); - - $_prefix = null; - - if ($testDbAvailable) { - // Try for test DB - @$db = ConnectionManager::getDataSource('test'); - $testDbAvailable = $db->isConnected(); - } else { - throw new MissingConnectionException(__('You need to create a $test datasource connection to start using fixtures')); - } - - if (!$testDbAvailable) { - throw new MissingConnectionException(__('Unable to connect to the $test datasource')); - } - + $db = ConnectionManager::getDataSource('test'); $this->_db = $db; ClassRegistry::config(array('ds' => 'test')); $this->_initialized = true; diff --git a/lib/Cake/TestSuite/Fixture/CakeTestModel.php b/lib/Cake/TestSuite/Fixture/CakeTestModel.php index 819c3cbe2..6c7d3d4b3 100644 --- a/lib/Cake/TestSuite/Fixture/CakeTestModel.php +++ b/lib/Cake/TestSuite/Fixture/CakeTestModel.php @@ -17,7 +17,8 @@ * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once LIBS.'model'.DS.'model.php'; + +App::uses('Model', 'Model'); /** * Short description for class. diff --git a/lib/Cake/TestSuite/TestManager.php b/lib/Cake/TestSuite/TestManager.php index f4f5b4571..cf56a20b7 100644 --- a/lib/Cake/TestSuite/TestManager.php +++ b/lib/Cake/TestSuite/TestManager.php @@ -17,13 +17,15 @@ * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -define('CORE_TEST_CASES', TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'cases'); -define('CORE_TEST_GROUPS', TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'groups'); +define('CORE_TEST_CASES', LIBS . 'tests' . DS . 'cases'); +define('CORE_TEST_GROUPS', LIBS . 'tests' . DS . 'groups'); define('APP_TEST_CASES', TESTS . 'cases'); define('APP_TEST_GROUPS', TESTS . 'groups'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); -require_once CAKE_TESTS_LIB . 'cake_test_suite.php'; +App::uses('CakeTestSuite', 'TestSuite'); +App::uses('CakeTestCase', 'TestSuite'); +App::uses('CakeFixtureManager', 'TestSuite/Fixture'); /** * TestManager is the base class that handles loading and initiating the running @@ -88,8 +90,6 @@ class TestManager { * @return void */ public function __construct($params = array()) { - require_once(CAKE_TESTS_LIB . 'cake_test_case.php'); - $this->params = $params; if (isset($params['app'])) { $this->appTest = true; diff --git a/lib/Cake/TestSuite/TestRunner.php b/lib/Cake/TestSuite/TestRunner.php index c2ca7f809..afd299e3a 100644 --- a/lib/Cake/TestSuite/TestRunner.php +++ b/lib/Cake/TestSuite/TestRunner.php @@ -20,7 +20,7 @@ require 'PHPUnit/TextUI/Command.php'; -require_once 'test_manager.php'; +App::uses('TestManager', 'TestSuite'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); diff --git a/lib/Cake/tests/cases/libs/xml.test.php b/lib/Cake/tests/cases/libs/xml.test.php index 666a4f45d..ee00efd2b 100644 --- a/lib/Cake/tests/cases/libs/xml.test.php +++ b/lib/Cake/tests/cases/libs/xml.test.php @@ -17,7 +17,8 @@ * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Xml'); +App::uses('Xml', 'Utility'); +App::uses('CakeTestModel', 'TestSuite/Fixture'); /** * Article class From b8344ecd3389e355eaa41e36afbe52085fd9d2b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Wed, 8 Dec 2010 23:15:18 -0430 Subject: [PATCH 057/214] Replacing some of the App::import by App::uses --- lib/Cake/Console/Command/AclShell.php | 4 +-- lib/Cake/Console/Command/ApiShell.php | 2 +- lib/Cake/Console/Command/BakeShell.php | 9 ++++-- lib/Cake/Console/Command/ConsoleShell.php | 2 +- .../Console/Command/Task/ControllerTask.php | 6 ++-- .../Console/Command/Task/DbConfigTask.php | 2 +- lib/Cake/Console/Command/Task/FixtureTask.php | 6 ++-- lib/Cake/Console/Command/Task/ModelTask.php | 2 +- lib/Cake/Console/Command/Task/PluginTask.php | 3 +- lib/Cake/Console/Command/Task/ViewTask.php | 14 +++++---- lib/Cake/Console/ConsoleErrorHandler.php | 2 +- .../Controller/Component/AclComponent.php | 2 +- .../Controller/Component/EmailComponent.php | 6 ++-- .../Component/RequestHandlerComponent.php | 3 +- lib/Cake/Controller/Controller.php | 4 +-- lib/Cake/Core/App.php | 6 ++-- lib/Cake/Error/ErrorHandler.php | 2 +- lib/Cake/Error/ExceptionRenderer.php | 5 ++-- lib/Cake/I18n/I18n.php | 2 +- lib/Cake/I18n/Multibyte.php | 2 +- lib/Cake/Model/BehaviorCollection.php | 7 +---- lib/Cake/Model/CakeSchema.php | 6 ++-- lib/Cake/Model/Datasource/DboSource.php | 3 +- lib/Cake/Utility/Set.php | 2 +- lib/Cake/View/pages/home.ctp | 2 +- lib/Cake/basics.php | 4 +-- lib/Cake/tests/cases/basics.test.php | 3 +- .../console/libs/task_collection.test.php | 4 +-- .../tests/cases/console/shells/acl.test.php | 6 ++-- .../tests/cases/console/shells/api.test.php | 7 ++--- .../tests/cases/console/shells/bake.test.php | 16 +++++----- .../console/shells/command_list.test.php | 2 +- .../cases/console/shells/schema.test.php | 9 ++---- .../tests/cases/console/shells/shell.test.php | 6 ++-- .../console/shells/tasks/controller.test.php | 30 ++++++++----------- .../console/shells/tasks/db_config.test.php | 7 ++--- .../console/shells/tasks/extract.test.php | 8 ++--- .../console/shells/tasks/fixture.test.php | 12 ++++---- .../cases/console/shells/tasks/model.test.php | 12 ++++---- .../console/shells/tasks/plugin.test.php | 13 ++++---- .../console/shells/tasks/project.test.php | 9 +++--- .../console/shells/tasks/template.test.php | 7 ++--- .../cases/console/shells/tasks/test.test.php | 15 ++++------ 43 files changed, 127 insertions(+), 147 deletions(-) diff --git a/lib/Cake/Console/Command/AclShell.php b/lib/Cake/Console/Command/AclShell.php index e29e4f4ef..04aaa4936 100644 --- a/lib/Cake/Console/Command/AclShell.php +++ b/lib/Cake/Console/Command/AclShell.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Component', 'Acl'); -App::import('Model', 'DbAcl'); +App::uses('AclComponent', 'Controller/Component'); +App::uses('DbAcl', 'Model'); /** * Shell for ACL management. This console is known to have issues with zend.ze1_compatibility_mode diff --git a/lib/Cake/Console/Command/ApiShell.php b/lib/Cake/Console/Command/ApiShell.php index 0c036d09d..a9a436a29 100644 --- a/lib/Cake/Console/Command/ApiShell.php +++ b/lib/Cake/Console/Command/ApiShell.php @@ -19,7 +19,7 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); +App::uses('File', 'Utility'); /** * API shell to show method signatures of CakePHP core classes. diff --git a/lib/Cake/Console/Command/BakeShell.php b/lib/Cake/Console/Command/BakeShell.php index 77dd36201..ed09609f0 100644 --- a/lib/Cake/Console/Command/BakeShell.php +++ b/lib/Cake/Console/Command/BakeShell.php @@ -22,6 +22,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Model', 'Model'); + /** * Bake is a command-line code generation utility for automating programmer chores. * @@ -151,11 +153,11 @@ class BakeShell extends Shell { $modelExists = false; $model = $this->_modelName($name); - if (App::import('Model', $model)) { + App::uses($model, 'Model'); + if (class_exists($model)) { $object = new $model(); $modelExists = true; } else { - App::import('Model', 'Model', false); $object = new Model(array('name' => $name, 'ds' => $this->connection)); } @@ -176,7 +178,8 @@ class BakeShell extends Shell { $this->Controller->bakeTest($controller); } } - if (App::import('Controller', $controller)) { + App::uses($controller . 'Controller', 'Controller') + if (class_exists($controller . 'Controller')) { $this->View->args = array($controller); $this->View->execute(); } diff --git a/lib/Cake/Console/Command/ConsoleShell.php b/lib/Cake/Console/Command/ConsoleShell.php index 404c348ed..5cedf5a97 100644 --- a/lib/Cake/Console/Command/ConsoleShell.php +++ b/lib/Cake/Console/Command/ConsoleShell.php @@ -56,11 +56,11 @@ class ConsoleShell extends Shell { App::uses('Dispatcher', 'Routing'); $this->Dispatcher = new Dispatcher(); $this->models = App::objects('model'); - App::import('Model', $this->models); foreach ($this->models as $model) { $class = Inflector::camelize(str_replace('.php', '', $model)); $this->models[$model] = $class; + App::uses($class, 'Model'); $this->{$class} = new $class(); } $this->out('Model classes:'); diff --git a/lib/Cake/Console/Command/Task/ControllerTask.php b/lib/Cake/Console/Command/Task/ControllerTask.php index 46f512365..449a3aa84 100644 --- a/lib/Cake/Console/Command/Task/ControllerTask.php +++ b/lib/Cake/Console/Command/Task/ControllerTask.php @@ -108,7 +108,8 @@ class ControllerTask extends BakeTask { foreach ($this->__tables as $table) { $model = $this->_modelName($table); $controller = $this->_controllerName($model); - if (App::import('Model', $model)) { + App::uses($model, 'Model'); + if (!class_exists($model)) { $actions = $this->bakeActions($controller); if ($this->bake($controller, $actions) && $unitTestExists) { $this->bakeTest($controller); @@ -273,7 +274,8 @@ class ControllerTask extends BakeTask { if ($plugin) { $modelImport = $plugin . '.' . $modelImport; } - if (!App::import('Model', $modelImport)) { + App::uses($modelImport, 'Model'); + if (!class_exists($modelImport)) { $this->err(__('You must have a model for this class to build basic methods. Please try again.')); $this->_stop(); } diff --git a/lib/Cake/Console/Command/Task/DbConfigTask.php b/lib/Cake/Console/Command/Task/DbConfigTask.php index a98b6b053..9f866b1c1 100644 --- a/lib/Cake/Console/Command/Task/DbConfigTask.php +++ b/lib/Cake/Console/Command/Task/DbConfigTask.php @@ -353,7 +353,7 @@ class DbConfigTask extends Shell { * @return void */ public function getConfig() { - App::import('Model', 'ConnectionManager', false); + App::uses('ConnectionManager', 'Model'); $useDbConfig = 'default'; $configs = get_class_vars($this->databaseClassName); diff --git a/lib/Cake/Console/Command/Task/FixtureTask.php b/lib/Cake/Console/Command/Task/FixtureTask.php index cc081c84c..2e0a4c31e 100644 --- a/lib/Cake/Console/Command/Task/FixtureTask.php +++ b/lib/Cake/Console/Command/Task/FixtureTask.php @@ -19,6 +19,7 @@ */ App::uses('BakeTask', 'Console/Command/Task'); +App::uses('Model', 'Model'); /** * Task class for creating and updating fixtures files. @@ -186,9 +187,7 @@ class FixtureTask extends BakeTask { * @return string Baked fixture content */ public function bake($model, $useTable = false, $importOptions = array()) { - if (!class_exists('CakeSchema')) { - App::import('Model', 'CakeSchema', false); - } + App::uses('CakeSchema', 'Model'); $table = $schema = $records = $import = $modelImport = $recordImport = null; if (!$useTable) { $useTable = Inflector::tableize($model); @@ -394,7 +393,6 @@ class FixtureTask extends BakeTask { } else { $condition = 'WHERE 1=1 LIMIT ' . (isset($this->params['count']) ? $this->params['count'] : 10); } - App::import('Model', 'Model', false); $modelObject = new Model(array('name' => $modelName, 'table' => $useTable, 'ds' => $this->connection)); $records = $modelObject->find('all', array( 'conditions' => $condition, diff --git a/lib/Cake/Console/Command/Task/ModelTask.php b/lib/Cake/Console/Command/Task/ModelTask.php index c893de33a..e0bc29378 100644 --- a/lib/Cake/Console/Command/Task/ModelTask.php +++ b/lib/Cake/Console/Command/Task/ModelTask.php @@ -20,6 +20,7 @@ App::uses('BakeTask', 'Console/Command/Task'); App::uses('ConnectionManager', 'Model'); +App::uses('Model', 'Model'); /** * Task class for creating and updating model files. @@ -74,7 +75,6 @@ class ModelTask extends BakeTask { * */ public function execute() { - App::import('Model', 'Model', false); parent::execute(); if (empty($this->args)) { diff --git a/lib/Cake/Console/Command/Task/PluginTask.php b/lib/Cake/Console/Command/Task/PluginTask.php index 6ae7bd5cb..84c296623 100644 --- a/lib/Cake/Console/Command/Task/PluginTask.php +++ b/lib/Cake/Console/Command/Task/PluginTask.php @@ -17,7 +17,8 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); + +App::uses('File', 'Utility'); /** * Task class for creating a plugin diff --git a/lib/Cake/Console/Command/Task/ViewTask.php b/lib/Cake/Console/Command/Task/ViewTask.php index fc3baa8ae..106ba864a 100644 --- a/lib/Cake/Console/Command/Task/ViewTask.php +++ b/lib/Cake/Console/Command/Task/ViewTask.php @@ -191,7 +191,8 @@ class ViewTask extends BakeTask { $model = $this->_modelName($table); $this->controllerName = $this->_controllerName($model); $this->controllerPath = Inflector::underscore($this->controllerName); - if (App::import('Model', $model)) { + App::uses($model, 'Model'); + if (class_exists($model)) { $vars = $this->__loadController(); if (!$actions) { $actions = $this->_methodsToBake(); @@ -272,17 +273,18 @@ class ViewTask extends BakeTask { $this->err(__('Controller not found')); } - $import = $this->controllerName; + $plugin = null; if ($this->plugin) { - $import = $this->plugin . '.' . $this->controllerName; + $plugin = $this->plugin . '.'; } - if (!App::import('Controller', $import)) { - $file = $this->controllerPath . '_controller.php'; + $controllerClassName = $this->controllerName . 'Controller'; + App::uses($controllerName, $plugin . 'Controller'); + if (!class_exists($controllerClassName)) { + $file = $controllerClassName . '.php'; $this->err(__("The file '%s' could not be found.\nIn order to bake a view, you'll need to first create the controller.", $file)); $this->_stop(); } - $controllerClassName = $this->controllerName . 'Controller'; $controllerObj = new $controllerClassName(); $controllerObj->plugin = $this->plugin; $controllerObj->constructClasses(); diff --git a/lib/Cake/Console/ConsoleErrorHandler.php b/lib/Cake/Console/ConsoleErrorHandler.php index 9eaebb2e5..dbd84aa99 100644 --- a/lib/Cake/Console/ConsoleErrorHandler.php +++ b/lib/Cake/Console/ConsoleErrorHandler.php @@ -19,6 +19,7 @@ */ App::uses('ErrorHandler', 'Error'); App::uses('ConsoleOutput', 'Console'); +App::uses('CakeLog', 'Log'); /** * Error Handler for Cake console. Does simple printing of the @@ -79,7 +80,6 @@ class ConsoleErrorHandler extends ErrorHandler { $stderr->write(__("%s Error: %s\n", $name, $message)); if (Configure::read('debug') == 0) { - App::import('Core', 'CakeLog'); CakeLog::write($log, $message); } } diff --git a/lib/Cake/Controller/Component/AclComponent.php b/lib/Cake/Controller/Component/AclComponent.php index 3a09c590b..7fc8a0a10 100644 --- a/lib/Cake/Controller/Component/AclComponent.php +++ b/lib/Cake/Controller/Component/AclComponent.php @@ -662,7 +662,7 @@ class IniAcl extends Object implements AclInterface { * @return array INI section structure */ public function readConfigFile($filename) { - App::import('Core', 'config/IniReader'); + App::uses('IniReader', 'Configure'); $iniFile = new IniReader(dirname($filename) . DS); return $iniFile->read(basename($filename)); } diff --git a/lib/Cake/Controller/Component/EmailComponent.php b/lib/Cake/Controller/Component/EmailComponent.php index 47ab6775b..9a3aa9f9b 100755 --- a/lib/Cake/Controller/Component/EmailComponent.php +++ b/lib/Cake/Controller/Component/EmailComponent.php @@ -433,9 +433,9 @@ class EmailComponent extends Component { $viewClass = $this->Controller->view; if ($viewClass != 'View') { - list($plugin, $viewClass) = pluginSplit($viewClass); + list($plugin, $viewClass) = pluginSplit($viewClass, true); $viewClass = $viewClass . 'View'; - App::import('View', $this->Controller->view); + App::uses($viewClass, $plugin . 'View'); } $View = new $viewClass($this->Controller, false); @@ -810,7 +810,7 @@ class EmailComponent extends Component { * @access private */ function _smtp() { - App::import('Core', 'CakeSocket'); + App::uses('CakeSocket', 'Network'); $defaults = array( 'host' => 'localhost', diff --git a/lib/Cake/Controller/Component/RequestHandlerComponent.php b/lib/Cake/Controller/Component/RequestHandlerComponent.php index 4928c945a..4f5cc3dfe 100644 --- a/lib/Cake/Controller/Component/RequestHandlerComponent.php +++ b/lib/Cake/Controller/Component/RequestHandlerComponent.php @@ -542,7 +542,8 @@ class RequestHandlerComponent extends Component { ); if (!$isAdded) { - if (App::import('Helper', $helper)) { + App::uses($helper . 'Helper', 'Helper'); + if (class_exists($helper . 'Helper')) { $controller->helpers[] = $helper; } } diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index c423a9227..68b255fc7 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -789,9 +789,9 @@ class Controller extends Object { $viewClass = $this->view; if ($this->view != 'View') { - list($plugin, $viewClass) = pluginSplit($viewClass); + list($plugin, $viewClass) = pluginSplit($viewClass, true); $viewClass = $viewClass . 'View'; - App::import('View', $this->view); + App::uses($viewClass, $plugin . 'View'); } $this->request->params['models'] = $this->modelNames; diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index f22d8925d..2e4383ac8 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -23,8 +23,8 @@ * ### Adding paths * * You can add paths to the search indexes App uses to find classes using `App::build()`. Adding - * additional controller paths for example would alter where CakePHP looks for controllers when you - * call App::import('Controller', 'Posts'); This allows you to split your application up across the filesystem. + * additional controller paths for example would alter where CakePHP looks for controllers. + * This allows you to split your application up across the filesystem. * * ### Inspecting loaded paths * @@ -261,7 +261,7 @@ class App { 'View' => array(VIEWS), 'View/Helper' => array(HELPERS), 'locales' => array(APP . 'locale' . DS), - 'shells' => array( + 'Console' => array( APP . 'console' . DS . 'shells' . DS, APP . 'vendors' . DS . 'shells' . DS, VENDORS . 'shells' . DS diff --git a/lib/Cake/Error/ErrorHandler.php b/lib/Cake/Error/ErrorHandler.php index 5124136c2..1af6cc156 100644 --- a/lib/Cake/Error/ErrorHandler.php +++ b/lib/Cake/Error/ErrorHandler.php @@ -113,7 +113,7 @@ class ErrorHandler { CakeLog::write(LOG_ERR, '[' . get_class($exception) . '] ' . $exception->getMessage()); } if ($config['renderer'] !== 'ExceptionRenderer') { - App::import('Lib', $config['renderer']); + App::uses($config['renderer'], 'Error'); } $error = new $config['renderer']($exception); $error->render(); diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index 1ea26c502..5b5289d29 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -20,6 +20,9 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +App::import('Sanitize', 'Utility'); + /** * Exception Renderer. * @@ -88,8 +91,6 @@ class ExceptionRenderer { * @param array $messages Error messages */ function __construct(Exception $exception) { - App::import('Core', 'Sanitize'); - $this->controller = $this->_getController($exception); if (method_exists($this->controller, 'apperror')) { diff --git a/lib/Cake/I18n/I18n.php b/lib/Cake/I18n/I18n.php index b85d9b75b..b899a7cab 100644 --- a/lib/Cake/I18n/I18n.php +++ b/lib/Cake/I18n/I18n.php @@ -101,7 +101,7 @@ class I18n { /** * Used by the translation functions in basics.php - * Can also be used like I18n::translate(); but only if the App::import('I18n'); has been used to load the class. + * Returns a translated string based on current language and translation files stored in locale folder * * @param string $singular String to translate * @param string $plural Plural string (if any) diff --git a/lib/Cake/I18n/Multibyte.php b/lib/Cake/I18n/Multibyte.php index 69c23188f..b1045e7b7 100644 --- a/lib/Cake/I18n/Multibyte.php +++ b/lib/Cake/I18n/Multibyte.php @@ -1078,7 +1078,7 @@ class Multibyte { return null; } if (!Configure::configured('_cake_core_')) { - App::import('Core', 'config/PhpReader'); + App::uses('PhpReader', 'Configure'); Configure::config('_cake_core_', new PhpReader(CAKE . 'config' . DS)); } Configure::load('unicode' . DS . 'casefolding' . DS . $range, '_cake_core_'); diff --git a/lib/Cake/Model/BehaviorCollection.php b/lib/Cake/Model/BehaviorCollection.php index 05fad7db9..064e9a37d 100644 --- a/lib/Cake/Model/BehaviorCollection.php +++ b/lib/Cake/Model/BehaviorCollection.php @@ -94,12 +94,7 @@ class BehaviorCollection extends ObjectCollection { list($plugin, $name) = pluginSplit($behavior); $class = $name . 'Behavior'; - if (!App::import('Behavior', $behavior)) { - throw new MissingBehaviorFileException(array( - 'file' => Inflector::underscore($behavior) . '.php', - 'class' => $class - )); - } + App::uses($class, 'Model/Behavior'); if (!class_exists($class)) { throw new MissingBehaviorClassException(array( 'file' => Inflector::underscore($behavior) . '.php', diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index 17bc19f84..df7601308 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -207,9 +207,8 @@ class CakeSchema extends Object { )); $db = ConnectionManager::getDataSource($connection); - App::import('Model', 'AppModel'); if (isset($this->plugin)) { - App::import('Model', Inflector::camelize($this->plugin) . 'AppModel'); + App::uses(Inflector::camelize($this->plugin) . 'AppModel', $this->plugin . '.Model'); } $tables = array(); @@ -234,7 +233,8 @@ class CakeSchema extends Object { if (isset($this->plugin)) { $importModel = $this->plugin . '.' . $model; } - if (!App::import('Model', $importModel)) { + App::uses($importModel, 'Model'); + if (!class_exists($importModel)) { continue; } $vars = get_class_vars($model); diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index a11f4fcd8..83c962a32 100755 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -17,7 +17,9 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + App::uses('String', 'Utility'); +App::uses('View', 'View'); /** * DboSource @@ -763,7 +765,6 @@ class DboSource extends DataSource { return; } if (PHP_SAPI != 'cli') { - App::import('Core', 'View'); $controller = null; $View = new View($controller, false); $View->set('logs', array($this->configKeyName => $log)); diff --git a/lib/Cake/Utility/Set.php b/lib/Cake/Utility/Set.php index ff2af8519..9fbdc8218 100644 --- a/lib/Cake/Utility/Set.php +++ b/lib/Cake/Utility/Set.php @@ -585,7 +585,7 @@ class Set { if (is_string($path) && strpos($path, '{') !== false) { $path = String::tokenize($path, '.', '{', '}'); - } else { + } elseif (is_string($path)) { $path = explode('.', $path); } $tmp = array(); diff --git a/lib/Cake/View/pages/home.ctp b/lib/Cake/View/pages/home.ctp index d861c5c12..9beb7b0d0 100644 --- a/lib/Cake/View/pages/home.ctp +++ b/lib/Cake/View/pages/home.ctp @@ -24,7 +24,7 @@ endif; 0): - Debugger::checkSecurityKeys(); + //Debugger::checkSecurityKeys(); endif; ?>

diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php index 287f0fc20..2d23d220d 100644 --- a/lib/Cake/basics.php +++ b/lib/Cake/basics.php @@ -670,9 +670,7 @@ if (!function_exists('sortByKey')) { * @param string $message Message to write to log */ function LogError($message) { - if (!class_exists('CakeLog')) { - App::import('Core', 'CakeLog'); - } + App::uses('CakeLog', 'Log'); $bad = array("\n", "\r", "\t"); $good = ' '; CakeLog::write('error', str_replace($bad, $good, $message)); diff --git a/lib/Cake/tests/cases/basics.test.php b/lib/Cake/tests/cases/basics.test.php index f6051717b..b3b028cd4 100644 --- a/lib/Cake/tests/cases/basics.test.php +++ b/lib/Cake/tests/cases/basics.test.php @@ -17,8 +17,9 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + require_once CAKE . 'basics.php'; -App::import('Core', 'Folder'); +App::uses('Folder', 'Utility'); /** * BasicsTest class diff --git a/lib/Cake/tests/cases/console/libs/task_collection.test.php b/lib/Cake/tests/cases/console/libs/task_collection.test.php index da7d6eaef..b918469e6 100644 --- a/lib/Cake/tests/cases/console/libs/task_collection.test.php +++ b/lib/Cake/tests/cases/console/libs/task_collection.test.php @@ -18,8 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'TaskCollection', false); -App::import('Shell', 'Shell', false); +App::uses('TaskCollection', 'Console'); +App::uses('Shell', 'Console'); class TaskCollectionTest extends CakeTestCase { /** diff --git a/lib/Cake/tests/cases/console/shells/acl.test.php b/lib/Cake/tests/cases/console/shells/acl.test.php index 0bb6489b1..7a0270084 100644 --- a/lib/Cake/tests/cases/console/shells/acl.test.php +++ b/lib/Cake/tests/cases/console/shells/acl.test.php @@ -17,10 +17,10 @@ * @since CakePHP v 1.2.0.7726 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', 'Acl'); -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('AclShell', 'Console/Command'); /** * AclShellTest class diff --git a/lib/Cake/tests/cases/console/shells/api.test.php b/lib/Cake/tests/cases/console/shells/api.test.php index 82f134552..4c76f4aa8 100644 --- a/lib/Cake/tests/cases/console/shells/api.test.php +++ b/lib/Cake/tests/cases/console/shells/api.test.php @@ -17,11 +17,10 @@ * @since CakePHP v 1.2.0.7726 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', 'Api'); - -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('ApiShell', 'Console/Command'); /** * ApiShellTest class diff --git a/lib/Cake/tests/cases/console/shells/bake.test.php b/lib/Cake/tests/cases/console/shells/bake.test.php index 6f68e8bb3..f627c069a 100644 --- a/lib/Cake/tests/cases/console/shells/bake.test.php +++ b/lib/Cake/tests/cases/console/shells/bake.test.php @@ -18,14 +18,14 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', 'Bake', false); -App::import('Shell', 'tasks/model', false); -App::import('Shell', 'tasks/controller', false); -App::import('Shell', 'tasks/db_config', false); -App::import('Core', 'Controller'); -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('BakeShell', 'Console/Command'); +App::uses('ModelTask', 'Console/Command/Task'); +App::uses('ControllerTask', 'Console/Command/Task'); +App::uses('DbConfigTask', 'Console/Command/Task'); +App::uses('Controller', 'Controller'); if (!class_exists('UsersController')) { class UsersController extends Controller { @@ -76,7 +76,7 @@ class BakeShellTest extends CakeTestCase { * @return void */ public function testAllWithModelName() { - App::import('Model', 'User'); + App::uses('User', 'Model'); $userExists = class_exists('User'); if ($this->skipIf($userExists, 'User class exists, cannot test `bake all [param]`. %s')) { return; diff --git a/lib/Cake/tests/cases/console/shells/command_list.test.php b/lib/Cake/tests/cases/console/shells/command_list.test.php index bdabc2230..48fecaaa8 100644 --- a/lib/Cake/tests/cases/console/shells/command_list.test.php +++ b/lib/Cake/tests/cases/console/shells/command_list.test.php @@ -17,7 +17,7 @@ * @since CakePHP v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'CommandList', false); +App::import('CommandListShell', 'Console/Command'); class TestStringOutput extends ConsoleOutput { diff --git a/lib/Cake/tests/cases/console/shells/schema.test.php b/lib/Cake/tests/cases/console/shells/schema.test.php index 6a7a619a1..d438335e2 100644 --- a/lib/Cake/tests/cases/console/shells/schema.test.php +++ b/lib/Cake/tests/cases/console/shells/schema.test.php @@ -17,13 +17,10 @@ * @since CakePHP v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', 'Schema', false); -App::import('Model', 'CakeSchema', false); - -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; - +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('CakeSchema', 'Model'); /** * Test for Schema database management diff --git a/lib/Cake/tests/cases/console/shells/shell.test.php b/lib/Cake/tests/cases/console/shells/shell.test.php index 91c623cda..fcd8d4dd6 100644 --- a/lib/Cake/tests/cases/console/shells/shell.test.php +++ b/lib/Cake/tests/cases/console/shells/shell.test.php @@ -19,10 +19,10 @@ * @since CakePHP v 1.2.0.7726 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Folder'); -App::import('Shell', 'Shell', false); -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('Folder', 'Utility'); /** * ShellTestShell class diff --git a/lib/Cake/tests/cases/console/shells/tasks/controller.test.php b/lib/Cake/tests/cases/console/shells/tasks/controller.test.php index f3601376e..ef2bd70e0 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/controller.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/controller.test.php @@ -17,33 +17,27 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'ClassRegistry'); -App::import('View', 'Helper', false); -App::import('Shell', 'Shell', false); -App::import('Shell', array( - 'tasks/project', - 'tasks/controller', - 'tasks/model', - 'tasks/template', - 'tasks/test' -)); -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('CakeSchema', 'Model'); +App::uses('ClassRegistry', 'Utility'); +App::uses('Helper', 'View/Helper'); +App::uses('ProjectTask', 'Console/Command/Task'); +App::uses('ControllerTask', 'Console/Command/Task'); +App::uses('ModelTask', 'Console/Command/Task'); +App::uses('TemplateTask', 'Console/Command/Task'); +App::uses('TestTask', 'Console/Command/Task'); +App::uses('Model', 'Model'); -$imported = App::import('Model', 'BakeArticle'); -$imported = $imported || App::import('Model', 'BakeComment'); -$imported = $imported || App::import('Model', 'BakeTag'); - -if (!$imported) { +if (class_exists('BakeArticle')) { define('ARTICLE_MODEL_CREATED', true); - App::import('Core', 'Model'); class BakeArticle extends Model { public $name = 'BakeArticle'; public $hasMany = array('BakeComment'); public $hasAndBelongsToMany = array('BakeTag'); } - } /** diff --git a/lib/Cake/tests/cases/console/shells/tasks/db_config.test.php b/lib/Cake/tests/cases/console/shells/tasks/db_config.test.php index aca87ac94..50aa43873 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/db_config.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/db_config.test.php @@ -17,11 +17,10 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', 'tasks/DbConfig'); - -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('DbConfigTask', 'Console/Command/Task'); class TEST_DATABASE_CONFIG { public $default = array( diff --git a/lib/Cake/tests/cases/console/shells/tasks/extract.test.php b/lib/Cake/tests/cases/console/shells/tasks/extract.test.php index 21993e0d4..6d634e5b4 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/extract.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/extract.test.php @@ -19,11 +19,11 @@ * @since CakePHP v 1.2.0.7726 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Folder'); -App::import('Shell', 'Shell', false); -App::import('Shell', 'tasks/Extract', false); -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('Folder', 'Utility'); +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('ExtractTask', 'Console/Command/Task'); /** * ExtractTaskTest class diff --git a/lib/Cake/tests/cases/console/shells/tasks/fixture.test.php b/lib/Cake/tests/cases/console/shells/tasks/fixture.test.php index 7121f7fd1..c00b4fb94 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/fixture.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/fixture.test.php @@ -17,14 +17,12 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', array( - 'tasks/fixture', - 'tasks/template', - 'tasks/db_config' -)); -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('FixtureTask', 'Console/Command/Task'); +App::uses('TemplateTask', 'Console/Command/Task'); +App::uses('DbConfigTask', 'Console/Command/Task'); /** * FixtureTaskTest class diff --git a/lib/Cake/tests/cases/console/shells/tasks/model.test.php b/lib/Cake/tests/cases/console/shells/tasks/model.test.php index ac2a2c7fc..fa48d5921 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/model.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/model.test.php @@ -19,14 +19,12 @@ * @since CakePHP v 1.2.6 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', array( - 'tasks/model', - 'tasks/fixture', - 'tasks/template' -)); -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('FixtureTask', 'Console/Command/Task'); +App::uses('TemplateTask', 'Console/Command/Task'); +App::uses('ModelTask', 'Console/Command/Task'); /** * ModelTaskTest class diff --git a/lib/Cake/tests/cases/console/shells/tasks/plugin.test.php b/lib/Cake/tests/cases/console/shells/tasks/plugin.test.php index 327b258c2..652159880 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/plugin.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/plugin.test.php @@ -19,15 +19,12 @@ * @since CakePHP v 1.3.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', array( - 'tasks/plugin', - 'tasks/model' -)); -App::import('Core', array('File')); - -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('PluginTask', 'Console/Command/Task'); +App::uses('ModelTask', 'Console/Command/Task'); +App::import('File', 'Utility'); /** * PluginTaskPlugin class diff --git a/lib/Cake/tests/cases/console/shells/tasks/project.test.php b/lib/Cake/tests/cases/console/shells/tasks/project.test.php index 8e92b7949..63870f4bd 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/project.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/project.test.php @@ -19,12 +19,11 @@ * @since CakePHP v 1.3.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', 'tasks/project'); -App::import('Core', 'File'); - -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('ProjecTask', 'Console/Command/Task'); +App::import('File', 'Utility'); /** * ProjectTask Test class diff --git a/lib/Cake/tests/cases/console/shells/tasks/template.test.php b/lib/Cake/tests/cases/console/shells/tasks/template.test.php index bbd81404d..c2b162dd8 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/template.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/template.test.php @@ -20,11 +20,10 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', 'tasks/template'); - -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('TemplateTask', 'Console/Command/Task'); /** * TemplateTaskTest class * diff --git a/lib/Cake/tests/cases/console/shells/tasks/test.test.php b/lib/Cake/tests/cases/console/shells/tasks/test.test.php index 14b603e54..4a77aaeab 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/test.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/test.test.php @@ -19,16 +19,13 @@ * @since CakePHP v 1.2.0.7726 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', array( - 'tasks/test', - 'tasks/template' -)); -App::import('Controller', 'Controller', false); -App::import('Model', 'Model', false); - -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('TestTask', 'Console/Command/Task'); +App::uses('TemplateTask', 'Console/Command/Task'); +App::uses('Controller', 'Controller'); +App::uses('Model', 'Model'); /** * Test Article model From f84351dd07f7658598ea90519de46d9f6e80bbdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Thu, 9 Dec 2010 00:43:11 -0430 Subject: [PATCH 058/214] More replacements of App::import to App::uses --- lib/Cake/Error/ExceptionRenderer.php | 2 +- .../cases/console/shells/command_list.test.php | 3 ++- .../cases/console/shells/tasks/plugin.test.php | 2 +- .../cases/console/shells/tasks/project.test.php | 2 +- .../cases/console/shells/tasks/view.test.php | 16 +++++++--------- .../cases/console/shells/testsuite.test.php | 7 ++----- lib/Cake/tests/cases/libs/cake_log.test.php | 5 +++-- lib/Cake/tests/cases/libs/cake_request.test.php | 7 +++---- lib/Cake/tests/cases/libs/cake_response.test.php | 2 +- lib/Cake/tests/cases/libs/cake_session.test.php | 5 ++--- lib/Cake/tests/cases/libs/cake_socket.test.php | 3 ++- .../tests/cases/libs/cake_test_case.test.php | 9 +++++---- .../tests/cases/libs/cake_test_fixture.test.php | 2 +- .../tests/cases/libs/class_registry.test.php | 2 +- .../tests/cases/libs/config/ini_reader.test.php | 2 +- .../tests/cases/libs/config/php_reader.test.php | 2 +- lib/Cake/tests/cases/libs/configure.test.php | 2 +- .../cases/libs/controller/component.test.php | 7 ++++--- .../controller/component_collection.test.php | 5 +++-- .../libs/controller/components/acl.test.php | 5 +++-- .../cases/libs/route/redirect_route.test.php | 8 +++++--- lib/Cake/tests/cases/libs/router.test.php | 5 +++-- 22 files changed, 53 insertions(+), 50 deletions(-) diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index 5b5289d29..c62e45d7d 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -21,7 +21,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Sanitize', 'Utility'); +App::uses('Sanitize', 'Utility'); /** * Exception Renderer. diff --git a/lib/Cake/tests/cases/console/shells/command_list.test.php b/lib/Cake/tests/cases/console/shells/command_list.test.php index 48fecaaa8..6f25ed68b 100644 --- a/lib/Cake/tests/cases/console/shells/command_list.test.php +++ b/lib/Cake/tests/cases/console/shells/command_list.test.php @@ -17,7 +17,8 @@ * @since CakePHP v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('CommandListShell', 'Console/Command'); + +App::uses('CommandListShell', 'Console/Command'); class TestStringOutput extends ConsoleOutput { diff --git a/lib/Cake/tests/cases/console/shells/tasks/plugin.test.php b/lib/Cake/tests/cases/console/shells/tasks/plugin.test.php index 652159880..ad86a6a50 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/plugin.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/plugin.test.php @@ -24,7 +24,7 @@ App::uses('ShellDispatcher', 'Console'); App::uses('Shell', 'Console'); App::uses('PluginTask', 'Console/Command/Task'); App::uses('ModelTask', 'Console/Command/Task'); -App::import('File', 'Utility'); +App::uses('File', 'Utility'); /** * PluginTaskPlugin class diff --git a/lib/Cake/tests/cases/console/shells/tasks/project.test.php b/lib/Cake/tests/cases/console/shells/tasks/project.test.php index 63870f4bd..cdd27e451 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/project.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/project.test.php @@ -23,7 +23,7 @@ App::uses('ShellDispatcher', 'Console'); App::uses('Shell', 'Console'); App::uses('ProjecTask', 'Console/Command/Task'); -App::import('File', 'Utility'); +App::uses('File', 'Utility'); /** * ProjectTask Test class diff --git a/lib/Cake/tests/cases/console/shells/tasks/view.test.php b/lib/Cake/tests/cases/console/shells/tasks/view.test.php index 5a2dfcce5..e742bff64 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/view.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/view.test.php @@ -19,16 +19,14 @@ * @since CakePHP v 1.2.0.7726 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', array( - 'tasks/view', - 'tasks/controller', - 'tasks/template', - 'tasks/project', - 'tasks/db_config' -)); -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; +App::uses('ShellDispatcher', 'Console'); +App::uses('Shell', 'Console'); +App::uses('ViewTask', 'Console/Command/Task'); +App::uses('ControllerTask', 'Console/Command/Task'); +App::uses('TemplateTask', 'Console/Command/Task'); +App::uses('ProjectTask', 'Console/Command/Task'); +App::uses('DbConfigTask', 'Console/Command/Task'); /** * Test View Task Comment Model diff --git a/lib/Cake/tests/cases/console/shells/testsuite.test.php b/lib/Cake/tests/cases/console/shells/testsuite.test.php index bfe463dbf..80bd9873a 100644 --- a/lib/Cake/tests/cases/console/shells/testsuite.test.php +++ b/lib/Cake/tests/cases/console/shells/testsuite.test.php @@ -18,11 +18,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Shell', 'Shell', false); -App::import('Shell', 'Testsuite'); - -require_once CAKE . 'console' . DS . 'shell_dispatcher.php'; - +App::uses('ShellDispatcher', 'Console'); +App::uses('TestSuiteShell', 'Console/Command'); class TestSuiteShellTest extends CakeTestCase { diff --git a/lib/Cake/tests/cases/libs/cake_log.test.php b/lib/Cake/tests/cases/libs/cake_log.test.php index 52c5c5abc..2569eae58 100644 --- a/lib/Cake/tests/cases/libs/cake_log.test.php +++ b/lib/Cake/tests/cases/libs/cake_log.test.php @@ -17,8 +17,9 @@ * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Log'); -App::import('Core', 'log/FileLog'); + +App::uses('CakeLog', 'Log'); +App::uses('FileLog', 'Log/Engine'); /** * CakeLogTest class diff --git a/lib/Cake/tests/cases/libs/cake_request.test.php b/lib/Cake/tests/cases/libs/cake_request.test.php index af4ad93cb..28036de43 100644 --- a/lib/Cake/tests/cases/libs/cake_request.test.php +++ b/lib/Cake/tests/cases/libs/cake_request.test.php @@ -17,10 +17,9 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('dispatcher')) { - require CAKE . 'dispatcher.php'; -} -App::import('Core', 'CakeRequest'); + +App::uses('Dispatcher', 'Routing') +App::uses('CakeRequest', 'Network'); class CakeRequestTestCase extends CakeTestCase { /** diff --git a/lib/Cake/tests/cases/libs/cake_response.test.php b/lib/Cake/tests/cases/libs/cake_response.test.php index eee0cfc69..bf43304c8 100644 --- a/lib/Cake/tests/cases/libs/cake_response.test.php +++ b/lib/Cake/tests/cases/libs/cake_response.test.php @@ -1,6 +1,6 @@ Date: Thu, 9 Dec 2010 01:25:24 -0430 Subject: [PATCH 059/214] More App::imports converted --- .../tests/cases/libs/cake_test_fixture.test.php | 2 +- .../cases/libs/controller/components/auth.test.php | 11 ++++++----- .../libs/controller/components/cookie.test.php | 7 +++++-- .../cases/libs/controller/components/email.test.php | 6 +++--- .../controller/components/request_handler.test.php | 7 ++++--- .../libs/controller/components/security.test.php | 4 ++-- .../libs/controller/components/session.test.php | 4 ++-- .../tests/cases/libs/controller/controller.test.php | 13 +++++++------ .../libs/controller/controller_merge_vars.test.php | 2 +- .../cases/libs/controller/pages_controller.test.php | 6 +++--- .../tests/cases/libs/controller/scaffold.test.php | 4 ++-- lib/Cake/tests/cases/libs/debugger.test.php | 4 ++-- lib/Cake/tests/cases/libs/dispatcher.test.php | 8 ++++---- .../tests/cases/libs/error/error_handler.test.php | 4 +++- .../cases/libs/error/exception_renderer.test.php | 4 +++- lib/Cake/tests/cases/libs/file.test.php | 2 +- lib/Cake/tests/cases/libs/http_socket.test.php | 3 ++- lib/Cake/tests/cases/libs/i18n.test.php | 2 +- lib/Cake/tests/cases/libs/inflector.test.php | 2 +- lib/Cake/tests/cases/libs/l10n.test.php | 2 +- lib/Cake/tests/cases/libs/log/file_log.test.php | 2 +- .../cases/libs/model/behavior_collection.test.php | 3 ++- .../tests/cases/libs/model/behaviors/acl.test.php | 4 ++-- .../cases/libs/model/behaviors/containable.test.php | 4 +++- .../cases/libs/model/behaviors/translate.test.php | 3 ++- .../tests/cases/libs/model/behaviors/tree.test.php | 4 +++- .../tests/cases/libs/model/cake_schema.test.php | 3 ++- .../cases/libs/model/connection_manager.test.php | 2 +- .../libs/model/datasources/dbo/dbo_mysql.test.php | 9 +++++---- .../model/datasources/dbo/dbo_postgres.test.php | 7 +++++-- .../libs/model/datasources/dbo/dbo_sqlite.test.php | 4 +++- .../libs/model/datasources/dbo_source.test.php | 4 +++- lib/Cake/tests/cases/libs/model/db_acl.test.php | 5 +++-- lib/Cake/tests/cases/libs/model/model.test.php | 4 +++- .../cases/libs/model/model_integration.test.php | 3 ++- .../tests/cases/libs/model/model_write.test.php | 2 +- lib/Cake/tests/cases/libs/multibyte.test.php | 2 +- lib/Cake/tests/cases/libs/set.test.php | 2 +- lib/Cake/tests/cases/libs/view/theme.test.php | 2 +- 39 files changed, 98 insertions(+), 68 deletions(-) diff --git a/lib/Cake/tests/cases/libs/cake_test_fixture.test.php b/lib/Cake/tests/cases/libs/cake_test_fixture.test.php index e82420834..4541b2526 100644 --- a/lib/Cake/tests/cases/libs/cake_test_fixture.test.php +++ b/lib/Cake/tests/cases/libs/cake_test_fixture.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('DboSource', 'Model/Datasource'); +App::uses('DboSource', 'Model/Datasource'); /** * CakeTestFixtureTestFixture class diff --git a/lib/Cake/tests/cases/libs/controller/components/auth.test.php b/lib/Cake/tests/cases/libs/controller/components/auth.test.php index 98f389efd..bc7e01ab4 100644 --- a/lib/Cake/tests/cases/libs/controller/components/auth.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/auth.test.php @@ -17,10 +17,11 @@ * @since CakePHP(tm) v 1.2.0.5347 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Controller'); -App::import('Component', array('Auth', 'Acl')); -App::import('Model', 'DbAcl'); -App::import('Core', 'Xml'); +App::uses('Controller', 'Controller'); +App::uses('AuthComponent', 'Controller/Component'); +App::uses('AclComponent', 'Controller/Component'); +App::uses('DbAcl', 'Model'); +App::uses('Xml', 'Utility'); /** * TestAuthComponent class @@ -1456,7 +1457,7 @@ class AuthTest extends CakeTestCase { )); $_SERVER['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest"; - App::import('Core', 'Dispatcher'); + App::uses('Dispatcher', 'Routing'); ob_start(); $Dispatcher = new Dispatcher(); diff --git a/lib/Cake/tests/cases/libs/controller/components/cookie.test.php b/lib/Cake/tests/cases/libs/controller/components/cookie.test.php index cd16ca19e..41d962c08 100644 --- a/lib/Cake/tests/cases/libs/controller/components/cookie.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/cookie.test.php @@ -17,8 +17,11 @@ * @since CakePHP(tm) v 1.2.0.5435 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Controller', array('Component', 'Controller'), false); -App::import('Component', 'Cookie'); + +App::uses('Component', 'Controller'); +App::uses('Controller', 'Controller'); +App::uses('CookieComponent', 'Controller/Component'); + /** * CookieComponentTestController class diff --git a/lib/Cake/tests/cases/libs/controller/components/email.test.php b/lib/Cake/tests/cases/libs/controller/components/email.test.php index f8fd2e4a5..65bfc3ce5 100755 --- a/lib/Cake/tests/cases/libs/controller/components/email.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/email.test.php @@ -19,9 +19,9 @@ * @since CakePHP(tm) v 1.2.0.5347 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Controller'); -App::import('Component', 'Email'); -App::import('Core', 'CakeSocket'); +App::uses('Controller', 'Controller'); +App::uses('EmailComponent', 'Controller/Component'); +App::uses('CakeSocket', 'Network'); /** * EmailTestComponent class diff --git a/lib/Cake/tests/cases/libs/controller/components/request_handler.test.php b/lib/Cake/tests/cases/libs/controller/components/request_handler.test.php index a9fe81d81..ddafab1f6 100644 --- a/lib/Cake/tests/cases/libs/controller/components/request_handler.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/request_handler.test.php @@ -17,9 +17,10 @@ * @since CakePHP(tm) v 1.2.0.5435 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Controller', 'Controller', false); -App::import('Component', array('RequestHandler')); -App::import('Core', array('CakeRequest', 'CakeResponse')); +App::uses('Controller', 'Controller'); +App::uses('RequestHandlerComponent', 'Controller/Component'); +App::uses('CakeRequest', 'Network'); +App::uses('CakeResponse', 'Network'); /** * RequestHandlerTestController class diff --git a/lib/Cake/tests/cases/libs/controller/components/security.test.php b/lib/Cake/tests/cases/libs/controller/components/security.test.php index 22274277a..599fe27b6 100644 --- a/lib/Cake/tests/cases/libs/controller/components/security.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/security.test.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 1.2.0.5435 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Controller', 'Controller', false); -App::import('Component', 'Security'); +App::uses('Controller', 'Controller'); +App::uses('SecurityComponent', 'Component'); /** * TestSecurityComponent diff --git a/lib/Cake/tests/cases/libs/controller/components/session.test.php b/lib/Cake/tests/cases/libs/controller/components/session.test.php index bf605f1df..30c1a1ec2 100644 --- a/lib/Cake/tests/cases/libs/controller/components/session.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/session.test.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 1.2.0.5436 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Controller', 'Controller', false); -App::import('Component', 'Session'); +App::uses('Controller', 'Controller'); +App::uses('SessionComponent', 'Controller/Component'); /** * SessionTestController class diff --git a/lib/Cake/tests/cases/libs/controller/controller.test.php b/lib/Cake/tests/cases/libs/controller/controller.test.php index e55ed54b6..411df3309 100644 --- a/lib/Cake/tests/cases/libs/controller/controller.test.php +++ b/lib/Cake/tests/cases/libs/controller/controller.test.php @@ -17,10 +17,11 @@ * @since CakePHP(tm) v 1.2.0.5436 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Controller', 'Controller', false); -App::import('Core', array('CakeRequest', 'CakeResponse')); -App::import('Component', 'Security'); -App::import('Component', 'Cookie'); +App::uses('Controller', 'Controller'); +App::uses('CakeRequest', 'Network'); +App::uses('CakeResponse', 'Network'); +App::uses('SecurityComponent', 'Controller/Component'); +App::uses('CookieComponent', 'Controller/Component'); /** * AppController class @@ -28,7 +29,7 @@ App::import('Component', 'Cookie'); * @package cake * @subpackage cake.tests.cases.libs.controller */ -if (!class_exists('AppController')) { +if (!class_exists('AppController', false)) { /** * AppController class * @@ -498,7 +499,7 @@ class ControllerTest extends CakeTestCase { 'controllers' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'controllers' . DS), 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS) )); - App::import('Controller', 'TestPlugin.TestPlugin'); + App::uses('TestPluginController', 'TestPlugin.Controller'); $Controller = new TestPluginController(); $Controller->plugin = 'TestPlugin'; diff --git a/lib/Cake/tests/cases/libs/controller/controller_merge_vars.test.php b/lib/Cake/tests/cases/libs/controller/controller_merge_vars.test.php index a3199b3a2..eb3301a4f 100644 --- a/lib/Cake/tests/cases/libs/controller/controller_merge_vars.test.php +++ b/lib/Cake/tests/cases/libs/controller/controller_merge_vars.test.php @@ -19,7 +19,7 @@ * @since CakePHP(tm) v 1.2.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Controller'); +App::uses('Controller', 'Controller'); if (!class_exists('AppController')) { diff --git a/lib/Cake/tests/cases/libs/controller/pages_controller.test.php b/lib/Cake/tests/cases/libs/controller/pages_controller.test.php index 8188d3976..0c0f8813b 100644 --- a/lib/Cake/tests/cases/libs/controller/pages_controller.test.php +++ b/lib/Cake/tests/cases/libs/controller/pages_controller.test.php @@ -17,12 +17,12 @@ * @since CakePHP(tm) v 1.2.0.5436 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('AppController')) { - require_once LIBS . 'controller' . DS . 'app_controller.php'; +if (!class_exists('AppController', false)) { + require_once LIBS . 'Controller' . DS . 'AppController.php'; } elseif (!defined('APP_CONTROLLER_EXISTS')) { define('APP_CONTROLLER_EXISTS', true); } -App::import('Controller', 'Pages'); +App::uses('PagesController', 'Controller'); /** * PagesControllerTest class diff --git a/lib/Cake/tests/cases/libs/controller/scaffold.test.php b/lib/Cake/tests/cases/libs/controller/scaffold.test.php index 2ebd3f5e3..7f90f4be1 100644 --- a/lib/Cake/tests/cases/libs/controller/scaffold.test.php +++ b/lib/Cake/tests/cases/libs/controller/scaffold.test.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 1.2.0.5436 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Scaffold', false); -App::import('Core', 'Controller', false); +App::uses('Scaffold', 'Controller'); +App::uses('Controller', 'Controller'); /** * ScaffoldMockController class diff --git a/lib/Cake/tests/cases/libs/debugger.test.php b/lib/Cake/tests/cases/libs/debugger.test.php index d6ea5ac8e..c6638abb7 100644 --- a/lib/Cake/tests/cases/libs/debugger.test.php +++ b/lib/Cake/tests/cases/libs/debugger.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Debugger'); +App::uses('Debugger', 'Utility'); /** * DebugggerTestCaseDebuggger class @@ -217,7 +217,7 @@ class DebuggerTest extends CakeTestCase { * @return void */ function testExportVar() { - App::import('Controller'); + App::uses('Controller', 'Controller'); $Controller = new Controller(); $Controller->helpers = array('Html', 'Form'); $View = new View($Controller); diff --git a/lib/Cake/tests/cases/libs/dispatcher.test.php b/lib/Cake/tests/cases/libs/dispatcher.test.php index 35f161e7a..a92f72fb9 100644 --- a/lib/Cake/tests/cases/libs/dispatcher.test.php +++ b/lib/Cake/tests/cases/libs/dispatcher.test.php @@ -17,11 +17,11 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Dispatcher', false); -App::import('Core', 'CakeResponse', false); +App::uses('Dispatcher', 'Routing'); +App::uses('CakeResponse', 'Network'); -if (!class_exists('AppController')) { - require_once LIBS . 'controller' . DS . 'app_controller.php'; +if (!class_exists('AppController', false)) { + require_once LIBS . 'Controller' . DS . 'AppController.php'; } elseif (!defined('APP_CONTROLLER_EXISTS')){ define('APP_CONTROLLER_EXISTS', true); } diff --git a/lib/Cake/tests/cases/libs/error/error_handler.test.php b/lib/Cake/tests/cases/libs/error/error_handler.test.php index 736524251..21d7eadd4 100644 --- a/lib/Cake/tests/cases/libs/error/error_handler.test.php +++ b/lib/Cake/tests/cases/libs/error/error_handler.test.php @@ -18,7 +18,9 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('ErrorHandler', 'Controller', 'Router')); +App::uses('ErrorHandler', 'Error'); +App::uses('Controller', 'Controller'); +App::uses('Router', 'Routing'); /** * ErrorHandlerTest class diff --git a/lib/Cake/tests/cases/libs/error/exception_renderer.test.php b/lib/Cake/tests/cases/libs/error/exception_renderer.test.php index c99c6b118..f7293db84 100644 --- a/lib/Cake/tests/cases/libs/error/exception_renderer.test.php +++ b/lib/Cake/tests/cases/libs/error/exception_renderer.test.php @@ -18,7 +18,9 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('ExceptionRenderer', 'Controller', 'Component')); +App::uses('ExceptionRenderer', 'Error'); +App::uses('Controller', 'Controller'); +App::uses('Component', 'Controller'); /** * Short description for class. diff --git a/lib/Cake/tests/cases/libs/file.test.php b/lib/Cake/tests/cases/libs/file.test.php index 2895deb88..ebaa2062b 100644 --- a/lib/Cake/tests/cases/libs/file.test.php +++ b/lib/Cake/tests/cases/libs/file.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); +App::uses('File', 'Utility'); /** * FileTest class diff --git a/lib/Cake/tests/cases/libs/http_socket.test.php b/lib/Cake/tests/cases/libs/http_socket.test.php index 5b3f79e0c..51e9e45bd 100644 --- a/lib/Cake/tests/cases/libs/http_socket.test.php +++ b/lib/Cake/tests/cases/libs/http_socket.test.php @@ -17,7 +17,8 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'HttpSocket'); + +App::uses('HttpSocket', 'Network'); class TestHttpSocket extends HttpSocket { diff --git a/lib/Cake/tests/cases/libs/i18n.test.php b/lib/Cake/tests/cases/libs/i18n.test.php index 1ca37bcb1..a446df605 100644 --- a/lib/Cake/tests/cases/libs/i18n.test.php +++ b/lib/Cake/tests/cases/libs/i18n.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'i18n'); +App::uses('I18n', 'I18n'); /** * I18nTest class diff --git a/lib/Cake/tests/cases/libs/inflector.test.php b/lib/Cake/tests/cases/libs/inflector.test.php index 4d383c887..1535f82fa 100644 --- a/lib/Cake/tests/cases/libs/inflector.test.php +++ b/lib/Cake/tests/cases/libs/inflector.test.php @@ -24,7 +24,7 @@ * Included libraries. * */ -App::import('Core', 'Inflector'); +App::uses('Inflector', 'Utility'); /** * Short description for class. diff --git a/lib/Cake/tests/cases/libs/l10n.test.php b/lib/Cake/tests/cases/libs/l10n.test.php index a1b35aee1..d685f3ed1 100644 --- a/lib/Cake/tests/cases/libs/l10n.test.php +++ b/lib/Cake/tests/cases/libs/l10n.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'l10n'); +App::uses('L10n', 'I18n'); /** * L10nTest class diff --git a/lib/Cake/tests/cases/libs/log/file_log.test.php b/lib/Cake/tests/cases/libs/log/file_log.test.php index f07ab9771..623b66d88 100644 --- a/lib/Cake/tests/cases/libs/log/file_log.test.php +++ b/lib/Cake/tests/cases/libs/log/file_log.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'log/FileLog'); +App::uses('FileLog', 'Log/Engine'); /** * CakeLogTest class diff --git a/lib/Cake/tests/cases/libs/model/behavior_collection.test.php b/lib/Cake/tests/cases/libs/model/behavior_collection.test.php index 12ce1dd4f..de10eeaa1 100644 --- a/lib/Cake/tests/cases/libs/model/behavior_collection.test.php +++ b/lib/Cake/tests/cases/libs/model/behavior_collection.test.php @@ -19,7 +19,8 @@ * @since 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Model', 'AppModel'); + +App::uses('AppModel', 'Model'); require_once dirname(__FILE__) . DS . 'models.php'; /** diff --git a/lib/Cake/tests/cases/libs/model/behaviors/acl.test.php b/lib/Cake/tests/cases/libs/model/behaviors/acl.test.php index a7705dcd9..d644b8381 100644 --- a/lib/Cake/tests/cases/libs/model/behaviors/acl.test.php +++ b/lib/Cake/tests/cases/libs/model/behaviors/acl.test.php @@ -19,8 +19,8 @@ * @since CakePHP v 1.2.0.4487 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Behavior', 'Acl'); -App::import('Core', 'db_acl'); +App::uses('AclBehavior', 'Model/Behavior'); +App::uses('DbAcl', 'Model'); /** * Test Person class - self joined model diff --git a/lib/Cake/tests/cases/libs/model/behaviors/containable.test.php b/lib/Cake/tests/cases/libs/model/behaviors/containable.test.php index 10ea65fb5..4b1050395 100644 --- a/lib/Cake/tests/cases/libs/model/behaviors/containable.test.php +++ b/lib/Cake/tests/cases/libs/model/behaviors/containable.test.php @@ -17,7 +17,9 @@ * @since CakePHP(tm) v 1.2.0.5669 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('AppModel', 'Model')); + +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); require_once(dirname(dirname(__FILE__)) . DS . 'models.php'); /** diff --git a/lib/Cake/tests/cases/libs/model/behaviors/translate.test.php b/lib/Cake/tests/cases/libs/model/behaviors/translate.test.php index ee13fe3bb..50f2ff3ab 100644 --- a/lib/Cake/tests/cases/libs/model/behaviors/translate.test.php +++ b/lib/Cake/tests/cases/libs/model/behaviors/translate.test.php @@ -21,7 +21,8 @@ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { define('CAKEPHP_UNIT_TEST_EXECUTION', 1); } -App::import('Core', array('AppModel', 'Model')); +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); require_once(dirname(dirname(__FILE__)) . DS . 'models.php'); /** diff --git a/lib/Cake/tests/cases/libs/model/behaviors/tree.test.php b/lib/Cake/tests/cases/libs/model/behaviors/tree.test.php index 75375459f..fd56daa12 100644 --- a/lib/Cake/tests/cases/libs/model/behaviors/tree.test.php +++ b/lib/Cake/tests/cases/libs/model/behaviors/tree.test.php @@ -19,7 +19,9 @@ * @since CakePHP(tm) v 1.2.0.5330 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('AppModel', 'Model')); + +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); require_once(dirname(dirname(__FILE__)) . DS . 'models.php'); /** diff --git a/lib/Cake/tests/cases/libs/model/cake_schema.test.php b/lib/Cake/tests/cases/libs/model/cake_schema.test.php index ff5c8ffdd..5132fb557 100644 --- a/lib/Cake/tests/cases/libs/model/cake_schema.test.php +++ b/lib/Cake/tests/cases/libs/model/cake_schema.test.php @@ -18,7 +18,8 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Model', 'CakeSchema', false); + +App::uses('CakeSchema', 'Model'); /** * Test for Schema database management diff --git a/lib/Cake/tests/cases/libs/model/connection_manager.test.php b/lib/Cake/tests/cases/libs/model/connection_manager.test.php index 04212fa4a..1798fb6b9 100644 --- a/lib/Cake/tests/cases/libs/model/connection_manager.test.php +++ b/lib/Cake/tests/cases/libs/model/connection_manager.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'ConnectionManager'); +App::uses('ConnectionManager', 'Model'); /** * ConnectionManagerTest diff --git a/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php index bd29b5d39..30cecc0a3 100644 --- a/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php +++ b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php @@ -17,8 +17,11 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('Model', 'DataSource', 'DboSource', 'DboMysql')); -App::import('Model', 'App'); +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); +App::uses('Mysql', 'Model/Datasource/Database'); +App::uses('CakeSchema', 'Model'); + require_once dirname(dirname(dirname(__FILE__))) . DS . 'models.php'; /** @@ -457,7 +460,6 @@ class DboMysqlTest extends CakeTestCase { * @return void */ function testAlterSchemaIndexes() { - App::import('Model', 'CakeSchema'); $this->Dbo->cacheSources = $this->Dbo->testing = false; $schema1 = new CakeSchema(array( @@ -577,7 +579,6 @@ class DboMysqlTest extends CakeTestCase { * @return void */ function testAlteringTableParameters() { - App::import('Model', 'CakeSchema'); $this->Dbo->cacheSources = $this->Dbo->testing = false; $schema1 = new CakeSchema(array( diff --git a/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php index c71836f5d..ebb803c92 100644 --- a/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php +++ b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php @@ -17,8 +17,11 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('Model', 'DataSource', 'DboSource', 'DboPostgres')); -App::import('Model', 'App'); + +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); +App::uses('Postgres', 'Model/Datasource/Database'); + require_once dirname(dirname(dirname(__FILE__))) . DS . 'models.php'; /** diff --git a/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php index b42b6209a..a71fc7075 100644 --- a/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php +++ b/lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php @@ -17,7 +17,9 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('Model', 'DataSource', 'DboSource', 'DboSqlite')); +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); +App::uses('Sqlite', 'Model/Datasource/Database'); /** * DboSqliteTestDb class diff --git a/lib/Cake/tests/cases/libs/model/datasources/dbo_source.test.php b/lib/Cake/tests/cases/libs/model/datasources/dbo_source.test.php index 9ac868c3b..ab95b50cc 100644 --- a/lib/Cake/tests/cases/libs/model/datasources/dbo_source.test.php +++ b/lib/Cake/tests/cases/libs/model/datasources/dbo_source.test.php @@ -18,7 +18,9 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Model', array('Model', 'DataSource', 'DboSource', 'DboMysql', 'App')); +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); +App::uses('DboSource', 'Model/Datasource'); require_once dirname(dirname(__FILE__)) . DS . 'models.php'; /** diff --git a/lib/Cake/tests/cases/libs/model/db_acl.test.php b/lib/Cake/tests/cases/libs/model/db_acl.test.php index fb0a9f3f3..694fdaffe 100644 --- a/lib/Cake/tests/cases/libs/model/db_acl.test.php +++ b/lib/Cake/tests/cases/libs/model/db_acl.test.php @@ -17,8 +17,9 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Component', 'Acl'); -App::import('Core', 'db_acl'); + +App::uses('AclComponent', 'Controller/Component'); +App::uses('DbAcl', 'Model'); /** * DB ACL wrapper test class diff --git a/lib/Cake/tests/cases/libs/model/model.test.php b/lib/Cake/tests/cases/libs/model/model.test.php index 9809b3a0d..4e1411ea2 100644 --- a/lib/Cake/tests/cases/libs/model/model.test.php +++ b/lib/Cake/tests/cases/libs/model/model.test.php @@ -17,7 +17,9 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('AppModel', 'Model')); + +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); require_once dirname(__FILE__) . DS . 'models.php'; PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); diff --git a/lib/Cake/tests/cases/libs/model/model_integration.test.php b/lib/Cake/tests/cases/libs/model/model_integration.test.php index a8b5a6796..cd6063df3 100644 --- a/lib/Cake/tests/cases/libs/model/model_integration.test.php +++ b/lib/Cake/tests/cases/libs/model/model_integration.test.php @@ -19,8 +19,9 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + require_once dirname(__FILE__) . DS . 'model.test.php'; -App::import('Core', 'DboSource'); +App::uses('DboSource', 'Model/Datasource/Database'); /** * DboMock class diff --git a/lib/Cake/tests/cases/libs/model/model_write.test.php b/lib/Cake/tests/cases/libs/model/model_write.test.php index 4cac5959e..f80fc0263 100644 --- a/lib/Cake/tests/cases/libs/model/model_write.test.php +++ b/lib/Cake/tests/cases/libs/model/model_write.test.php @@ -1016,7 +1016,7 @@ class ModelWriteTest extends BaseModelTest { function testSaveFromXml() { $this->markTestSkipped('This feature needs to be fixed or dropped'); $this->loadFixtures('Article'); - App::import('Core', 'Xml'); + App::uses('Xml', 'Utility'); $Article = new Article(); $result = $Article->save(Xml::build('

')); diff --git a/lib/Cake/tests/cases/libs/multibyte.test.php b/lib/Cake/tests/cases/libs/multibyte.test.php index 9ec3538ea..7da643c34 100644 --- a/lib/Cake/tests/cases/libs/multibyte.test.php +++ b/lib/Cake/tests/cases/libs/multibyte.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.6833 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Multibyte'); +App::import('Multibyte', 'I18n'); /** * MultibyteTest class diff --git a/lib/Cake/tests/cases/libs/set.test.php b/lib/Cake/tests/cases/libs/set.test.php index 9fbc4086b..ebabe84a5 100644 --- a/lib/Cake/tests/cases/libs/set.test.php +++ b/lib/Cake/tests/cases/libs/set.test.php @@ -2708,7 +2708,7 @@ class SetTest extends CakeTestCase { * @return void */ function testXmlSetReverse() { - App::import('Core', 'Xml'); + App::uses('Xml', 'Utility'); $string = ' diff --git a/lib/Cake/tests/cases/libs/view/theme.test.php b/lib/Cake/tests/cases/libs/view/theme.test.php index 314d38ba7..ffc8ee045 100644 --- a/lib/Cake/tests/cases/libs/view/theme.test.php +++ b/lib/Cake/tests/cases/libs/view/theme.test.php @@ -19,7 +19,7 @@ */ App::import('View', 'View'); App::import('View', 'Theme'); -App::import('Core', 'Controller'); +App::uses('Controller', 'Controller'); /** From 29077654040ae4074558725a50342a9f85f18632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Fri, 10 Dec 2010 01:53:27 -0430 Subject: [PATCH 060/214] Replacing almost all remaining uses of App::import --- lib/Cake/TestSuite/Fixture/CakeTestFixture.php | 12 ++++++++---- lib/Cake/TestSuite/templates/footer.php | 2 +- lib/Cake/tests/cases/libs/folder.test.php | 2 +- lib/Cake/tests/cases/libs/multibyte.test.php | 2 +- lib/Cake/tests/cases/libs/object.test.php | 5 ++++- lib/Cake/tests/cases/libs/object_collection.test.php | 2 +- lib/Cake/tests/cases/libs/route/cake_route.test.php | 4 ++-- .../cases/libs/route/plugin_short_route.test.php | 4 ++-- lib/Cake/tests/cases/libs/sanitize.test.php | 2 +- lib/Cake/tests/cases/libs/security.test.php | 2 +- .../tests/cases/libs/session/cache_session.test.php | 4 ++-- .../cases/libs/session/database_session.test.php | 6 +++--- lib/Cake/tests/cases/libs/set.test.php | 2 +- lib/Cake/tests/cases/libs/string.test.php | 2 +- lib/Cake/tests/cases/libs/validation.test.php | 2 +- lib/Cake/tests/cases/libs/view/helper.test.php | 5 ++++- .../tests/cases/libs/view/helper_collection.test.php | 4 ++-- .../tests/cases/libs/view/helpers/cache.test.php | 7 +++++-- lib/Cake/tests/cases/libs/view/helpers/form.test.php | 11 ++++++++--- lib/Cake/tests/cases/libs/view/helpers/html.test.php | 12 +++++++++--- .../cases/libs/view/helpers/jquery_engine.test.php | 7 +++++-- lib/Cake/tests/cases/libs/view/helpers/js.test.php | 7 +++++-- .../cases/libs/view/helpers/mootools_engine.test.php | 5 ++++- .../tests/cases/libs/view/helpers/number.test.php | 2 +- .../tests/cases/libs/view/helpers/paginator.test.php | 7 +++++-- .../libs/view/helpers/prototype_engine.test.php | 5 ++++- lib/Cake/tests/cases/libs/view/helpers/rss.test.php | 5 +++-- .../tests/cases/libs/view/helpers/session.test.php | 6 ++++-- lib/Cake/tests/cases/libs/view/helpers/text.test.php | 4 ++-- lib/Cake/tests/cases/libs/view/helpers/time.test.php | 4 ++-- lib/Cake/tests/cases/libs/view/media.test.php | 5 ++++- lib/Cake/tests/cases/libs/view/theme.test.php | 4 ++-- lib/Cake/tests/cases/libs/view/view.test.php | 8 +++++--- 33 files changed, 104 insertions(+), 57 deletions(-) diff --git a/lib/Cake/TestSuite/Fixture/CakeTestFixture.php b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php index b7676cf5c..db66430c9 100644 --- a/lib/Cake/TestSuite/Fixture/CakeTestFixture.php +++ b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php @@ -20,6 +20,8 @@ PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); +App::uses('CakeSchema', 'Model'); + /** * Short description for class. * @@ -52,7 +54,6 @@ class CakeTestFixture { * */ public function __construct() { - App::import('Model', 'CakeSchema'); $this->Schema = new CakeSchema(array('name' => 'TestSuite', 'connection' => 'test')); $this->init(); } @@ -68,9 +69,12 @@ class CakeTestFixture { is_array($this->import) ? $this->import : array('model' => $this->import) ); - if (isset($import['model']) && App::import('Model', $import['model'])) { - App::import('Model', $import['model']); - list(, $modelClass) = pluginSplit($import['model']); + if (isset($import['model'])) { + list($plugin, $modelClass) = pluginSplit($import['model'], true); + App::uses($modelClass, $plugin . 'Model'); + if (!class_exists($modelClass)) { + throw new MissingModelException(array('class' => $modelClass)); + } $model = new $modelClass(null, null, $import['connection']); $db = $model->getDataSource(); if (empty($model->tablePrefix)) { diff --git a/lib/Cake/TestSuite/templates/footer.php b/lib/Cake/TestSuite/templates/footer.php index e9b6c6746..172195f02 100644 --- a/lib/Cake/TestSuite/templates/footer.php +++ b/lib/Cake/TestSuite/templates/footer.php @@ -27,7 +27,7 @@

element('sql_dump'); diff --git a/lib/Cake/tests/cases/libs/folder.test.php b/lib/Cake/tests/cases/libs/folder.test.php index 428520610..739047e57 100644 --- a/lib/Cake/tests/cases/libs/folder.test.php +++ b/lib/Cake/tests/cases/libs/folder.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); +App::uses('File', 'Utility'); /** * FolderTest class diff --git a/lib/Cake/tests/cases/libs/multibyte.test.php b/lib/Cake/tests/cases/libs/multibyte.test.php index 7da643c34..6eb0068b5 100644 --- a/lib/Cake/tests/cases/libs/multibyte.test.php +++ b/lib/Cake/tests/cases/libs/multibyte.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.6833 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Multibyte', 'I18n'); +App::uses('Multibyte', 'I18n'); /** * MultibyteTest class diff --git a/lib/Cake/tests/cases/libs/object.test.php b/lib/Cake/tests/cases/libs/object.test.php index a371cf9f2..f5ad44cad 100644 --- a/lib/Cake/tests/cases/libs/object.test.php +++ b/lib/Cake/tests/cases/libs/object.test.php @@ -17,7 +17,10 @@ * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('Object', 'Controller', 'Model')); + +App::uses('Object', 'Core'); +App::uses('Controller', 'Controller'); +App::uses('Model', 'Model'); /** * RequestActionPost class diff --git a/lib/Cake/tests/cases/libs/object_collection.test.php b/lib/Cake/tests/cases/libs/object_collection.test.php index 9d0861861..ffc061cd2 100644 --- a/lib/Cake/tests/cases/libs/object_collection.test.php +++ b/lib/Cake/tests/cases/libs/object_collection.test.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'ObjectCollection'); +App::uses('ObjectCollection', 'Utility'); /** * A generic object class diff --git a/lib/Cake/tests/cases/libs/route/cake_route.test.php b/lib/Cake/tests/cases/libs/route/cake_route.test.php index dae305b23..76f76f336 100644 --- a/lib/Cake/tests/cases/libs/route/cake_route.test.php +++ b/lib/Cake/tests/cases/libs/route/cake_route.test.php @@ -1,7 +1,7 @@ skipIf(!is_writable(WWW_ROOT . 'theme'), 'Cannot write to webroot/theme')) { return; } - App::import('Core', 'File'); + App::uses('File', 'Utility'); $testfile = WWW_ROOT . 'theme' . DS . 'test_theme' . DS . 'img' . DS . '__cake_test_image.gif'; $file = new File($testfile, true); @@ -596,7 +602,7 @@ class HtmlHelperTest extends CakeTestCase { if ($this->skipIf(!is_writable(WWW_ROOT . 'theme'), 'Cannot write to webroot/theme')) { return; } - App::import('Core', 'File'); + App::uses('File', 'Utility'); $testfile = WWW_ROOT . 'theme' . DS . 'test_theme' . DS . 'js' . DS . '__test_js.js'; $file = new File($testfile, true); diff --git a/lib/Cake/tests/cases/libs/view/helpers/jquery_engine.test.php b/lib/Cake/tests/cases/libs/view/helpers/jquery_engine.test.php index 87c2b8b2b..ecbff4bb8 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/jquery_engine.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/jquery_engine.test.php @@ -18,8 +18,11 @@ * @subpackage cake.tests.cases.views.helpers * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', array('Html', 'Js', 'JqueryEngine')); -App::import('Core', 'View'); + +App::uses('HtmlHelper', 'View/Helper'); +App::uses('JsHelper', 'View/Helper'); +App::uses('JqueryEngineHelper', 'View/Helper'); +App::uses('View', 'View'); class JqueryEngineHelperTest extends CakeTestCase { /** diff --git a/lib/Cake/tests/cases/libs/view/helpers/js.test.php b/lib/Cake/tests/cases/libs/view/helpers/js.test.php index 1fd1602a7..1b03d5648 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/js.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/js.test.php @@ -19,8 +19,11 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', array('Js', 'Html', 'Form')); -App::import('Core', array('View', 'ClassRegistry')); +App::uses('HtmlHelper', 'View/Helper'); +App::uses('JsHelper', 'View/Helper'); +App::uses('FormHelper', 'View/Helper'); +App::uses('View', 'View'); +App::uses('ClassRegistry', 'Utility'); class OptionEngineHelper extends JsBaseEngineHelper { protected $_optionMap = array( diff --git a/lib/Cake/tests/cases/libs/view/helpers/mootools_engine.test.php b/lib/Cake/tests/cases/libs/view/helpers/mootools_engine.test.php index 53af75a80..fa4253842 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/mootools_engine.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/mootools_engine.test.php @@ -20,7 +20,10 @@ * @subpackage cake.tests.cases.views.helpers * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', array('Html', 'Js', 'MootoolsEngine')); + +App::uses('HtmlHelper', 'View/Helper'); +App::uses('JsHelper', 'View/Helper'); +App::uses('MooToolsEngineHelper', 'View/Helper'); class MooEngineHelperTest extends CakeTestCase { /** diff --git a/lib/Cake/tests/cases/libs/view/helpers/number.test.php b/lib/Cake/tests/cases/libs/view/helpers/number.test.php index 1d1d04c4c..9919416fb 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/number.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/number.test.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Number'); +App::uses('NumberHelper', 'View/Helper'); /** * NumberHelperTest class diff --git a/lib/Cake/tests/cases/libs/view/helpers/paginator.test.php b/lib/Cake/tests/cases/libs/view/helpers/paginator.test.php index 2d0bda4a9..ef720ccc8 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/paginator.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/paginator.test.php @@ -17,8 +17,11 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'View'); -App::import('Helper', array('Html', 'Paginator', 'Form', 'Js')); +App::uses('View', 'View'); +App::uses('HtmlHelper', 'View/Helper'); +App::uses('JsHelper', 'View/Helper'); +App::uses('PaginatorHelper', 'View/Helper'); +App::uses('FormHelper', 'View/Helper'); if (!defined('FULL_BASE_URL')) { define('FULL_BASE_URL', 'http://cakephp.org'); diff --git a/lib/Cake/tests/cases/libs/view/helpers/prototype_engine.test.php b/lib/Cake/tests/cases/libs/view/helpers/prototype_engine.test.php index 395b25cd7..77c2b1b87 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/prototype_engine.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/prototype_engine.test.php @@ -18,7 +18,10 @@ * @subpackage cake.tests.cases.views.helpers * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', array('Html', 'Js', 'PrototypeEngine')); + +App::uses('HtmlHelper', 'View/Helper'); +App::uses('JsHelper', 'View/Helper'); +App::uses('PrototypeEngineHelper', 'View/Helper'); class PrototypeEngineHelperTest extends CakeTestCase { /** diff --git a/lib/Cake/tests/cases/libs/view/helpers/rss.test.php b/lib/Cake/tests/cases/libs/view/helpers/rss.test.php index afc3e54e9..0e6e18474 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/rss.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/rss.test.php @@ -17,8 +17,9 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'View'); -App::import('Helper', array('Rss', 'Time')); +App::uses('View', 'View'); +App::uses('RssHelper', 'View/Helper'); +App::uses('TimeHelper', 'View/Helper'); /** * RssHelperTest class diff --git a/lib/Cake/tests/cases/libs/view/helpers/session.test.php b/lib/Cake/tests/cases/libs/view/helpers/session.test.php index c61421bd1..2fa1dad0a 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/session.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/session.test.php @@ -17,8 +17,10 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('Controller', 'View')); -App::import('Helper', array('Session')); + +App::uses('Controller', 'Controller'); +App::uses('View', 'View'); +App::uses('SessionHelper', 'View/Helper'); /** * SessionHelperTest class diff --git a/lib/Cake/tests/cases/libs/view/helpers/text.test.php b/lib/Cake/tests/cases/libs/view/helpers/text.test.php index cdb5dcecb..2ac412374 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/text.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/text.test.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'View'); -App::import('Helper', 'Text'); +App::uses('View', 'View'); +App::uses('TextHelper', 'Helper'); /** * TextHelperTest class diff --git a/lib/Cake/tests/cases/libs/view/helpers/time.test.php b/lib/Cake/tests/cases/libs/view/helpers/time.test.php index 668467296..d5ba62b61 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/time.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/time.test.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Time'); -App::import('Core', 'View'); +App::uses('TimeHelper', 'View/Helper'); +App::uses('View', 'View'); /** * TimeHelperTest class diff --git a/lib/Cake/tests/cases/libs/view/media.test.php b/lib/Cake/tests/cases/libs/view/media.test.php index 39b9d190d..a9352f5d9 100644 --- a/lib/Cake/tests/cases/libs/view/media.test.php +++ b/lib/Cake/tests/cases/libs/view/media.test.php @@ -17,7 +17,10 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('Media', 'Controller', 'CakeResponse')); + +App::uses('Controller', 'Controller'); +App::uses('MediaView', 'View'); +App::uses('CakeResponse', 'Network'); /** * MediaViewTest class diff --git a/lib/Cake/tests/cases/libs/view/theme.test.php b/lib/Cake/tests/cases/libs/view/theme.test.php index ffc8ee045..69a986ad7 100644 --- a/lib/Cake/tests/cases/libs/view/theme.test.php +++ b/lib/Cake/tests/cases/libs/view/theme.test.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'View'); -App::import('View', 'Theme'); +App::uses('View', 'View'); +App::uses('ThemeView', 'View'); App::uses('Controller', 'Controller'); diff --git a/lib/Cake/tests/cases/libs/view/view.test.php b/lib/Cake/tests/cases/libs/view/view.test.php index 8038ff010..9824b125a 100644 --- a/lib/Cake/tests/cases/libs/view/view.test.php +++ b/lib/Cake/tests/cases/libs/view/view.test.php @@ -17,9 +17,11 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', array('View', 'Controller')); -App::import('Helper', 'Cache'); -App::import('Core', array('ErrorHandler')); + +App::uses('View', 'View'); +App::uses('Controller', 'Controller'); +App::uses('CacheHelper', 'View/Helper'); +App::uses('ErrorHandler', 'Error'); /** From 4e722ddb74dae3ee0ba6638a1b5ec4e51bb9ac06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 11 Dec 2010 01:13:01 -0430 Subject: [PATCH 061/214] Fixing some constants to load the web testsuite --- app/webroot/index.php | 2 +- app/webroot/test.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/webroot/index.php b/app/webroot/index.php index 70991f787..d011f3939 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -68,7 +68,7 @@ define('APP_PATH', ROOT . DS . APP_DIR . DS); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } - if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { + if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { diff --git a/app/webroot/test.php b/app/webroot/test.php index 7a27e8e29..2f6a55e7a 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -50,7 +50,7 @@ ini_set('display_errors', 1); * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT); + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS .'lib'); } /** @@ -68,7 +68,7 @@ if (!defined('CORE_PATH')) { define('APP_PATH', ROOT . DS . APP_DIR . DS); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } -if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { +if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } @@ -83,6 +83,6 @@ if (Configure::read('debug') < 1) { die(__('Debug setting does not allow access to this url.', true)); } -require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php'; +require_once CAKE_TESTS_LIB . 'CakeTestSuiteDispatcher.php'; CakeTestSuiteDispatcher::run(); From 4389764050cb3aa2762f2f518a5903a0952c3670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 11 Dec 2010 01:13:42 -0430 Subject: [PATCH 062/214] Fixing core path --- lib/Cake/Core/App.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 2e4383ac8..cf751135c 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -339,8 +339,7 @@ class App { static $paths = false; if (!$paths) { $paths = array(); - $libs = LIBS; - $cake = dirname($libs) . DS; + $cake = $libs = LIBS; $path = dirname($cake) . DS; $paths['cake'][] = $cake; From 8e5bd76752a52873a913c5d985c73b07625b9e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 11 Dec 2010 01:17:55 -0430 Subject: [PATCH 063/214] Fixing several errors when running the testsuite --- lib/Cake/Core/App.php | 3 +-- lib/Cake/Model/BehaviorCollection.php | 2 +- lib/Cake/Model/Datasource/DboSource.php | 1 + lib/Cake/Network/HttpSocket.php | 2 +- lib/Cake/Routing/Router.php | 2 +- lib/Cake/TestSuite/CakeTestCase.php | 3 +-- lib/Cake/TestSuite/CakeTestSuiteDispatcher.php | 12 ++++++------ lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php | 3 ++- lib/Cake/TestSuite/Fixture/CakeFixtureManager.php | 4 ++++ lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php | 2 +- lib/Cake/TestSuite/TestManager.php | 2 ++ lib/Cake/View/Helper.php | 2 +- lib/Cake/View/Helper/JqueryEngineHelper.php | 3 ++- lib/Cake/View/HelperCollection.php | 2 +- lib/Cake/View/View.php | 1 + lib/Cake/bootstrap.php | 2 +- lib/Cake/tests/cases/libs/cake_test_case.test.php | 6 +++--- lib/Cake/tests/cases/libs/cake_test_fixture.test.php | 1 + .../tests/cases/libs/html_coverage_report.test.php | 2 +- lib/Cake/tests/cases/libs/set.test.php | 1 + lib/Cake/tests/cases/libs/view/helper.test.php | 1 + lib/Cake/tests/cases/libs/view/helpers/text.test.php | 3 ++- lib/Cake/tests/cases/libs/view/view.test.php | 1 + 23 files changed, 37 insertions(+), 24 deletions(-) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index cf751135c..a5f7019a0 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -285,8 +285,7 @@ class App { if (!empty($paths[$type])) { $path = array_flip(array_flip(array_merge( - (array)$paths[$type], self::$__packages[$type], $merge - ))); + (array)$paths[$type], self::$__packages[$type]))); self::$__packages[$type] = array_values($path); } else { $path = array_flip(array_flip(self::$__packages[$type])); diff --git a/lib/Cake/Model/BehaviorCollection.php b/lib/Cake/Model/BehaviorCollection.php index 064e9a37d..4cd769509 100644 --- a/lib/Cake/Model/BehaviorCollection.php +++ b/lib/Cake/Model/BehaviorCollection.php @@ -19,7 +19,7 @@ * @since CakePHP(tm) v 1.2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('ObjectCollection', 'Core'); +App::uses('ObjectCollection', 'Utility'); /** * Model behavior collection class. diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 83c962a32..c756d6aaa 100755 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -18,6 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('DataSource', 'Model/Datasource'); App::uses('String', 'Utility'); App::uses('View', 'View'); diff --git a/lib/Cake/Network/HttpSocket.php b/lib/Cake/Network/HttpSocket.php index 307448cf2..b80bebc12 100644 --- a/lib/Cake/Network/HttpSocket.php +++ b/lib/Cake/Network/HttpSocket.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('CakeSocket', 'Core'); -App::uses('Router', 'Core'); +App::uses('Router', 'Routing'); /** * Cake network socket connection class. diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 3824fdd0c..9f4d298c8 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -286,7 +286,7 @@ class Router { * @return array Array of routes */ public static function redirect($route, $url, $options) { - App::uses('RedirectRoute', 'Core'); + App::uses('RedirectRoute', 'Routing/Route'); $options['routeClass'] = 'RedirectRoute'; return self::connect($route, $url, $options); } diff --git a/lib/Cake/TestSuite/CakeTestCase.php b/lib/Cake/TestSuite/CakeTestCase.php index 95819c5e1..d8fd93038 100644 --- a/lib/Cake/TestSuite/CakeTestCase.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -21,7 +21,6 @@ PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); App::uses('CakeFixtureManager', 'TestSuite/Fixture'); -App::uses('CakeTestModel', 'TestSuite/Fixture'); App::uses('CakeTestFixture', 'TestSuite/Fixture'); /** @@ -30,7 +29,7 @@ App::uses('CakeTestFixture', 'TestSuite/Fixture'); * @package cake * @subpackage cake.cake.tests.lib */ -class CakeTestCase extends PHPUnit_Framework_TestCase { +abstract class CakeTestCase extends PHPUnit_Framework_TestCase { /** * The class responsible for managinf the creation, loading and removing of fixtures diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index 4642dc2b4..d67be7f1a 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -18,6 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('TestManager', 'TestSuite'); /** * CakeTestSuiteDispatcher handles web requests to the test suite and runs the correct action. * @@ -201,7 +202,6 @@ class CakeTestSuiteDispatcher { */ function &getManager() { if (empty($this->Manager)) { - require_once CAKE_TESTS_LIB . 'test_manager.php'; $this->Manager = new $this->_managerClass($this->params); } return $this->Manager; @@ -217,13 +217,13 @@ class CakeTestSuiteDispatcher { if (!self::$_Reporter) { $type = strtolower($this->params['output']); $coreClass = 'Cake' . ucwords($this->params['output']) . 'Reporter'; - $coreFile = CAKE_TESTS_LIB . 'reporter/cake_' . $type . '_reporter.php'; - $appClass = $this->params['output'] . 'Reporter'; - $appFile = APPLIBS . 'test_suite/reporter/' . $type . '_reporter.php'; - if (include_once $coreFile) { + App::uses($coreClass, 'TestSuite/Reporter'); + App::uses($appClass, 'TestSuite/Reporter'); + + if (class_exists($coreClass)) { self::$_Reporter = new $coreClass(null, $this->params); - } elseif (include_once $appFile) { + } elseif (class_exists($appClass)) { self::$_Reporter = new $appClass(null, $this->params); } } diff --git a/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php b/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php index ae4fa081c..802f462ca 100644 --- a/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php +++ b/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php @@ -17,10 +17,11 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once dirname(__FILE__) . '/base_coverage_report.php'; PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); +App::uses('BaseCoverageReport', 'TestSuite/Coverage'); + class HtmlCoverageReport extends BaseCoverageReport { /** diff --git a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php index ea09473e7..66bf11352 100644 --- a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php +++ b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php @@ -19,6 +19,9 @@ */ PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); +App::uses('ConnectionManager', 'Model'); +App::uses('ClassRegistry', 'Utility'); + class CakeFixtureManager { /** @@ -100,6 +103,7 @@ class CakeFixtureManager { if (isset($this->_loaded[$fixture])) { continue; } + if (strpos($fixture, 'core.') === 0) { $fixture = substr($fixture, strlen('core.')); foreach (App::core('cake') as $key => $path) { diff --git a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php index 186c3fe73..1f4d6331c 100755 --- a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'cake_base_reporter.php'; +App::uses('CakeBaseReporter', 'TestSuite/Reporter'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); diff --git a/lib/Cake/TestSuite/TestManager.php b/lib/Cake/TestSuite/TestManager.php index cf56a20b7..2498f106d 100644 --- a/lib/Cake/TestSuite/TestManager.php +++ b/lib/Cake/TestSuite/TestManager.php @@ -23,9 +23,11 @@ define('APP_TEST_CASES', TESTS . 'cases'); define('APP_TEST_GROUPS', TESTS . 'groups'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); + App::uses('CakeTestSuite', 'TestSuite'); App::uses('CakeTestCase', 'TestSuite'); App::uses('CakeFixtureManager', 'TestSuite/Fixture'); +App::uses('CakeTestModel', 'TestSuite/Fixture'); /** * TestManager is the base class that handles loading and initiating the running diff --git a/lib/Cake/View/Helper.php b/lib/Cake/View/Helper.php index f9d26e447..f0a43a33c 100644 --- a/lib/Cake/View/Helper.php +++ b/lib/Cake/View/Helper.php @@ -20,7 +20,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Router', 'Core'); +App::uses('Router', 'Routing'); /** * Abstract base class for all other Helpers in CakePHP. diff --git a/lib/Cake/View/Helper/JqueryEngineHelper.php b/lib/Cake/View/Helper/JqueryEngineHelper.php index ce9c017db..bc3d90423 100644 --- a/lib/Cake/View/Helper/JqueryEngineHelper.php +++ b/lib/Cake/View/Helper/JqueryEngineHelper.php @@ -23,7 +23,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('JsHelper', 'Helper'); +App::uses('JsHelper', 'View/Helper'); +App::uses('JsBaseEngineHelper', 'View/Helper'); class JqueryEngineHelper extends JsBaseEngineHelper { /** diff --git a/lib/Cake/View/HelperCollection.php b/lib/Cake/View/HelperCollection.php index 99e709c03..fe5f74ad5 100644 --- a/lib/Cake/View/HelperCollection.php +++ b/lib/Cake/View/HelperCollection.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('ObjectCollection', 'Core'); +App::uses('ObjectCollection', 'Utility'); class HelperCollection extends ObjectCollection { diff --git a/lib/Cake/View/View.php b/lib/Cake/View/View.php index ef241d334..f25469f07 100644 --- a/lib/Cake/View/View.php +++ b/lib/Cake/View/View.php @@ -22,6 +22,7 @@ * Included libraries. */ App::uses('HelperCollection', 'View'); +App::uses('Router', 'Routing'); /** * View, the V in the MVC triad. diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php index a6b0099f6..97f38c04a 100644 --- a/lib/Cake/bootstrap.php +++ b/lib/Cake/bootstrap.php @@ -145,7 +145,7 @@ if (!defined('CAKE_TESTS')) { /** * Path to the test suite. */ - define('CAKE_TESTS_LIB', CAKE_TESTS.'lib'.DS); + define('CAKE_TESTS_LIB', LIBS . 'TestSuite' . DS); /** * Path to the controller test directory. diff --git a/lib/Cake/tests/cases/libs/cake_test_case.test.php b/lib/Cake/tests/cases/libs/cake_test_case.test.php index c0623529d..34d8a4a9b 100644 --- a/lib/Cake/tests/cases/libs/cake_test_case.test.php +++ b/lib/Cake/tests/cases/libs/cake_test_case.test.php @@ -24,7 +24,7 @@ App::uses('Controller', 'Controller'); App::uses('CakeHtmlReporter', 'TestSuite/Reporter'); if (!class_exists('AppController', false)) { - require_once LIBS . 'Controller' . DS . 'app_controller.php'; + require_once LIBS . 'Controller' . DS . 'AppController.php'; } elseif (!defined('APP_CONTROLLER_EXISTS')) { define('APP_CONTROLLER_EXISTS', true); } @@ -38,8 +38,8 @@ if (!class_exists('AppController', false)) { class CakeTestCaseTest extends CakeTestCase { public static function setUpBeforeClass() { - require_once TEST_CAKE_CORE_INCLUDE_PATH . DS . 'tests' . DS . 'fixtures' . DS . 'assert_tags_test_case.php'; - require_once TEST_CAKE_CORE_INCLUDE_PATH . DS . 'tests' . DS . 'fixtures' . DS . 'fixturized_test_case.php'; + require_once LIBS . 'tests' . DS . 'fixtures' . DS . 'assert_tags_test_case.php'; + require_once LIBS . 'tests' . DS . 'fixtures' . DS . 'fixturized_test_case.php'; } /** diff --git a/lib/Cake/tests/cases/libs/cake_test_fixture.test.php b/lib/Cake/tests/cases/libs/cake_test_fixture.test.php index 4541b2526..fa851e52e 100644 --- a/lib/Cake/tests/cases/libs/cake_test_fixture.test.php +++ b/lib/Cake/tests/cases/libs/cake_test_fixture.test.php @@ -18,6 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('DboSource', 'Model/Datasource'); +App::uses('Model', 'Model'); /** * CakeTestFixtureTestFixture class diff --git a/lib/Cake/tests/cases/libs/html_coverage_report.test.php b/lib/Cake/tests/cases/libs/html_coverage_report.test.php index 39f41fb60..325271131 100644 --- a/lib/Cake/tests/cases/libs/html_coverage_report.test.php +++ b/lib/Cake/tests/cases/libs/html_coverage_report.test.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once CAKE . 'tests' . DS . 'lib' . DS . 'coverage' . DS . 'html_coverage_report.php'; +App::uses('HtmlCoverageReport', 'TestSuite/Coverage'); class HtmlCoverageReportTest extends CakeTestCase { /** diff --git a/lib/Cake/tests/cases/libs/set.test.php b/lib/Cake/tests/cases/libs/set.test.php index e17a6af06..e0c5c3348 100644 --- a/lib/Cake/tests/cases/libs/set.test.php +++ b/lib/Cake/tests/cases/libs/set.test.php @@ -18,6 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('Set', 'Utility'); +App::uses('Model', 'Model'); /** * SetTest class diff --git a/lib/Cake/tests/cases/libs/view/helper.test.php b/lib/Cake/tests/cases/libs/view/helper.test.php index f14704e1c..c00ee271c 100644 --- a/lib/Cake/tests/cases/libs/view/helper.test.php +++ b/lib/Cake/tests/cases/libs/view/helper.test.php @@ -20,6 +20,7 @@ App::uses('View', 'View'); App::uses('Helper', 'View'); +App::uses('Model', 'Model'); App::uses('Router', 'Routing'); /** diff --git a/lib/Cake/tests/cases/libs/view/helpers/text.test.php b/lib/Cake/tests/cases/libs/view/helpers/text.test.php index 2ac412374..b867c988a 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/text.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/text.test.php @@ -17,8 +17,9 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + App::uses('View', 'View'); -App::uses('TextHelper', 'Helper'); +App::uses('TextHelper', 'View/Helper'); /** * TextHelperTest class diff --git a/lib/Cake/tests/cases/libs/view/view.test.php b/lib/Cake/tests/cases/libs/view/view.test.php index 9824b125a..34ca6ae0f 100644 --- a/lib/Cake/tests/cases/libs/view/view.test.php +++ b/lib/Cake/tests/cases/libs/view/view.test.php @@ -19,6 +19,7 @@ */ App::uses('View', 'View'); +App::uses('Helper', 'View'); App::uses('Controller', 'Controller'); App::uses('CacheHelper', 'View/Helper'); App::uses('ErrorHandler', 'Error'); From 8436fd53d0adc9cbcd96e3d6f09550ca3c03295a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Wed, 15 Dec 2010 01:20:02 -0430 Subject: [PATCH 064/214] Changing initial uses of App::uses() to the new packages system --- lib/Cake/Controller/Component/AuthComponent.php | 2 +- lib/Cake/Controller/Component/CookieComponent.php | 2 +- lib/Cake/Controller/Component/RequestHandlerComponent.php | 2 +- lib/Cake/Controller/Component/SecurityComponent.php | 4 ++-- lib/Cake/Network/CakeSocket.php | 2 +- lib/Cake/Network/HttpSocket.php | 2 +- lib/Cake/Routing/Route/PluginShortRoute.php | 2 +- lib/Cake/Routing/Route/RedirectRoute.php | 4 ++-- lib/Cake/Routing/Router.php | 2 +- lib/Cake/Utility/Security.php | 2 +- lib/Cake/View/MediaView.php | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 7122804af..f96e6dbe9 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -21,7 +21,7 @@ */ App::uses('Router', 'Routing'); -App::uses('Security', 'Core'); +App::uses('Security', 'Utility'); App::uses('Debugger', 'Utility'); /** diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index 781d5012c..df0be063d 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -21,7 +21,7 @@ /** * Load Security class */ -App::uses('Security', 'Core'); +App::uses('Security', 'Utility'); /** * Cookie Component. diff --git a/lib/Cake/Controller/Component/RequestHandlerComponent.php b/lib/Cake/Controller/Component/RequestHandlerComponent.php index 4f5cc3dfe..06f4db96b 100644 --- a/lib/Cake/Controller/Component/RequestHandlerComponent.php +++ b/lib/Cake/Controller/Component/RequestHandlerComponent.php @@ -20,7 +20,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Xml', 'Core'); +App::uses('Xml', 'Utility'); /** * Request object for handling HTTP requests diff --git a/lib/Cake/Controller/Component/SecurityComponent.php b/lib/Cake/Controller/Component/SecurityComponent.php index 96d275792..e9d0de4a5 100644 --- a/lib/Cake/Controller/Component/SecurityComponent.php +++ b/lib/Cake/Controller/Component/SecurityComponent.php @@ -17,8 +17,8 @@ * @since CakePHP(tm) v 0.10.8.2156 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('String', 'Core'); -App::uses('Security', 'Core'); +App::uses('String', 'Utility'); +App::uses('Security', 'Utility'); /** * SecurityComponent diff --git a/lib/Cake/Network/CakeSocket.php b/lib/Cake/Network/CakeSocket.php index d6dd6f8be..8c0a031e1 100644 --- a/lib/Cake/Network/CakeSocket.php +++ b/lib/Cake/Network/CakeSocket.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('Validation', 'Core'); +App::uses('Validation', 'Utility'); /** * Cake network socket connection class. diff --git a/lib/Cake/Network/HttpSocket.php b/lib/Cake/Network/HttpSocket.php index e2dec93c4..c636cfd63 100644 --- a/lib/Cake/Network/HttpSocket.php +++ b/lib/Cake/Network/HttpSocket.php @@ -17,7 +17,7 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('CakeSocket', 'Core'); +App::uses('CakeSocket', 'Network'); App::uses('Router', 'Routing'); /** diff --git a/lib/Cake/Routing/Route/PluginShortRoute.php b/lib/Cake/Routing/Route/PluginShortRoute.php index 062cfcbfb..3077226b4 100644 --- a/lib/Cake/Routing/Route/PluginShortRoute.php +++ b/lib/Cake/Routing/Route/PluginShortRoute.php @@ -1,5 +1,5 @@ $value) { $plugins[$key] = Inflector::underscore($value); } diff --git a/lib/Cake/Utility/Security.php b/lib/Cake/Utility/Security.php index 2cbe838b0..ecc59d310 100644 --- a/lib/Cake/Utility/Security.php +++ b/lib/Cake/Utility/Security.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('String', 'Core'); +App::uses('String', 'Utility'); /** * Security Library contains utility methods related to security diff --git a/lib/Cake/View/MediaView.php b/lib/Cake/View/MediaView.php index 856e8d920..f6cacd078 100644 --- a/lib/Cake/View/MediaView.php +++ b/lib/Cake/View/MediaView.php @@ -18,7 +18,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('View', 'View'); -App::uses('CakeRequest', 'Core'); +App::uses('CakeRequest', 'Network'); class MediaView extends View { /** From 387281e506501f5747d8df0ccd169a017b4b8ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Wed, 15 Dec 2010 01:32:37 -0430 Subject: [PATCH 065/214] Moving newly created classes to the new folders --- .../Cake/Controller/Component/PaginatorComponent.php | 0 .../Cake/Network/Http/BasicAuthentication.php | 0 .../Cake/Network/Http/DigestAuthentication.php | 0 .../http_response.php => lib/Cake/Network/Http/HttpResponse.php | 0 lib/Cake/Network/{ => Http}/HttpSocket.php | 0 {cake/libs/view => lib/Cake/View}/scaffolds/form.ctp | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename cake/libs/controller/components/paginator.php => lib/Cake/Controller/Component/PaginatorComponent.php (100%) rename cake/libs/http/basic_authentication.php => lib/Cake/Network/Http/BasicAuthentication.php (100%) rename cake/libs/http/digest_authentication.php => lib/Cake/Network/Http/DigestAuthentication.php (100%) rename cake/libs/http_response.php => lib/Cake/Network/Http/HttpResponse.php (100%) rename lib/Cake/Network/{ => Http}/HttpSocket.php (100%) rename {cake/libs/view => lib/Cake/View}/scaffolds/form.ctp (100%) diff --git a/cake/libs/controller/components/paginator.php b/lib/Cake/Controller/Component/PaginatorComponent.php similarity index 100% rename from cake/libs/controller/components/paginator.php rename to lib/Cake/Controller/Component/PaginatorComponent.php diff --git a/cake/libs/http/basic_authentication.php b/lib/Cake/Network/Http/BasicAuthentication.php similarity index 100% rename from cake/libs/http/basic_authentication.php rename to lib/Cake/Network/Http/BasicAuthentication.php diff --git a/cake/libs/http/digest_authentication.php b/lib/Cake/Network/Http/DigestAuthentication.php similarity index 100% rename from cake/libs/http/digest_authentication.php rename to lib/Cake/Network/Http/DigestAuthentication.php diff --git a/cake/libs/http_response.php b/lib/Cake/Network/Http/HttpResponse.php similarity index 100% rename from cake/libs/http_response.php rename to lib/Cake/Network/Http/HttpResponse.php diff --git a/lib/Cake/Network/HttpSocket.php b/lib/Cake/Network/Http/HttpSocket.php similarity index 100% rename from lib/Cake/Network/HttpSocket.php rename to lib/Cake/Network/Http/HttpSocket.php diff --git a/cake/libs/view/scaffolds/form.ctp b/lib/Cake/View/scaffolds/form.ctp similarity index 100% rename from cake/libs/view/scaffolds/form.ctp rename to lib/Cake/View/scaffolds/form.ctp From 5efa201b9bddb2563e09521f18facd0e1ee7de6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 18 Dec 2010 21:52:03 -0430 Subject: [PATCH 066/214] Moving recently created files into the new folders --- {cake => lib/Cake}/tests/test_app/config/routes.php | 0 .../test_app/plugins/test_plugin/views/tests/scaffold.form.ctp | 0 .../tests/test_app/views/elements/email/html/nested_element.ctp | 0 {cake => lib/Cake}/tests/test_app/views/elements/html_call.ctp | 0 {cake => lib/Cake}/tests/test_app/views/elements/type_check.ctp | 0 {cake => lib/Cake}/tests/test_app/views/layouts/json/default.ctp | 0 {cake => lib/Cake}/tests/test_app/views/posts/scaffold.form.ctp | 0 {cake => lib/Cake}/tests/test_app/views/tests_apps/json/index.ctp | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename {cake => lib/Cake}/tests/test_app/config/routes.php (100%) rename {cake => lib/Cake}/tests/test_app/plugins/test_plugin/views/tests/scaffold.form.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/email/html/nested_element.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/html_call.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/elements/type_check.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/layouts/json/default.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/posts/scaffold.form.ctp (100%) rename {cake => lib/Cake}/tests/test_app/views/tests_apps/json/index.ctp (100%) diff --git a/cake/tests/test_app/config/routes.php b/lib/Cake/tests/test_app/config/routes.php similarity index 100% rename from cake/tests/test_app/config/routes.php rename to lib/Cake/tests/test_app/config/routes.php diff --git a/cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.form.ctp b/lib/Cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.form.ctp similarity index 100% rename from cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.form.ctp rename to lib/Cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.form.ctp diff --git a/cake/tests/test_app/views/elements/email/html/nested_element.ctp b/lib/Cake/tests/test_app/views/elements/email/html/nested_element.ctp similarity index 100% rename from cake/tests/test_app/views/elements/email/html/nested_element.ctp rename to lib/Cake/tests/test_app/views/elements/email/html/nested_element.ctp diff --git a/cake/tests/test_app/views/elements/html_call.ctp b/lib/Cake/tests/test_app/views/elements/html_call.ctp similarity index 100% rename from cake/tests/test_app/views/elements/html_call.ctp rename to lib/Cake/tests/test_app/views/elements/html_call.ctp diff --git a/cake/tests/test_app/views/elements/type_check.ctp b/lib/Cake/tests/test_app/views/elements/type_check.ctp similarity index 100% rename from cake/tests/test_app/views/elements/type_check.ctp rename to lib/Cake/tests/test_app/views/elements/type_check.ctp diff --git a/cake/tests/test_app/views/layouts/json/default.ctp b/lib/Cake/tests/test_app/views/layouts/json/default.ctp similarity index 100% rename from cake/tests/test_app/views/layouts/json/default.ctp rename to lib/Cake/tests/test_app/views/layouts/json/default.ctp diff --git a/cake/tests/test_app/views/posts/scaffold.form.ctp b/lib/Cake/tests/test_app/views/posts/scaffold.form.ctp similarity index 100% rename from cake/tests/test_app/views/posts/scaffold.form.ctp rename to lib/Cake/tests/test_app/views/posts/scaffold.form.ctp diff --git a/cake/tests/test_app/views/tests_apps/json/index.ctp b/lib/Cake/tests/test_app/views/tests_apps/json/index.ctp similarity index 100% rename from cake/tests/test_app/views/tests_apps/json/index.ctp rename to lib/Cake/tests/test_app/views/tests_apps/json/index.ctp From 8bcabdea6a30d8b72991bd5ad195a9206be603ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 18 Dec 2010 22:02:25 -0430 Subject: [PATCH 067/214] Fixing constants for test suite --- app/webroot/test.php | 7 +------ lib/Cake/Console/Command/TestSuiteShell.php | 8 +------- lib/Cake/tests/cases/libs/folder.test.php | 1 + 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/app/webroot/test.php b/app/webroot/test.php index 2f6a55e7a..fdf97f457 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -72,12 +72,7 @@ if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } -$corePath = App::core('cake'); -if (isset($corePath[0])) { - define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); -} else { - define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); -} +define('TEST_CAKE_CORE_INCLUDE_PATH', LIBS); if (Configure::read('debug') < 1) { die(__('Debug setting does not allow access to this url.', true)); diff --git a/lib/Cake/Console/Command/TestSuiteShell.php b/lib/Cake/Console/Command/TestSuiteShell.php index 3b3b1f901..9705d05de 100644 --- a/lib/Cake/Console/Command/TestSuiteShell.php +++ b/lib/Cake/Console/Command/TestSuiteShell.php @@ -160,13 +160,7 @@ class TestSuiteShell extends Shell { * @return void */ public function initialize() { - $corePath = App::core('cake'); - if (isset($corePath[0])) { - define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); - } else { - define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); - } - + define('TEST_CAKE_CORE_INCLUDE_PATH', LIBS); $this->_dispatcher = new CakeTestSuiteDispatcher(); $this->_dispatcher->loadTestFramework(); } diff --git a/lib/Cake/tests/cases/libs/folder.test.php b/lib/Cake/tests/cases/libs/folder.test.php index f70b60e84..65ca682ab 100644 --- a/lib/Cake/tests/cases/libs/folder.test.php +++ b/lib/Cake/tests/cases/libs/folder.test.php @@ -17,6 +17,7 @@ * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Folder', 'Utility'); App::uses('File', 'Utility'); /** From ad78f1dc746a9a8e9f637fb0c20a28b5bc7c73b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 18 Dec 2010 22:07:30 -0430 Subject: [PATCH 068/214] Adding support for plugin classes back, Allowing the user to override core classes in app/libs Adding some backward compatibility for App::path() and App::build() --- lib/Cake/Core/App.php | 177 +++++++++++++++++++++++++++++------------- 1 file changed, 122 insertions(+), 55 deletions(-) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index a5f7019a0..8b7ad40bc 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -213,6 +213,27 @@ class App { */ private static $__packages = array(); +/** + * + * + */ + private static $__packageFormat = array(); + +/** + * Maps an old style cakephp class type to the corresponding package + * + */ + public static $legacy = array( + 'models' => 'Model', + 'behaviors' => 'Model/Behavior', + 'datasources' => 'Model/Datasource', + 'controllers' => 'Controller', + 'components' => 'Model/Datasource', + 'views' => 'View', + 'helpers' => 'View/Helper', + 'shells' => 'Console' + ); + /** * Inicates whether the class cache should be stored again because of an addition to it * @@ -235,7 +256,24 @@ class App { * @param string $type type of path * @return string array */ - public static function path($type) { + public static function path($type, $plugin = null) { + if (!empty(self::$legacy[$type])) { + $type = self::$legacy[$type]; + } + + if (!empty($plugin)) { + $path = array(); + $pluginPath = self::pluginPath($plugin); + if (!empty(self::$__packageFormat[$type])) { + foreach (self::$__packageFormat[$type] as $f) { + $path[] = sprintf($f, $pluginPath); + } + return $path; + } + + return $pluginPath . 'libs' . DS . $type; + } + if (!isset(self::$__packages[$type])) { return array(); } @@ -251,32 +289,50 @@ class App { * @return void */ public static function build($paths = array(), $reset = false) { - $defaults = array( - 'Model' => array(MODELS), - 'Model/Behavior' => array(BEHAVIORS), - 'Datasource' => array(MODELS . 'datasources'), - 'Controller' => array(CONTROLLERS), - 'Controller/Component' => array(COMPONENTS), - 'libs' => array(APPLIBS), - 'View' => array(VIEWS), - 'View/Helper' => array(HELPERS), - 'locales' => array(APP . 'locale' . DS), - 'Console' => array( - APP . 'console' . DS . 'shells' . DS, - APP . 'vendors' . DS . 'shells' . DS, - VENDORS . 'shells' . DS - ), - 'vendors' => array(APP . 'vendors' . DS, VENDORS), - 'plugins' => array(APP . 'plugins' . DS) - ); + if (empty(self::$__packageFormat)) { + self::$__packageFormat = array( + 'Model' => array('%s' . 'models' . DS), + 'Model/Behavior' => array('%s' . 'models' . DS . 'behaviors' . DS), + 'Model/Datasource' => array('%s' . 'models' . DS . 'datasources' . DS), + 'Model/Datasource/Database' => array('%s' . 'models' . DS . 'datasources' . DS . 'database' . DS), + 'Controller' => array('%s' . 'controllers' . DS), + 'Controller/Component' => array('%s' . 'controllers' . DS . 'components' . DS), + 'View' => array('%s' . 'views' . DS), + 'View/Helper' => array('%s' . 'views' . DS . 'helpers' . DS), + 'Console' => array( + '%s' . 'console' . DS . 'shells' . DS, + '%s' . 'vendors' . DS . 'shells' . DS, + VENDORS . 'shells' . DS + ), + 'libs' => array('%s' . 'libs' . DS), + 'locales' => array('%s' . 'locale' . DS), + 'vendors' => array('%s' . 'vendors' . DS, VENDORS), + 'plugins' => array(APP . 'plugins' . DS) + ); + + self::$__packageFormat['Console/Command'] = self::$__packageFormat['Console']; + } if ($reset == true) { foreach ($paths as $type => $new) { + if (!empty(self::$legacy[$type])) { + $type = self::$legacy[$type]; + } self::$__packages[$type] = (array)$new; } return $paths; } + $defaults = array(); + foreach (self::$__packageFormat as $package => $format) { + foreach ($format as $f) { + $defaults[$package][] = sprintf($f, APP); + } + } + + $mergeExclude = array('libs', 'locales', 'vendors', 'plugins'); + $appLibs = empty($paths['libs']) ? $defaults['libs'] : $paths['libs']; + foreach ($defaults as $type => $default) { if (empty(self::$__packages[$type]) || empty($paths)) { @@ -284,13 +340,12 @@ class App { } if (!empty($paths[$type])) { - $path = array_flip(array_flip(array_merge( - (array)$paths[$type], self::$__packages[$type]))); - self::$__packages[$type] = array_values($path); + $path = array_merge((array)$paths[$type], self::$__packages[$type]); } else { - $path = array_flip(array_flip(self::$__packages[$type])); - self::$__packages[$type] = array_values($path); + $path = self::$__packages[$type]; } + + self::$__packages[$type] = array_values(array_unique($path)); } } @@ -302,12 +357,12 @@ class App { */ public static function pluginPath($plugin) { $pluginDir = Inflector::underscore($plugin); - for ($i = 0, $length = count(self::$plugins); $i < $length; $i++) { - if (is_dir(self::$plugins[$i] . $pluginDir)) { - return self::$plugins[$i] . $pluginDir . DS ; + foreach (self::$__packages['plugins'] as $pluginPath) { + if (is_dir($pluginPath . $pluginDir)) { + return $pluginPath . $pluginDir . DS ; } } - return self::$plugins[0] . $pluginDir . DS; + return self::$__packages['plugins'][0] . $pluginDir . DS; } /** @@ -318,46 +373,35 @@ class App { */ public static function themePath($theme) { $themeDir = 'themed' . DS . Inflector::underscore($theme); - for ($i = 0, $length = count(self::$views); $i < $length; $i++) { - if (is_dir(self::$views[$i] . $themeDir)) { - return self::$views[$i] . $themeDir . DS ; + foreach (self::$__packages['View'] as $path) { + if (is_dir($path . $themeDir)) { + return $path . $themeDir . DS ; } } - return self::$views[0] . $themeDir . DS; + return self::$__packages['View'][0] . $themeDir . DS; } /** * Returns a key/value list of all paths where core libs are found. * Passing $type only returns the values for a given value of $key. * - * @param string $type valid values are: 'model', 'behavior', 'controller', 'component', - * 'view', 'helper', 'datasource', 'libs', and 'cake' + * @param string $type valid values are: 'cake' ,'plugins', 'vendors' and 'shells' * @return array numeric keyed array of core lib paths */ public static function core($type = null) { static $paths = false; if (!$paths) { $paths = array(); - $cake = $libs = LIBS; - $path = dirname($cake) . DS; - - $paths['cake'][] = $cake; - $paths['libs'][] = $libs; - $paths['models'][] = $libs . 'model' . DS; - $paths['datasources'][] = $libs . 'model' . DS . 'datasources' . DS; - $paths['behaviors'][] = $libs . 'model' . DS . 'behaviors' . DS; - $paths['controllers'][] = $libs . 'controller' . DS; - $paths['components'][] = $libs . 'controller' . DS . 'components' . DS; - $paths['views'][] = $libs . 'View' . DS; - $paths['helpers'][] = $libs . 'view' . DS . 'helpers' . DS; - $paths['plugins'][] = $path . 'plugins' . DS; - $paths['vendors'][] = $path . 'vendors' . DS; - $paths['shells'][] = $libs . 'Console' . DS . 'Command' . DS; + $root = dirname(dirname(LIBS)) . DS; + $paths['cake'][] = $root; + $paths['plugins'][] = $root . 'plugins' . DS; + $paths['vendors'][] = $root . 'vendors' . DS; + $paths['shells'][] = LIBS . 'Console' . DS . 'Command' . DS; // Provide BC path to vendors/shells - $paths['shells'][] = $path . 'vendors' . DS . 'shells' . DS; + $paths['shells'][] = $root . 'vendors' . DS . 'shells' . DS; } - if ($type && isset($paths[$type])) { - return $paths[$type]; + if ($type) { + return isset($paths[$type]) ? $paths[$type] : array(LIBS . $type . DS); } return $paths; } @@ -453,9 +497,14 @@ class App { return include $file; } - $package = self::$__classMap[$className]; - $paths = self::path($package); - $paths[] = LIBS . self::$__classMap[$className] . DS; + list($plugin, $package) = pluginSplit(self::$__classMap[$className]); + $paths = self::path($package, $plugin); + + if (empty($plugin)) { + $appLibs = empty(self::$__packages['libs']) ? APPLIBS : self::$__packages['libs']; + $paths[] = $appLibs . self::$__classMap[$className] . DS; + $paths[] = LIBS . self::$__classMap[$className] . DS; + } foreach ($paths as $path) { $file = $path . $className . '.php'; @@ -464,7 +513,25 @@ class App { return include $file; } } + + //To help apps migrate to 2.0 old style file names are allowed + foreach ($paths as $path) { + $underscored = Inflector::underscore($className); + $tries = array($path . $underscored . '.php'); + $parts = explode('_', $underscored); + if (count($parts) > 1) { + array_pop($parts); + $tries[] = $path . implode('_', $parts) . '.php'; + } + foreach ($tries as $file) { + if (file_exists($file)) { + self::__map($file, $className); + return include $file; + } + } + } } + return false; } From 151a4bdb33fa73fe44b196e5499e71925379e7d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 18 Dec 2010 22:09:08 -0430 Subject: [PATCH 069/214] Fixing view files finding and making tests pass --- lib/Cake/View/HelperCollection.php | 4 ++-- lib/Cake/View/View.php | 6 +++--- lib/Cake/tests/cases/libs/view/view.test.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Cake/View/HelperCollection.php b/lib/Cake/View/HelperCollection.php index fe5f74ad5..fa7503456 100644 --- a/lib/Cake/View/HelperCollection.php +++ b/lib/Cake/View/HelperCollection.php @@ -54,11 +54,11 @@ class HelperCollection extends ObjectCollection { return $this->_loaded[$name]; } $helperClass = $name . 'Helper'; - App::uses($helperClass, 'View/Helper'); + App::uses($helperClass, $plugin . 'View/Helper'); if (!class_exists($helperClass)) { throw new MissingHelperClassException(array( 'class' => $helperClass, - 'file' => Inflector::underscore($name) . '.php' + 'file' => $helperClass . '.php' )); } $this->_loaded[$name] = new $helperClass($this->_View, $settings); diff --git a/lib/Cake/View/View.php b/lib/Cake/View/View.php index f524328ed..e24fed5c4 100644 --- a/lib/Cake/View/View.php +++ b/lib/Cake/View/View.php @@ -803,7 +803,7 @@ class View extends Object { } $paths = array(); $viewPaths = App::path('View'); - $corePaths = array_flip(App::core('views')); + $corePaths = array_flip(App::core('View')); if (!empty($plugin)) { $count = count($viewPaths); @@ -812,10 +812,10 @@ class View extends Object { $paths[] = $viewPaths[$i] . 'plugins' . DS . $plugin . DS; } } - $paths[] = App::pluginPath($plugin) . 'views' . DS; + $paths = array_merge($paths, App::path('View', $plugin)); } - $this->__paths = array_merge($paths, $viewPaths, array_flip($corePaths)); + $this->__paths = array_unique(array_merge($paths, $viewPaths, array_keys($corePaths))); return $this->__paths; } } diff --git a/lib/Cake/tests/cases/libs/view/view.test.php b/lib/Cake/tests/cases/libs/view/view.test.php index 17c5c6274..61762f475 100644 --- a/lib/Cake/tests/cases/libs/view/view.test.php +++ b/lib/Cake/tests/cases/libs/view/view.test.php @@ -204,7 +204,7 @@ class ViewTest extends CakeTestCase { 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), 'views' => array( TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS, - TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS + TEST_CAKE_CORE_INCLUDE_PATH . 'View' . DS ) ), true); @@ -268,7 +268,7 @@ class ViewTest extends CakeTestCase { TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'plugins' . DS . 'test_plugin' . DS, TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'views' . DS, TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS, - TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS + TEST_CAKE_CORE_INCLUDE_PATH . 'View' . DS ); $this->assertEqual($paths, $expected); } From 5e1b49918bf8d3d99f628226d851e48511cc6e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 18 Dec 2010 22:26:23 -0430 Subject: [PATCH 070/214] Fixing App::core('cake') --- lib/Cake/Core/App.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 8b7ad40bc..e541c5f51 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -393,7 +393,7 @@ class App { if (!$paths) { $paths = array(); $root = dirname(dirname(LIBS)) . DS; - $paths['cake'][] = $root; + $paths['cake'][] = LIBS; $paths['plugins'][] = $root . 'plugins' . DS; $paths['vendors'][] = $root . 'vendors' . DS; $paths['shells'][] = LIBS . 'Console' . DS . 'Command' . DS; From 633f1dc1e5f72a1ed25e60bdb1b54e54506bd4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 18 Dec 2010 22:27:02 -0430 Subject: [PATCH 071/214] Fixing warning in ConnectionManager --- lib/Cake/Model/ConnectionManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index 324dcf554..5500e7547 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -180,7 +180,7 @@ class ConnectionManager { App::uses($conn['classname'], $plugin . 'Model/Datasource' . $package); if (!class_exists($conn['classname'])) { - trigger_error(__('ConnectionManager::loadDataSource - Unable to import DataSource class %s', $class), E_USER_ERROR); + trigger_error(__('ConnectionManager::loadDataSource - Unable to import DataSource class %s', $conn['classname']), E_USER_ERROR); return null; } return true; From e8c73170ba2d2211637e5e88c4582609ef6b1c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 18 Dec 2010 22:27:28 -0430 Subject: [PATCH 072/214] Ficing a couple of notices when using a mocked CakeRequest --- lib/Cake/Network/CakeRequest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index bd0ad3bb4..403624505 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -273,7 +273,7 @@ class CakeRequest implements ArrayAccess { $config = Configure::read('App'); extract($config); - if (!$base) { + if (empty($base)) { $base = $this->base; } @@ -281,7 +281,7 @@ class CakeRequest implements ArrayAccess { $this->webroot = $base . '/'; return $base; } - if (!$baseUrl) { + if (empty($baseUrl)) { $replace = array('<', '>', '*', '\'', '"'); $base = str_replace($replace, '', dirname(env('PHP_SELF'))); From 5f7ca8d2b660ff4b8a802c4506c6542e98a22fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 18 Dec 2010 22:27:55 -0430 Subject: [PATCH 073/214] Removing some internal chenck for the "driver" key in database configs --- .../tests/cases/libs/model/model_write.test.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Cake/tests/cases/libs/model/model_write.test.php b/lib/Cake/tests/cases/libs/model/model_write.test.php index 43f8846ef..bf72dbf2a 100644 --- a/lib/Cake/tests/cases/libs/model/model_write.test.php +++ b/lib/Cake/tests/cases/libs/model/model_write.test.php @@ -148,7 +148,7 @@ class ModelWriteTest extends BaseModelTest { */ function testAutoSaveUuid() { // SQLite does not support non-integer primary keys - $this->skipIf($this->db->config['driver'] == 'sqlite'); + $this->skipIf($this->db instanceof Sqlite); $this->loadFixtures('Uuid'); $TestModel = new Uuid(); @@ -170,7 +170,7 @@ class ModelWriteTest extends BaseModelTest { */ public function testSaveUuidNull() { // SQLite does not support non-integer primary keys - $this->skipIf($this->db->config['driver'] == 'sqlite'); + $this->skipIf($this->db instanceof Sqlite); $this->loadFixtures('Uuid'); $TestModel = new Uuid(); @@ -192,7 +192,7 @@ class ModelWriteTest extends BaseModelTest { */ function testZeroDefaultFieldValue() { $this->skipIf( - $this->db->config['driver'] == 'sqlite', + $this->db instanceof Sqlite, '%s SQLite uses loose typing, this operation is unsupported' ); $this->loadFixtures('DataTest'); @@ -409,7 +409,7 @@ class ModelWriteTest extends BaseModelTest { */ public function testCounterCacheWithSelfJoin() { $skip = $this->skipIf( - ($this->db->config['driver'] == 'sqlite'), + ($this->db instanceof Sqlite), 'SQLite 2.x does not support ALTER TABLE ADD COLUMN' ); if ($skip) { @@ -2988,7 +2988,7 @@ class ModelWriteTest extends BaseModelTest { $this->getMock('DboSource', array(), array(), 'MockTransactionDboSource'); $db = ConnectionManager::create('mock_transaction', array( - 'datasource' => 'MockTransactionDbo', + 'datasource' => 'MockTransactionDboSource', )); $db->expects($this->at(2)) ->method('isInterfaceSupported') @@ -3023,7 +3023,7 @@ class ModelWriteTest extends BaseModelTest { $mock = $this->getMock('DboSource', array(), array(), 'MockTransactionAssociatedDboSource', false); $db =& ConnectionManager::create('mock_transaction_assoc', array( - 'datasource' => 'MockTransactionAssociatedDbo', + 'datasource' => 'MockTransactionAssociatedDboSource', )); $this->mockObjects[] = $db; $db->columns = $testDb->columns; @@ -3841,7 +3841,7 @@ class ModelWriteTest extends BaseModelTest { */ function testProductUpdateAll() { $this->skipIf( - $this->db->config['driver'] != 'mysql', + !$this->db instanceof Mysql, '%s Currently, there is no way of doing joins in an update statement in postgresql or sqlite' ); $this->loadFixtures('ProductUpdateAll', 'GroupUpdateAll'); @@ -3892,7 +3892,7 @@ class ModelWriteTest extends BaseModelTest { */ function testProductUpdateAllWithoutForeignKey() { $this->skipIf( - $this->db->config['driver'] != 'mysql', + !$this->db instanceof Mysql, '%s Currently, there is no way of doing joins in an update statement in postgresql' ); $this->loadFixtures('ProductUpdateAll', 'GroupUpdateAll'); From 5605bf2d9ee9d746cf11b2a3ad21d8ea00e14c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sat, 18 Dec 2010 22:32:20 -0430 Subject: [PATCH 074/214] Fixing failing test for HelperCollection --- lib/Cake/tests/cases/libs/view/helper_collection.test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/tests/cases/libs/view/helper_collection.test.php b/lib/Cake/tests/cases/libs/view/helper_collection.test.php index 43048973b..54aa16cde 100644 --- a/lib/Cake/tests/cases/libs/view/helper_collection.test.php +++ b/lib/Cake/tests/cases/libs/view/helper_collection.test.php @@ -73,7 +73,7 @@ class HelperCollectionTest extends CakeTestCase { /** * test missinghelper exception * - * @expectedException MissingHelperFileException + * @expectedException MissingHelperClassException * @return void */ function testLoadMissingHelperFile() { From 5fa028839e9004c1bd3347f4a35fef45d8de628d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 19 Dec 2010 23:17:53 -0430 Subject: [PATCH 075/214] Fixing paths location in cake.php files --- app/console/cake.php | 2 +- lib/Cake/Console/templates/skel/console/cake.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/console/cake.php b/app/console/cake.php index af02ae4ff..6a91ffc98 100755 --- a/app/console/cake.php +++ b/app/console/cake.php @@ -20,6 +20,6 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'cake' . DIRECTORY_SEPARATOR . 'console' . DIRECTORY_SEPARATOR . 'shell_dispatcher.php'); +require_once(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'lib'. DIRECTORY_SEPARATOR . 'Cake' . DIRECTORY_SEPARATOR . 'Console' . DIRECTORY_SEPARATOR . 'ShellDispatcher.php'); return ShellDispatcher::run($argv); diff --git a/lib/Cake/Console/templates/skel/console/cake.php b/lib/Cake/Console/templates/skel/console/cake.php index 8ccac0bfb..fc0c0b484 100644 --- a/lib/Cake/Console/templates/skel/console/cake.php +++ b/lib/Cake/Console/templates/skel/console/cake.php @@ -20,6 +20,7 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once(__CAKE_PATH__ . 'shell_dispatcher.php'); +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR. 'ShellDispatcher.php'); return ShellDispatcher::run($argv); + From b2ad8fe113aaa4025c75d2f89cea0b2c047f6ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 19 Dec 2010 23:33:37 -0430 Subject: [PATCH 076/214] Removing constant TEST_CAKE_CORE_INCLUDE_PATH --- app/webroot/test.php | 2 - .../cases/libs/controller_test_case.test.php | 20 +++--- lib/Cake/Console/Command/TestSuiteShell.php | 1 - .../Console/templates/skel/webroot/test.php | 13 +--- .../TestSuite/Coverage/BaseCoverageReport.php | 2 +- .../TestSuite/Fixture/CakeFixtureManager.php | 2 +- lib/Cake/tests/cases/basics.test.php | 2 +- .../console/libs/task_collection.test.php | 2 +- .../cases/console/shell_dispatcher.test.php | 4 +- .../console/shells/command_list.test.php | 4 +- .../cases/console/shells/schema.test.php | 12 ++-- .../tests/cases/console/shells/shell.test.php | 4 +- .../console/shells/tasks/extract.test.php | 8 +-- .../console/shells/tasks/template.test.php | 4 +- lib/Cake/tests/cases/libs/app.test.php | 46 ++++++------- lib/Cake/tests/cases/libs/cache.test.php | 12 ++-- lib/Cake/tests/cases/libs/cake_log.test.php | 4 +- .../tests/cases/libs/cake_session.test.php | 8 +-- .../cases/libs/config/ini_reader.test.php | 2 +- .../cases/libs/config/php_reader.test.php | 4 +- lib/Cake/tests/cases/libs/configure.test.php | 4 +- .../cases/libs/controller/component.test.php | 12 ++-- .../controller/component_collection.test.php | 2 +- .../libs/controller/components/acl.test.php | 4 +- .../libs/controller/components/auth.test.php | 11 ++- .../libs/controller/components/email.test.php | 13 ++-- .../components/request_handler.test.php | 4 +- .../cases/libs/controller/controller.test.php | 32 ++++----- .../libs/controller/pages_controller.test.php | 12 +++- .../cases/libs/controller/scaffold.test.php | 34 +++++----- lib/Cake/tests/cases/libs/dispatcher.test.php | 28 ++++---- .../cases/libs/error/error_handler.test.php | 4 +- .../libs/error/exception_renderer.test.php | 6 +- lib/Cake/tests/cases/libs/folder.test.php | 68 +++++++++---------- .../cases/libs/html_coverage_report.test.php | 8 +-- lib/Cake/tests/cases/libs/i18n.test.php | 6 +- .../cases/libs/model/cake_schema.test.php | 4 +- .../libs/model/connection_manager.test.php | 14 ++-- lib/Cake/tests/cases/libs/object.test.php | 24 +++---- lib/Cake/tests/cases/libs/router.test.php | 4 +- .../tests/cases/libs/view/helper.test.php | 10 +-- .../libs/view/helper_collection.test.php | 2 +- .../cases/libs/view/helpers/cache.test.php | 2 +- .../cases/libs/view/helpers/html.test.php | 8 +-- .../cases/libs/view/helpers/session.test.php | 2 +- .../cases/libs/view/helpers/time.test.php | 4 +- lib/Cake/tests/cases/libs/view/media.test.php | 6 +- lib/Cake/tests/cases/libs/view/theme.test.php | 21 +++--- lib/Cake/tests/cases/libs/view/view.test.php | 40 +++++------ lib/Cake/tests/cases/libs/xml.test.php | 10 +-- 50 files changed, 277 insertions(+), 278 deletions(-) diff --git a/app/webroot/test.php b/app/webroot/test.php index fdf97f457..94c7f8784 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -72,8 +72,6 @@ if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } -define('TEST_CAKE_CORE_INCLUDE_PATH', LIBS); - if (Configure::read('debug') < 1) { die(__('Debug setting does not allow access to this url.', true)); } diff --git a/cake/tests/cases/libs/controller_test_case.test.php b/cake/tests/cases/libs/controller_test_case.test.php index c457da428..0ec621ccb 100644 --- a/cake/tests/cases/libs/controller_test_case.test.php +++ b/cake/tests/cases/libs/controller_test_case.test.php @@ -21,7 +21,7 @@ */ App::import('Controller', 'Controller', false); App::import('Core', array('AppModel', 'Model')); -require_once TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'lib' . DS . 'reporter' . DS . 'cake_html_reporter.php'; +require_once LIBS . 'tests' . DS . 'lib' . DS . 'reporter' . DS . 'cake_html_reporter.php'; require_once dirname(__FILE__) . DS . 'model' . DS . 'models.php'; /** @@ -108,10 +108,10 @@ class ControllerTestCaseTest extends CakeTestCase { function setUp() { parent::setUp(); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'controllers' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'controllers' . DS), - 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS), - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'controllers' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'controllers' . DS), + 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS), + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS) )); $this->Case = new ControllerTestCase(); Router::reload(); @@ -222,7 +222,7 @@ class ControllerTestCaseTest extends CakeTestCase { * Tests using loaded routes during tests */ function testUseRoutes() { - include TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; + include LIBS . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; $controller = $this->Case->generate('TestsApps'); $controller->Components->load('RequestHandler'); $result = $this->Case->testAction('/tests_apps/index.json', array('return' => 'view')); @@ -230,16 +230,16 @@ class ControllerTestCaseTest extends CakeTestCase { $expected = array('cakephp' => 'cool'); $this->assertEquals($result, $expected); - include TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; + include LIBS . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; $result = $this->Case->testAction('/some_alias'); $this->assertEquals($result, 5); - include TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; + include LIBS . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; $this->Case->testAction('/redirect_me_now'); $result = $this->Case->headers['Location']; $this->assertEquals($result, 'http://cakephp.org'); - include TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; + include LIBS . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; $this->Case->testAction('/redirect_me'); $result = $this->Case->headers['Location']; $this->assertEquals($result, Router::url(array('controller' => 'tests_apps', 'action' => 'some_method'), true)); @@ -251,7 +251,7 @@ class ControllerTestCaseTest extends CakeTestCase { * @expectedException MissingActionException */ function testSkipRoutes() { - include TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; + include LIBS . 'tests' . DS . 'test_app' . DS . 'config' . DS . 'routes.php'; $this->Case->loadRoutes = false; diff --git a/lib/Cake/Console/Command/TestSuiteShell.php b/lib/Cake/Console/Command/TestSuiteShell.php index 9705d05de..c62205162 100644 --- a/lib/Cake/Console/Command/TestSuiteShell.php +++ b/lib/Cake/Console/Command/TestSuiteShell.php @@ -160,7 +160,6 @@ class TestSuiteShell extends Shell { * @return void */ public function initialize() { - define('TEST_CAKE_CORE_INCLUDE_PATH', LIBS); $this->_dispatcher = new CakeTestSuiteDispatcher(); $this->_dispatcher->loadTestFramework(); } diff --git a/lib/Cake/Console/templates/skel/webroot/test.php b/lib/Cake/Console/templates/skel/webroot/test.php index 7a27e8e29..94c7f8784 100644 --- a/lib/Cake/Console/templates/skel/webroot/test.php +++ b/lib/Cake/Console/templates/skel/webroot/test.php @@ -50,7 +50,7 @@ ini_set('display_errors', 1); * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT); + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS .'lib'); } /** @@ -68,21 +68,14 @@ if (!defined('CORE_PATH')) { define('APP_PATH', ROOT . DS . APP_DIR . DS); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } -if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { +if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } -$corePath = App::core('cake'); -if (isset($corePath[0])) { - define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); -} else { - define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); -} - if (Configure::read('debug') < 1) { die(__('Debug setting does not allow access to this url.', true)); } -require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php'; +require_once CAKE_TESTS_LIB . 'CakeTestSuiteDispatcher.php'; CakeTestSuiteDispatcher::run(); diff --git a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php index d532f06d6..c259c338d 100644 --- a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php +++ b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php @@ -102,7 +102,7 @@ abstract class BaseCoverageReport { } elseif ($this->pluginTest) { $path = App::pluginPath($this->pluginTest); } else { - $path = TEST_CAKE_CORE_INCLUDE_PATH; + $path = LIBS; } return $path; } diff --git a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php index 66bf11352..b46c48c26 100644 --- a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php +++ b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php @@ -128,7 +128,7 @@ class CakeFixtureManager { $fixturePaths = array( TESTS . 'fixtures', VENDORS . 'tests' . DS . 'fixtures', - TEST_CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'tests' . DS . 'fixtures' + LIBS . DS . 'cake' . DS . 'tests' . DS . 'fixtures' ); } diff --git a/lib/Cake/tests/cases/basics.test.php b/lib/Cake/tests/cases/basics.test.php index fca3079df..255158a88 100644 --- a/lib/Cake/tests/cases/basics.test.php +++ b/lib/Cake/tests/cases/basics.test.php @@ -36,7 +36,7 @@ class BasicsTest extends CakeTestCase { */ public function setUp() { App::build(array( - 'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS) + 'locales' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'locale' . DS) )); $this->_language = Configure::read('Config.language'); } diff --git a/lib/Cake/tests/cases/console/libs/task_collection.test.php b/lib/Cake/tests/cases/console/libs/task_collection.test.php index e2efdfb0e..ac22f2ac2 100644 --- a/lib/Cake/tests/cases/console/libs/task_collection.test.php +++ b/lib/Cake/tests/cases/console/libs/task_collection.test.php @@ -89,7 +89,7 @@ class TaskCollectionTest extends CakeTestCase { $dispatcher = $this->getMock('ShellDispatcher', array(), array(), '', false); $shell = $this->getMock('Shell', array(), array(), '', false); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $this->Tasks = new TaskCollection($shell, $dispatcher); diff --git a/lib/Cake/tests/cases/console/shell_dispatcher.test.php b/lib/Cake/tests/cases/console/shell_dispatcher.test.php index 2da5bbe81..f0e342f51 100644 --- a/lib/Cake/tests/cases/console/shell_dispatcher.test.php +++ b/lib/Cake/tests/cases/console/shell_dispatcher.test.php @@ -119,11 +119,11 @@ class ShellDispatcherTest extends CakeTestCase { parent::setUp(); App::build(array( 'plugins' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS ), 'shells' => array( CORE_PATH ? CONSOLE_LIBS : ROOT . DS . CONSOLE_LIBS, - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'console' . DS . 'shells' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'console' . DS . 'shells' . DS ) ), true); } diff --git a/lib/Cake/tests/cases/console/shells/command_list.test.php b/lib/Cake/tests/cases/console/shells/command_list.test.php index 6f25ed68b..602037cf3 100644 --- a/lib/Cake/tests/cases/console/shells/command_list.test.php +++ b/lib/Cake/tests/cases/console/shells/command_list.test.php @@ -39,13 +39,13 @@ class CommandListTest extends CakeTestCase { parent::setUp(); App::build(array( 'plugins' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS ), 'shells' => array( CORE_PATH ? CORE_PATH . CAKE . 'console' . DS . 'shells' . DS : CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'console' . DS . 'shells' .DS, - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'console' . DS . 'shells' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'console' . DS . 'shells' . DS ) ), true); App::objects('plugin', null, false); diff --git a/lib/Cake/tests/cases/console/shells/schema.test.php b/lib/Cake/tests/cases/console/shells/schema.test.php index d438335e2..ae95a52df 100644 --- a/lib/Cake/tests/cases/console/shells/schema.test.php +++ b/lib/Cake/tests/cases/console/shells/schema.test.php @@ -187,7 +187,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testViewWithPlugins() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $this->Shell->args = array('TestPlugin.schema'); $this->Shell->startup(); @@ -236,7 +236,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testDumpFileWritingWithPlugins() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $this->Shell->args = array('TestPlugin.TestPluginApp'); $this->Shell->params = array( @@ -332,7 +332,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testGenerateWithPlugins() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); App::objects('plugin', null, false); @@ -445,14 +445,14 @@ class SchemaShellTest extends CakeTestCase { */ public function testPluginParam() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $this->Shell->params = array( 'plugin' => 'TestPlugin', 'connection' => 'test' ); $this->Shell->startup(); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'config' . DS . 'schema'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'config' . DS . 'schema'; $this->assertEqual($this->Shell->Schema->path, $expected); } @@ -463,7 +463,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testPluginDotSyntaxWithCreate() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $this->Shell->params = array( 'connection' => 'test' diff --git a/lib/Cake/tests/cases/console/shells/shell.test.php b/lib/Cake/tests/cases/console/shells/shell.test.php index fcd8d4dd6..457af05d5 100644 --- a/lib/Cake/tests/cases/console/shells/shell.test.php +++ b/lib/Cake/tests/cases/console/shells/shell.test.php @@ -174,8 +174,8 @@ class ShellTest extends CakeTestCase { */ public function testInitialize() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS) ), true); $this->Shell->uses = array('TestPlugin.TestPluginPost'); diff --git a/lib/Cake/tests/cases/console/shells/tasks/extract.test.php b/lib/Cake/tests/cases/console/shells/tasks/extract.test.php index 6d634e5b4..e4c81e182 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/extract.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/extract.test.php @@ -72,7 +72,7 @@ class ExtractTaskTest extends CakeTestCase { public function testExecute() { $this->Task->interactive = false; - $this->Task->params['paths'] = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'pages'; + $this->Task->params['paths'] = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'pages'; $this->Task->params['output'] = $this->path . DS; $this->Task->expects($this->never())->method('err'); $this->Task->expects($this->any())->method('in') @@ -154,7 +154,7 @@ class ExtractTaskTest extends CakeTestCase { function testExtractWithExclude() { $this->Task->interactive = false; - $this->Task->params['paths'] = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'; + $this->Task->params['paths'] = LIBS . 'tests' . DS . 'test_app' . DS . 'views'; $this->Task->params['output'] = $this->path . DS; $this->Task->params['exclude'] = 'pages,layouts'; @@ -181,8 +181,8 @@ class ExtractTaskTest extends CakeTestCase { $this->Task->interactive = false; $this->Task->params['paths'] = - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'pages,' . - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'posts'; + LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'pages,' . + LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'posts'; $this->Task->params['output'] = $this->path . DS; $this->Task->expects($this->never())->method('err'); diff --git a/lib/Cake/tests/cases/console/shells/tasks/template.test.php b/lib/Cake/tests/cases/console/shells/tasks/template.test.php index c2b162dd8..273beb968 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/template.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/template.test.php @@ -126,7 +126,7 @@ class TemplateTaskTest extends CakeTestCase { public function testGenerate() { App::build(array( 'shells' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'console' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'console' . DS ) )); $this->Task->initialize(); @@ -146,7 +146,7 @@ class TemplateTaskTest extends CakeTestCase { public function testGenerateWithTemplateFallbacks() { App::build(array( 'shells' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'console' . DS, + LIBS . 'tests' . DS . 'test_app' . DS . 'console' . DS, CAKE_CORE_INCLUDE_PATH . DS . 'console' . DS ) )); diff --git a/lib/Cake/tests/cases/libs/app.test.php b/lib/Cake/tests/cases/libs/app.test.php index cbebd4bf3..4a70fdf8a 100644 --- a/lib/Cake/tests/cases/libs/app.test.php +++ b/lib/Cake/tests/cases/libs/app.test.php @@ -94,7 +94,7 @@ class AppImportTest extends CakeTestCase { * @return void */ function testListObjects() { - $result = App::objects('class', TEST_CAKE_CORE_INCLUDE_PATH . 'libs', false); + $result = App::objects('class', LIBS . 'libs', false); $this->assertTrue(in_array('Xml', $result)); $this->assertTrue(in_array('Cache', $result)); $this->assertTrue(in_array('HttpSocket', $result)); @@ -132,7 +132,7 @@ class AppImportTest extends CakeTestCase { App::build(array( 'plugins' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS ) )); $result = App::objects('plugin', null, false); @@ -149,18 +149,18 @@ class AppImportTest extends CakeTestCase { */ function testPluginPath() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $path = App::pluginPath('test_plugin'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS; $this->assertEqual($path, $expected); $path = App::pluginPath('TestPlugin'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS; $this->assertEqual($path, $expected); $path = App::pluginPath('TestPluginTwo'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin_two' . DS; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin_two' . DS; $this->assertEqual($path, $expected); App::build(); } @@ -172,14 +172,14 @@ class AppImportTest extends CakeTestCase { */ function testThemePath() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS) )); $path = App::themePath('test_theme'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS; $this->assertEqual($path, $expected); $path = App::themePath('TestTheme'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS; $this->assertEqual($path, $expected); App::build(); @@ -284,8 +284,8 @@ class AppImportTest extends CakeTestCase { */ function testPluginImporting() { App::build(array( - 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $result = App::import('Controller', 'TestPlugin.Tests'); @@ -330,10 +330,10 @@ class AppImportTest extends CakeTestCase { App::build(array( 'helpers' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'helpers' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'helpers' . DS ) )); - App::build(array('vendors' => array(TEST_CAKE_CORE_INCLUDE_PATH))); + App::build(array('vendors' => array(LIBS))); $this->assertFalse(class_exists('BananaHelper'), 'BananaHelper exists, cannot test importing it.'); App::import('Helper', 'Banana'); $this->assertTrue(class_exists('BananaHelper'), 'BananaHelper was not loaded.'); @@ -348,10 +348,10 @@ class AppImportTest extends CakeTestCase { * @return void */ function testFileLoading () { - $file = App::import('File', 'RealFile', false, array(), TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'config.php'); + $file = App::import('File', 'RealFile', false, array(), LIBS . 'config' . DS . 'config.php'); $this->assertTrue($file); - $file = App::import('File', 'NoFile', false, array(), TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'cake' . DS . 'config.php'); + $file = App::import('File', 'NoFile', false, array(), LIBS . 'config' . DS . 'cake' . DS . 'config.php'); $this->assertFalse($file); } @@ -363,12 +363,12 @@ class AppImportTest extends CakeTestCase { */ function testFileLoadingWithArray() { $type = array('type' => 'File', 'name' => 'SomeName', 'parent' => false, - 'file' => TEST_CAKE_CORE_INCLUDE_PATH . DS . 'config' . DS . 'config.php'); + 'file' => LIBS . DS . 'config' . DS . 'config.php'); $file = App::import($type); $this->assertTrue($file); $type = array('type' => 'File', 'name' => 'NoFile', 'parent' => false, - 'file' => TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'cake' . DS . 'config.php'); + 'file' => LIBS . 'config' . DS . 'cake' . DS . 'config.php'); $file = App::import($type); $this->assertFalse($file); } @@ -380,13 +380,13 @@ class AppImportTest extends CakeTestCase { * @return void */ function testFileLoadingReturnValue () { - $file = App::import('File', 'Name', false, array(), TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'config.php', true); + $file = App::import('File', 'Name', false, array(), LIBS . 'config' . DS . 'config.php', true); $this->assertTrue(!empty($file)); $this->assertTrue(isset($file['Cake.version'])); $type = array('type' => 'File', 'name' => 'OtherName', 'parent' => false, - 'file' => TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'config.php', 'return' => true); + 'file' => LIBS . 'config' . DS . 'config.php', 'return' => true); $file = App::import($type); $this->assertTrue(!empty($file)); @@ -400,7 +400,7 @@ class AppImportTest extends CakeTestCase { * @return void */ function testLoadingWithSearch () { - $file = App::import('File', 'NewName', false, array(TEST_CAKE_CORE_INCLUDE_PATH ), 'config.php'); + $file = App::import('File', 'NewName', false, array(LIBS ), 'config.php'); $this->assertTrue($file); $file = App::import('File', 'AnotherNewName', false, array(LIBS), 'config.php'); @@ -414,7 +414,7 @@ class AppImportTest extends CakeTestCase { * @return void */ function testLoadingWithSearchArray () { - $type = array('type' => 'File', 'name' => 'RandomName', 'parent' => false, 'file' => 'config.php', 'search' => array(TEST_CAKE_CORE_INCLUDE_PATH )); + $type = array('type' => 'File', 'name' => 'RandomName', 'parent' => false, 'file' => 'config.php', 'search' => array(LIBS )); $file = App::import($type); $this->assertTrue($file); @@ -476,8 +476,8 @@ class AppImportTest extends CakeTestCase { */ function testLoadingVendor() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'vendors' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors'. DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'vendors' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'vendors'. DS), ), true); ob_start(); diff --git a/lib/Cake/tests/cases/libs/cache.test.php b/lib/Cake/tests/cases/libs/cache.test.php index ad24b70d3..5edbe94fc 100644 --- a/lib/Cake/tests/cases/libs/cache.test.php +++ b/lib/Cake/tests/cases/libs/cache.test.php @@ -92,8 +92,8 @@ class CacheTest extends CakeTestCase { */ function testConfigWithLibAndPluginEngines() { App::build(array( - 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); $settings = array('engine' => 'TestAppCache', 'path' => TMP, 'prefix' => 'cake_test_'); @@ -260,8 +260,8 @@ class CacheTest extends CakeTestCase { */ function testDrop() { App::build(array( - 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); $result = Cache::drop('some_config_that_does_not_exist'); @@ -313,8 +313,8 @@ class CacheTest extends CakeTestCase { */ function testWriteTriggerError() { App::build(array( - 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); Cache::config('test_trigger', array('engine' => 'TestAppCache')); diff --git a/lib/Cake/tests/cases/libs/cake_log.test.php b/lib/Cake/tests/cases/libs/cake_log.test.php index 96b64c96b..a6a3115cf 100644 --- a/lib/Cake/tests/cases/libs/cake_log.test.php +++ b/lib/Cake/tests/cases/libs/cake_log.test.php @@ -49,8 +49,8 @@ class CakeLogTest extends CakeTestCase { */ function testImportingLoggers() { App::build(array( - 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); $result = CakeLog::config('libtest', array( diff --git a/lib/Cake/tests/cases/libs/cake_session.test.php b/lib/Cake/tests/cases/libs/cake_session.test.php index bbed31d39..d0e96aba5 100644 --- a/lib/Cake/tests/cases/libs/cake_session.test.php +++ b/lib/Cake/tests/cases/libs/cake_session.test.php @@ -529,8 +529,8 @@ class CakeSessionTest extends CakeTestCase { */ function testUsingAppLibsHandler() { App::build(array( - 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); Configure::write('Session', array( 'defaults' => 'cake', @@ -551,8 +551,8 @@ class CakeSessionTest extends CakeTestCase { */ function testUsingPluginHandler() { App::build(array( - 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'libs' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'libs' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); Configure::write('Session', array( diff --git a/lib/Cake/tests/cases/libs/config/ini_reader.test.php b/lib/Cake/tests/cases/libs/config/ini_reader.test.php index 6f47c3f69..8022ca69e 100644 --- a/lib/Cake/tests/cases/libs/config/ini_reader.test.php +++ b/lib/Cake/tests/cases/libs/config/ini_reader.test.php @@ -35,7 +35,7 @@ class IniReaderTest extends CakeTestCase { */ function setup() { parent::setup(); - $this->path = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config'. DS; + $this->path = LIBS . 'tests' . DS . 'test_app' . DS . 'config'. DS; } /** diff --git a/lib/Cake/tests/cases/libs/config/php_reader.test.php b/lib/Cake/tests/cases/libs/config/php_reader.test.php index bb89378ba..29d47ff89 100644 --- a/lib/Cake/tests/cases/libs/config/php_reader.test.php +++ b/lib/Cake/tests/cases/libs/config/php_reader.test.php @@ -27,7 +27,7 @@ class PhpReaderTest extends CakeTestCase { */ function setUp() { parent::setUp(); - $this->path = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config'. DS; + $this->path = LIBS . 'tests' . DS . 'test_app' . DS . 'config'. DS; } /** * test reading files @@ -81,7 +81,7 @@ class PhpReaderTest extends CakeTestCase { */ function testReadPluginValue() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); $reader = new PhpReader($this->path); $result = $reader->read('TestPlugin.load'); diff --git a/lib/Cake/tests/cases/libs/configure.test.php b/lib/Cake/tests/cases/libs/configure.test.php index 6fb85efed..16717b39a 100644 --- a/lib/Cake/tests/cases/libs/configure.test.php +++ b/lib/Cake/tests/cases/libs/configure.test.php @@ -200,7 +200,7 @@ class ConfigureTest extends CakeTestCase { * @return void */ function testLoad() { - Configure::config('test', new PhpReader(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config' . DS)); + Configure::config('test', new PhpReader(LIBS . 'tests' . DS . 'test_app' . DS . 'config' . DS)); $result = Configure::load('var_test', 'test'); $this->assertTrue($result); @@ -215,7 +215,7 @@ class ConfigureTest extends CakeTestCase { * @return void */ function testLoadPlugin() { - App::build(array('plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)), true); + App::build(array('plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)), true); Configure::config('test', new PhpReader()); $result = Configure::load('test_plugin.load', 'test'); diff --git a/lib/Cake/tests/cases/libs/controller/component.test.php b/lib/Cake/tests/cases/libs/controller/component.test.php index 43dff8cd6..1d1464d6d 100644 --- a/lib/Cake/tests/cases/libs/controller/component.test.php +++ b/lib/Cake/tests/cases/libs/controller/component.test.php @@ -53,7 +53,7 @@ class ParamTestComponent extends Component { * @access public * @return void */ - function initialize($controllerz) { + function initialize(&$controller, $settings) { foreach ($settings as $key => $value) { if (is_numeric($key)) { $this->{$value} = true; @@ -121,7 +121,7 @@ class AppleComponent extends Component { * @access public * @return void */ - function startup($controller) { + function startup(&$controller) { $this->testName = $controller->name; } } @@ -149,7 +149,7 @@ class OrangeComponent extends Component { * @access public * @return void */ - function initialize($controller) { + function initialize(&$controller) { $this->Controller = $controller; $this->Banana->testField = 'OrangeField'; } @@ -160,7 +160,7 @@ class OrangeComponent extends Component { * @param Controller $controller * @return string */ - public function startup($controller) { + public function startup(&$controller) { $controller->foo = 'pass'; } } @@ -187,7 +187,7 @@ class BananaComponent extends Component { * @param Controller $controller * @return string */ - public function startup($controller) { + public function startup(&$controller) { $controller->bar = 'fail'; } } @@ -261,7 +261,7 @@ class ComponentTest extends CakeTestCase { function setUp() { $this->_pluginPaths = App::path('plugins'); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); } diff --git a/lib/Cake/tests/cases/libs/controller/component_collection.test.php b/lib/Cake/tests/cases/libs/controller/component_collection.test.php index acc98ed28..ab0ea91de 100644 --- a/lib/Cake/tests/cases/libs/controller/component_collection.test.php +++ b/lib/Cake/tests/cases/libs/controller/component_collection.test.php @@ -89,7 +89,7 @@ class ComponentCollectionTest extends CakeTestCase { */ function testLoadPluginComponent() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), )); $result = $this->Components->load('TestPlugin.OtherComponent'); $this->assertType('OtherComponentComponent', $result, 'Component class is wrong.'); diff --git a/lib/Cake/tests/cases/libs/controller/components/acl.test.php b/lib/Cake/tests/cases/libs/controller/components/acl.test.php index 06a219b4a..e2415797c 100644 --- a/lib/Cake/tests/cases/libs/controller/components/acl.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/acl.test.php @@ -268,7 +268,7 @@ class IniAclTest extends CakeTestCase { * @return void */ function testCheck() { - $iniFile = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config'. DS . 'acl.ini.php'; + $iniFile = LIBS . 'tests' . DS . 'test_app' . DS . 'config'. DS . 'acl.ini.php'; $Ini = new IniAcl(); $Ini->config = $Ini->readConfigFile($iniFile); @@ -291,7 +291,7 @@ class IniAclTest extends CakeTestCase { * @return void */ function testCheckArray() { - $iniFile = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config'. DS . 'acl.ini.php'; + $iniFile = LIBS . 'tests' . DS . 'test_app' . DS . 'config'. DS . 'acl.ini.php'; $Ini = new IniAcl(); $Ini->config = $Ini->readConfigFile($iniFile); diff --git a/lib/Cake/tests/cases/libs/controller/components/auth.test.php b/lib/Cake/tests/cases/libs/controller/components/auth.test.php index 35f0356bc..dda510668 100644 --- a/lib/Cake/tests/cases/libs/controller/components/auth.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/auth.test.php @@ -53,7 +53,7 @@ class TestAuthComponent extends AuthComponent { * @access public * @return void */ - function _stop($status = 0) { + function _stop() { $this->testStop = true; } } @@ -499,8 +499,7 @@ class AuthTest extends CakeTestCase { ); $this->Controller->beforeFilter(); - $view = new View($this->Controller); - ClassRegistry::addObject('view', $view); + ClassRegistry::addObject('view', new View($this->Controller)); $this->Controller->Session->delete('Auth'); $this->Controller->Session->delete('Message.auth'); @@ -1396,8 +1395,8 @@ class AuthTest extends CakeTestCase { // Adding plugins Cache::delete('object_map', '_cake_core_'); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS) ), true); App::objects('plugin', null, false); @@ -1454,7 +1453,7 @@ class AuthTest extends CakeTestCase { */ function testAjaxLogin() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $_SERVER['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest"; diff --git a/lib/Cake/tests/cases/libs/controller/components/email.test.php b/lib/Cake/tests/cases/libs/controller/components/email.test.php index 2863308b0..36db895a7 100755 --- a/lib/Cake/tests/cases/libs/controller/components/email.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/email.test.php @@ -230,11 +230,10 @@ class EmailComponentTest extends CakeTestCase { $this->Controller->Components->init($this->Controller); $this->Controller->EmailTest->initialize($this->Controller, array()); - $view = new View($this->Controller); - ClassRegistry::addObject('view', $view); + ClassRegistry::addObject('view', new View($this->Controller)); App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); } @@ -754,7 +753,7 @@ HTMLBLOC; */ function testMessageRetrievalWithoutTemplate() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $this->Controller->EmailTest->to = 'postmaster@localhost'; @@ -792,7 +791,7 @@ HTMLBLOC; */ function testMessageRetrievalWithTemplate() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $this->Controller->set('value', 22091985); @@ -1124,8 +1123,8 @@ HTMLBLOC; function testPluginCustomViewClass() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $this->Controller->view = 'TestPlugin.Email'; diff --git a/lib/Cake/tests/cases/libs/controller/components/request_handler.test.php b/lib/Cake/tests/cases/libs/controller/components/request_handler.test.php index ddafab1f6..112ffa472 100644 --- a/lib/Cake/tests/cases/libs/controller/components/request_handler.test.php +++ b/lib/Cake/tests/cases/libs/controller/components/request_handler.test.php @@ -673,7 +673,7 @@ class RequestHandlerComponentTest extends CakeTestCase { */ function testAjaxRedirectAsRequestAction() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) ), true); $this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components)); @@ -702,7 +702,7 @@ class RequestHandlerComponentTest extends CakeTestCase { */ function testAjaxRedirectAsRequestActionStillRenderingLayout() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) ), true); $this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components)); diff --git a/lib/Cake/tests/cases/libs/controller/controller.test.php b/lib/Cake/tests/cases/libs/controller/controller.test.php index fd36df0fa..97003eb8d 100644 --- a/lib/Cake/tests/cases/libs/controller/controller.test.php +++ b/lib/Cake/tests/cases/libs/controller/controller.test.php @@ -107,13 +107,13 @@ class ControllerPost extends CakeTestModel { * @access public * @return void */ - function find($conditions = null, $fields = array(), $order = null, $recursive = null) { - if ($conditions == 'popular') { + function find($type, $options = array()) { + if ($type == 'popular') { $conditions = array($this->name . '.' . $this->primaryKey .' > ' => '1'); - $options = Set::merge($fields, compact('conditions')); - return parent::find('all', $fields); + $options = Set::merge($options, compact('conditions')); + return parent::find('all', $options); } - return parent::find($conditions, $fields); + return parent::find($type, $options); } } @@ -320,7 +320,7 @@ class TestComponent extends Object { * @access public * @return void */ - function initialize($controller) { + function initialize(&$controller) { } /** @@ -329,7 +329,7 @@ class TestComponent extends Object { * @access public * @return void */ - function startup($controller) { + function startup(&$controller) { } /** * shutdown method @@ -337,14 +337,14 @@ class TestComponent extends Object { * @access public * @return void */ - function shutdown($controller) { + function shutdown(&$controller) { } /** * beforeRender callback * * @return void */ - function beforeRender($controller) { + function beforeRender(&$controller) { if ($this->viewclass) { $controller->view = $this->viewclass; } @@ -442,9 +442,9 @@ class ControllerTest extends CakeTestCase { */ function testLoadModelInPlugins() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'controllers' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'controllers' . DS), - 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'controllers' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'controllers' . DS), + 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS) )); App::uses('TestPluginController', 'TestPlugin.Controller'); @@ -491,7 +491,7 @@ class ControllerTest extends CakeTestCase { unset($Controller); - App::build(array('plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS))); + App::build(array('plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS))); $Controller = new Controller($request); $Controller->uses = array('TestPlugin.TestPluginPost'); @@ -581,7 +581,7 @@ class ControllerTest extends CakeTestCase { $this->assertEqual($result, $expected); App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $Controller = new Controller($request); $Controller->response = $this->getMock('CakeResponse', array('_sendHeader')); @@ -643,7 +643,7 @@ class ControllerTest extends CakeTestCase { */ function testRender() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) ), true); $request = new CakeRequest('controller_posts/index'); @@ -685,7 +685,7 @@ class ControllerTest extends CakeTestCase { $core = App::core('views'); App::build(array( 'views' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS, + LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS, $core[0] ) ), true); diff --git a/lib/Cake/tests/cases/libs/controller/pages_controller.test.php b/lib/Cake/tests/cases/libs/controller/pages_controller.test.php index ce3d7a0ec..be422e227 100644 --- a/lib/Cake/tests/cases/libs/controller/pages_controller.test.php +++ b/lib/Cake/tests/cases/libs/controller/pages_controller.test.php @@ -28,6 +28,16 @@ App::uses('PagesController', 'Controller'); */ class PagesControllerTest extends CakeTestCase { +/** + * endTest method + * + * @access public + * @return void + */ + function endTest() { + App::build(); + } + /** * testDisplay method * @@ -36,7 +46,7 @@ class PagesControllerTest extends CakeTestCase { */ function testDisplay() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS, TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS, LIBS . 'libs' . DS . 'view' . DS) )); $Pages = new PagesController(new CakeRequest(null, false)); diff --git a/lib/Cake/tests/cases/libs/controller/scaffold.test.php b/lib/Cake/tests/cases/libs/controller/scaffold.test.php index 147380c7f..67ec7e9f2 100644 --- a/lib/Cake/tests/cases/libs/controller/scaffold.test.php +++ b/lib/Cake/tests/cases/libs/controller/scaffold.test.php @@ -93,8 +93,8 @@ class TestScaffoldMock extends Scaffold { * * @param unknown_type $params */ - function _scaffold(CakeRequest $request) { - $this->_params = $request; + function _scaffold($params) { + $this->_params = $params; } /** @@ -287,8 +287,8 @@ class ScaffoldViewTest extends CakeTestCase { $this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader')); App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); } @@ -315,35 +315,35 @@ class ScaffoldViewTest extends CakeTestCase { $this->Controller->request->params['action'] = 'index'; $ScaffoldView = new TestScaffoldView($this->Controller); $result = $ScaffoldView->testGetFilename('index'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'index.ctp'; + $expected = LIBS . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'index.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('edit'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'form.ctp'; + $expected = LIBS . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('add'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'form.ctp'; + $expected = LIBS . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('view'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'view.ctp'; + $expected = LIBS . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'view.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('admin_index'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'index.ctp'; + $expected = LIBS . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'index.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('admin_view'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'view.ctp'; + $expected = LIBS . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'view.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('admin_edit'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'form.ctp'; + $expected = LIBS . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('admin_add'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'form.ctp'; + $expected = LIBS . 'libs' . DS . 'view' . DS . 'scaffolds' . DS . 'form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('error'); @@ -357,11 +357,11 @@ class ScaffoldViewTest extends CakeTestCase { $ScaffoldView = new TestScaffoldView($Controller); $result = $ScaffoldView->testGetFilename('admin_edit'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' .DS . 'views' . DS . 'posts' . DS . 'scaffold.form.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' .DS . 'views' . DS . 'posts' . DS . 'scaffold.form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('edit'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' .DS . 'views' . DS . 'posts' . DS . 'scaffold.form.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' .DS . 'views' . DS . 'posts' . DS . 'scaffold.form.ctp'; $this->assertEqual($result, $expected); $Controller = new ScaffoldMockController($this->request); @@ -376,12 +376,12 @@ class ScaffoldViewTest extends CakeTestCase { $ScaffoldView = new TestScaffoldView($Controller); $result = $ScaffoldView->testGetFilename('admin_add'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS . 'tests' . DS . 'scaffold.form.ctp'; $this->assertEqual($result, $expected); $result = $ScaffoldView->testGetFilename('add'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS . 'tests' . DS . 'scaffold.form.ctp'; $this->assertEqual($result, $expected); @@ -400,7 +400,7 @@ class ScaffoldViewTest extends CakeTestCase { $ScaffoldView = new TestScaffoldView($this->Controller); $result = $ScaffoldView->testGetFilename('index'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'posts' . DS . 'scaffold.index.ctp'; $this->assertEqual($result, $expected); } diff --git a/lib/Cake/tests/cases/libs/dispatcher.test.php b/lib/Cake/tests/cases/libs/dispatcher.test.php index d950510d8..008a286cf 100644 --- a/lib/Cake/tests/cases/libs/dispatcher.test.php +++ b/lib/Cake/tests/cases/libs/dispatcher.test.php @@ -787,7 +787,7 @@ class DispatcherTest extends CakeTestCase { */ public function testDispatchBasic() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $Dispatcher = new TestDispatcher(); Configure::write('App.baseUrl', '/index.php'); @@ -1078,7 +1078,7 @@ class DispatcherTest extends CakeTestCase { } Router::reload(); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); App::objects('plugin', null, false); @@ -1178,7 +1178,7 @@ class DispatcherTest extends CakeTestCase { public function testTestPluginDispatch() { $Dispatcher = new TestDispatcher(); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); App::objects('plugin', null, false); Router::reload(); @@ -1236,9 +1236,9 @@ class DispatcherTest extends CakeTestCase { Router::reload(); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'vendors' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors'. DS), - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'vendors' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'vendors'. DS), + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $Dispatcher = new TestDispatcher(); @@ -1262,21 +1262,21 @@ class DispatcherTest extends CakeTestCase { $Dispatcher->dispatch(new CakeRequest('theme/test_theme/flash/theme_test.swf')); $result = ob_get_clean(); - $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'webroot' . DS . 'flash' . DS . 'theme_test.swf'); + $file = file_get_contents(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'webroot' . DS . 'flash' . DS . 'theme_test.swf'); $this->assertEqual($file, $result); $this->assertEqual('this is just a test to load swf file from the theme.', $result); ob_start(); $Dispatcher->dispatch(new CakeRequest('theme/test_theme/pdfs/theme_test.pdf')); $result = ob_get_clean(); - $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'webroot' . DS . 'pdfs' . DS . 'theme_test.pdf'); + $file = file_get_contents(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'webroot' . DS . 'pdfs' . DS . 'theme_test.pdf'); $this->assertEqual($file, $result); $this->assertEqual('this is just a test to load pdf file from the theme.', $result); ob_start(); $Dispatcher->dispatch(new CakeRequest('theme/test_theme/img/test.jpg')); $result = ob_get_clean(); - $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'webroot' . DS . 'img' . DS . 'test.jpg'); + $file = file_get_contents(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'webroot' . DS . 'img' . DS . 'test.jpg'); $this->assertEqual($file, $result); ob_start(); @@ -1297,20 +1297,20 @@ class DispatcherTest extends CakeTestCase { ob_start(); $Dispatcher->asset('test_plugin/root.js'); $result = ob_get_clean(); - $expected = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'webroot' . DS . 'root.js'); + $expected = file_get_contents(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'webroot' . DS . 'root.js'); $this->assertEqual($result, $expected); ob_start(); $Dispatcher->dispatch(new CakeRequest('test_plugin/flash/plugin_test.swf')); $result = ob_get_clean(); - $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'webroot' . DS . 'flash' . DS . 'plugin_test.swf'); + $file = file_get_contents(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'webroot' . DS . 'flash' . DS . 'plugin_test.swf'); $this->assertEqual($file, $result); $this->assertEqual('this is just a test to load swf file from the plugin.', $result); ob_start(); $Dispatcher->dispatch(new CakeRequest('test_plugin/pdfs/plugin_test.pdf')); $result = ob_get_clean(); - $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'webroot' . DS . 'pdfs' . DS . 'plugin_test.pdf'); + $file = file_get_contents(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'webroot' . DS . 'pdfs' . DS . 'plugin_test.pdf'); $this->assertEqual($file, $result); $this->assertEqual('this is just a test to load pdf file from the plugin.', $result); @@ -1332,7 +1332,7 @@ class DispatcherTest extends CakeTestCase { ob_start(); $Dispatcher->asset('test_plugin/img/cake.icon.gif'); $result = ob_get_clean(); - $file = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' .DS . 'webroot' . DS . 'img' . DS . 'cake.icon.gif'); + $file = file_get_contents(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' .DS . 'webroot' . DS . 'img' . DS . 'cake.icon.gif'); $this->assertEqual($file, $result); ob_start(); @@ -1435,7 +1435,7 @@ class DispatcherTest extends CakeTestCase { Router::connect('/', array('controller' => 'test_cached_pages', 'action' => 'index')); App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS), + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS), ), true); $dispatcher = new TestDispatcher(); diff --git a/lib/Cake/tests/cases/libs/error/error_handler.test.php b/lib/Cake/tests/cases/libs/error/error_handler.test.php index dbdc0c8fc..ece3a77ec 100644 --- a/lib/Cake/tests/cases/libs/error/error_handler.test.php +++ b/lib/Cake/tests/cases/libs/error/error_handler.test.php @@ -39,8 +39,8 @@ class ErrorHandlerTest extends CakeTestCase { function setUp() { App::build(array( 'views' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS, - TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS, + LIBS . 'libs' . DS . 'view' . DS ) ), true); Router::reload(); diff --git a/lib/Cake/tests/cases/libs/error/exception_renderer.test.php b/lib/Cake/tests/cases/libs/error/exception_renderer.test.php index aaf04e4e7..4d130f62d 100644 --- a/lib/Cake/tests/cases/libs/error/exception_renderer.test.php +++ b/lib/Cake/tests/cases/libs/error/exception_renderer.test.php @@ -69,7 +69,7 @@ class BlueberryComponent extends Component { * @access public * @return void */ - function initialize($controller) { + function initialize(&$controller) { $this->testName = 'BlueberryComponent'; } } @@ -162,8 +162,8 @@ class ExceptionRendererTest extends CakeTestCase { function setUp() { App::build(array( 'views' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS, - TEST_CAKE_CORE_INCLUDE_PATH . 'libs' . DS . 'view' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS, + LIBS . 'libs' . DS . 'view' . DS ) ), true); Router::reload(); diff --git a/lib/Cake/tests/cases/libs/folder.test.php b/lib/Cake/tests/cases/libs/folder.test.php index 65ca682ab..d8b220700 100644 --- a/lib/Cake/tests/cases/libs/folder.test.php +++ b/lib/Cake/tests/cases/libs/folder.test.php @@ -149,7 +149,7 @@ class FolderTest extends CakeTestCase { * @return void */ function testOperations() { - $path = TEST_CAKE_CORE_INCLUDE_PATH . 'console' . DS . 'templates' . DS . 'skel'; + $path = LIBS . 'console' . DS . 'templates' . DS . 'skel'; $Folder = new Folder($path); $result = is_dir($Folder->pwd()); @@ -222,7 +222,7 @@ class FolderTest extends CakeTestCase { public function testChmod() { $this->skipIf(DIRECTORY_SEPARATOR === '\\', '%s Folder permissions tests not supported on Windows'); - $path = TEST_CAKE_CORE_INCLUDE_PATH . 'console' . DS . 'templates' . DS . 'skel'; + $path = LIBS . 'console' . DS . 'templates' . DS . 'skel'; $Folder = new Folder($path); $subdir = 'test_folder_new'; @@ -318,42 +318,42 @@ class FolderTest extends CakeTestCase { $Folder = new Folder(); $expected = array( array( - TEST_CAKE_CORE_INCLUDE_PATH . 'config', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' + LIBS . 'config', + LIBS . 'config' . DS . 'unicode', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' ), array( - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'config.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'paths.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0080_00ff.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0100_017f.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0180_024F.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0250_02af.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0370_03ff.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0400_04ff.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0500_052f.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0530_058f.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '1e00_1eff.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '1f00_1fff.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2100_214f.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2150_218f.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2460_24ff.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c00_2c5f.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c60_2c7f.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c80_2cff.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . 'ff00_ffef.php' + LIBS . 'config' . DS . 'config.php', + LIBS . 'config' . DS . 'paths.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0080_00ff.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0100_017f.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0180_024F.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0250_02af.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0370_03ff.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0400_04ff.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0500_052f.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '0530_058f.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '1e00_1eff.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '1f00_1fff.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2100_214f.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2150_218f.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2460_24ff.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c00_2c5f.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c60_2c7f.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c80_2cff.php', + LIBS . 'config' . DS . 'unicode' . DS . 'casefolding' . DS . 'ff00_ffef.php' ) ); - $result = $Folder->tree(TEST_CAKE_CORE_INCLUDE_PATH . 'config', false); + $result = $Folder->tree(LIBS . 'config', false); $this->assertIdentical(array_diff($expected[0], $result[0]), array()); $this->assertIdentical(array_diff($result[0], $expected[0]), array()); - $result = $Folder->tree(TEST_CAKE_CORE_INCLUDE_PATH . 'config', false, 'dir'); + $result = $Folder->tree(LIBS . 'config', false, 'dir'); $this->assertIdentical(array_diff($expected[0], $result), array()); $this->assertIdentical(array_diff($result, $expected[0]), array()); - $result = $Folder->tree(TEST_CAKE_CORE_INCLUDE_PATH . 'config', false, 'files'); + $result = $Folder->tree(LIBS . 'config', false, 'files'); $this->assertIdentical(array_diff($expected[1], $result), array()); $this->assertIdentical(array_diff($result, $expected[1]), array()); } @@ -490,7 +490,7 @@ class FolderTest extends CakeTestCase { */ function testFind() { $Folder = new Folder(); - $Folder->cd(TEST_CAKE_CORE_INCLUDE_PATH . 'config'); + $Folder->cd(LIBS . 'config'); $result = $Folder->find(); $expected = array('config.php', 'paths.php'); $this->assertIdentical(array_diff($expected, $result), array()); @@ -543,19 +543,19 @@ class FolderTest extends CakeTestCase { */ function testFindRecursive() { $Folder = new Folder(); - $Folder->cd(TEST_CAKE_CORE_INCLUDE_PATH); + $Folder->cd(LIBS); $result = $Folder->findRecursive('(config|paths)\.php'); $expected = array( - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'config.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'paths.php' + LIBS . 'config' . DS . 'config.php', + LIBS . 'config' . DS . 'paths.php' ); $this->assertIdentical(array_diff($expected, $result), array()); $this->assertIdentical(array_diff($result, $expected), array()); $result = $Folder->findRecursive('(config|paths)\.php', true); $expected = array( - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'config.php', - TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'paths.php' + LIBS . 'config' . DS . 'config.php', + LIBS . 'config' . DS . 'paths.php' ); $this->assertIdentical($result, $expected); @@ -589,7 +589,7 @@ class FolderTest extends CakeTestCase { ); $this->assertIdentical($result, $expected); - $Folder->cd(TEST_CAKE_CORE_INCLUDE_PATH . 'config'); + $Folder->cd(LIBS . 'config'); $Folder->cd(TMP); $Folder->delete($Folder->pwd() . DS . 'testme'); $File->delete(); diff --git a/lib/Cake/tests/cases/libs/html_coverage_report.test.php b/lib/Cake/tests/cases/libs/html_coverage_report.test.php index 325271131..d07aeb29a 100644 --- a/lib/Cake/tests/cases/libs/html_coverage_report.test.php +++ b/lib/Cake/tests/cases/libs/html_coverage_report.test.php @@ -41,7 +41,7 @@ class HtmlCoverageReportTest extends CakeTestCase { function testGetPathFilter() { $this->Coverage->appTest = false; $result = $this->Coverage->getPathFilter(); - $this->assertEquals(TEST_CAKE_CORE_INCLUDE_PATH, $result); + $this->assertEquals(LIBS, $result); $this->Coverage->appTest = true; $result = $this->Coverage->getPathFilter(); @@ -60,7 +60,7 @@ class HtmlCoverageReportTest extends CakeTestCase { */ function testFilterCoverageDataByPathRemovingElements() { $data = array( - TEST_CAKE_CORE_INCLUDE_PATH . 'dispatcher.php' => array( + LIBS . 'dispatcher.php' => array( 10 => -1, 12 => 1 ), @@ -70,8 +70,8 @@ class HtmlCoverageReportTest extends CakeTestCase { ) ); $this->Coverage->setCoverage($data); - $result = $this->Coverage->filterCoverageDataByPath(TEST_CAKE_CORE_INCLUDE_PATH); - $this->assertTrue(isset($result[TEST_CAKE_CORE_INCLUDE_PATH . 'dispatcher.php'])); + $result = $this->Coverage->filterCoverageDataByPath(LIBS); + $this->assertTrue(isset($result[LIBS . 'dispatcher.php'])); $this->assertFalse(isset($result[APP . 'app_model.php'])); } diff --git a/lib/Cake/tests/cases/libs/i18n.test.php b/lib/Cake/tests/cases/libs/i18n.test.php index a446df605..f481835e3 100644 --- a/lib/Cake/tests/cases/libs/i18n.test.php +++ b/lib/Cake/tests/cases/libs/i18n.test.php @@ -36,8 +36,8 @@ class I18nTest extends CakeTestCase { function setUp() { Cache::delete('object_map', '_cake_core_'); App::build(array( - 'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'locales' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'locale' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) ), true); App::objects('plugin', null, false); } @@ -2434,7 +2434,7 @@ class I18nTest extends CakeTestCase { */ function testPluginTranslation() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); Configure::write('Config.language', 'po'); diff --git a/lib/Cake/tests/cases/libs/model/cake_schema.test.php b/lib/Cake/tests/cases/libs/model/cake_schema.test.php index 5132fb557..b62e96ecb 100644 --- a/lib/Cake/tests/cases/libs/model/cake_schema.test.php +++ b/lib/Cake/tests/cases/libs/model/cake_schema.test.php @@ -659,7 +659,7 @@ class CakeSchemaTest extends CakeTestCase { function testSchemaReadWithPlugins() { App::objects('model', null, false); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $Schema = new CakeSchema(); @@ -977,7 +977,7 @@ class CakeSchemaTest extends CakeTestCase { */ function testSchemaLoadingFromPlugin() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $Other = $this->Schema->load(array('name' => 'TestPluginApp', 'plugin' => 'TestPlugin')); $this->assertEqual($Other->name, 'TestPluginApp'); diff --git a/lib/Cake/tests/cases/libs/model/connection_manager.test.php b/lib/Cake/tests/cases/libs/model/connection_manager.test.php index 1798fb6b9..c121cee07 100644 --- a/lib/Cake/tests/cases/libs/model/connection_manager.test.php +++ b/lib/Cake/tests/cases/libs/model/connection_manager.test.php @@ -99,7 +99,7 @@ class ConnectionManagerTest extends CakeTestCase { */ function testGetPluginDataSource() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $name = 'test_source'; @@ -121,7 +121,7 @@ class ConnectionManagerTest extends CakeTestCase { */ function testGetPluginDataSourceAndPluginDriver() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $name = 'test_plugin_source_and_driver'; @@ -145,7 +145,7 @@ class ConnectionManagerTest extends CakeTestCase { */ function testGetLocalDataSourceAndPluginDriver() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $name = 'test_local_source_and_plugin_driver'; @@ -168,8 +168,8 @@ class ConnectionManagerTest extends CakeTestCase { */ function testGetPluginDataSourceAndLocalDriver() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'datasources' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS . 'datasources' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'datasources' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS . 'datasources' . DS) )); $name = 'test_plugin_source_and_local_driver'; @@ -284,8 +284,8 @@ class ConnectionManagerTest extends CakeTestCase { */ function testConnectionData() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'datasources' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS . 'datasources' . DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'datasources' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS . 'datasources' . DS) )); $expected = array( diff --git a/lib/Cake/tests/cases/libs/object.test.php b/lib/Cake/tests/cases/libs/object.test.php index f5ad44cad..cc10aa86b 100644 --- a/lib/Cake/tests/cases/libs/object.test.php +++ b/lib/Cake/tests/cases/libs/object.test.php @@ -485,9 +485,9 @@ class ObjectTest extends CakeTestCase { Configure::write('Cache.disable', false); App::build(array( - 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins'. DS), - 'behaviors' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models'. DS . 'behaviors' . DS), + 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins'. DS), + 'behaviors' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models'. DS . 'behaviors' . DS), ), true); $this->assertFalse(class_exists('PersisterOneBehaviorBehavior')); @@ -546,8 +546,8 @@ class ObjectTest extends CakeTestCase { $this->assertFalse(class_exists('ContainableBehavior')); App::build(array( - 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS), - 'behaviors' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models'. DS . 'behaviors' . DS), + 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS), + 'behaviors' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models'. DS . 'behaviors' . DS), ), true); $this->assertFalse(class_exists('PersistOneBehaviorBehavior')); @@ -690,9 +690,9 @@ class ObjectTest extends CakeTestCase { */ function testRequestAction() { App::build(array( - 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS), - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS), - 'controllers' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'controllers' . DS) + 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS), + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS), + 'controllers' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'controllers' . DS) )); $result = $this->object->requestAction(''); $this->assertFalse($result); @@ -730,7 +730,7 @@ class ObjectTest extends CakeTestCase { */ function testRequestActionPlugins() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), )); App::objects('plugin', null, false); Router::reload(); @@ -770,9 +770,9 @@ class ObjectTest extends CakeTestCase { */ function testRequestActionArray() { App::build(array( - 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS), - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS), - 'controllers' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'controllers' . DS) + 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS), + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS), + 'controllers' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'controllers' . DS) )); $result = $this->object->requestAction( diff --git a/lib/Cake/tests/cases/libs/router.test.php b/lib/Cake/tests/cases/libs/router.test.php index fc01a246c..8b58b521b 100644 --- a/lib/Cake/tests/cases/libs/router.test.php +++ b/lib/Cake/tests/cases/libs/router.test.php @@ -1177,7 +1177,7 @@ class RouterTest extends CakeTestCase { $paths = App::path('plugins'); App::build(array( 'plugins' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS ) ), true); App::objects('plugin', null, false); @@ -2191,7 +2191,7 @@ class RouterTest extends CakeTestCase { function testConnectDefaultRoutes() { App::build(array( 'plugins' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS ) ), true); App::objects('plugin', null, false); diff --git a/lib/Cake/tests/cases/libs/view/helper.test.php b/lib/Cake/tests/cases/libs/view/helper.test.php index ce8f655cb..063ae9fc9 100644 --- a/lib/Cake/tests/cases/libs/view/helper.test.php +++ b/lib/Cake/tests/cases/libs/view/helper.test.php @@ -553,8 +553,8 @@ class HelperTest extends CakeTestCase { $_timestamp = Configure::read('Asset.timestamp'); Configure::write('Asset.timestamp', 'force'); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS), )); $result = $this->Helper->assetTimestamp('/test_plugin/css/test_plugin_asset.css'); @@ -793,7 +793,7 @@ class HelperTest extends CakeTestCase { $this->Helper->theme = 'test_theme'; App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $result = $this->Helper->webroot('/img/cake.power.gif'); @@ -805,7 +805,7 @@ class HelperTest extends CakeTestCase { $this->assertEqual($result, $expected); $webRoot = Configure::read('App.www_root'); - Configure::write('App.www_root', TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'webroot' . DS); + Configure::write('App.www_root', LIBS . 'tests' . DS . 'test_app' . DS . 'webroot' . DS); $result = $this->Helper->webroot('/img/cake.power.gif'); $expected = '/theme/test_theme/img/cake.power.gif'; @@ -859,7 +859,7 @@ class HelperTest extends CakeTestCase { */ function testLazyLoadingHelpers() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), )); $Helper = new TestHelper($this->View); $this->assertType('OtherHelperHelper', $Helper->OtherHelper); diff --git a/lib/Cake/tests/cases/libs/view/helper_collection.test.php b/lib/Cake/tests/cases/libs/view/helper_collection.test.php index 54aa16cde..6ca842e7f 100644 --- a/lib/Cake/tests/cases/libs/view/helper_collection.test.php +++ b/lib/Cake/tests/cases/libs/view/helper_collection.test.php @@ -87,7 +87,7 @@ class HelperCollectionTest extends CakeTestCase { */ function testLoadPluginHelper() { App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), )); $result = $this->Helpers->load('TestPlugin.OtherHelper'); $this->assertType('OtherHelperHelper', $result, 'Helper class is wrong.'); diff --git a/lib/Cake/tests/cases/libs/view/helpers/cache.test.php b/lib/Cake/tests/cases/libs/view/helpers/cache.test.php index c56463a85..db4b03f02 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/cache.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/cache.test.php @@ -86,7 +86,7 @@ class CacheHelperTest extends CakeTestCase { Configure::write('Cache.check', true); Configure::write('Cache.disable', false); App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) ), true); } diff --git a/lib/Cake/tests/cases/libs/view/helpers/html.test.php b/lib/Cake/tests/cases/libs/view/helpers/html.test.php index 4d3a7dac1..a8fb606b6 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/html.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/html.test.php @@ -327,7 +327,7 @@ class HtmlHelperTest extends CakeTestCase { $file = new File($testfile, true); App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); Configure::write('Asset.timestamp', true); Configure::write('debug', 1); @@ -362,10 +362,10 @@ class HtmlHelperTest extends CakeTestCase { */ function testThemeAssetsInMainWebrootPath() { App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $webRoot = Configure::read('App.www_root'); - Configure::write('App.www_root', TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'webroot' . DS); + Configure::write('App.www_root', LIBS . 'tests' . DS . 'test_app' . DS . 'webroot' . DS); $this->Html->theme = 'test_theme'; $result = $this->Html->css('webroot_test'); @@ -608,7 +608,7 @@ class HtmlHelperTest extends CakeTestCase { $file = new File($testfile, true); App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $this->Html->webroot = '/'; diff --git a/lib/Cake/tests/cases/libs/view/helpers/session.test.php b/lib/Cake/tests/cases/libs/view/helpers/session.test.php index 2fa1dad0a..eb278b9de 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/session.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/session.test.php @@ -129,7 +129,7 @@ class SessionHelperTest extends CakeTestCase { $this->assertEqual($result, $expected); App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $result = $this->Session->flash('notification', true); $result = str_replace("\r\n", "\n", $result); diff --git a/lib/Cake/tests/cases/libs/view/helpers/time.test.php b/lib/Cake/tests/cases/libs/view/helpers/time.test.php index d5ba62b61..885e17674 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/time.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/time.test.php @@ -658,7 +658,7 @@ class TimeHelperTest extends CakeTestCase { */ function testConvertSpecifiers() { App::build(array( - 'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS) + 'locales' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'locale' . DS) ), true); Configure::write('Config.language', 'time_test'); $time = strtotime('Thu Jan 14 11:43:39 2010'); @@ -748,7 +748,7 @@ class TimeHelperTest extends CakeTestCase { */ function testI18nFormat() { App::build(array( - 'locales' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'locale' . DS) + 'locales' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'locale' . DS) ), true); Configure::write('Config.language', 'time_test'); $time = strtotime('Thu Jan 14 13:59:28 2010'); diff --git a/lib/Cake/tests/cases/libs/view/media.test.php b/lib/Cake/tests/cases/libs/view/media.test.php index a9352f5d9..22d633d02 100644 --- a/lib/Cake/tests/cases/libs/view/media.test.php +++ b/lib/Cake/tests/cases/libs/view/media.test.php @@ -74,7 +74,7 @@ class MediaViewTest extends CakeTestCase { */ function testRender() { $this->MediaView->viewVars = array( - 'path' => TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS .'css' . DS, + 'path' => LIBS . 'tests' . DS . 'test_app' . DS . 'vendors' . DS .'css' . DS, 'id' => 'test_asset.css', 'extension' => 'css', ); @@ -120,7 +120,7 @@ class MediaViewTest extends CakeTestCase { */ function testConnectionAborted() { $this->MediaView->viewVars = array( - 'path' => TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS .'css' . DS, + 'path' => LIBS . 'tests' . DS . 'test_app' . DS . 'vendors' . DS .'css' . DS, 'id' => 'test_asset.css', 'extension' => 'css', ); @@ -146,7 +146,7 @@ class MediaViewTest extends CakeTestCase { */ function testConnectionAbortedOnBuffering() { $this->MediaView->viewVars = array( - 'path' => TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS .'css' . DS, + 'path' => LIBS . 'tests' . DS . 'test_app' . DS . 'vendors' . DS .'css' . DS, 'id' => 'test_asset.css', 'extension' => 'css', ); diff --git a/lib/Cake/tests/cases/libs/view/theme.test.php b/lib/Cake/tests/cases/libs/view/theme.test.php index 69a986ad7..8c7344328 100644 --- a/lib/Cake/tests/cases/libs/view/theme.test.php +++ b/lib/Cake/tests/cases/libs/view/theme.test.php @@ -121,8 +121,8 @@ class ThemeViewTest extends CakeTestCase { $this->PostsController->index(); $this->ThemeView = new ThemeView($this->PostsController); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); } @@ -154,15 +154,16 @@ class ThemeViewTest extends CakeTestCase { $this->Controller->theme = 'test_theme'; $ThemeView = new TestThemeView($this->Controller); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'test_plugin' . DS . 'tests' . DS .'index.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'test_plugin' . DS . 'tests' . DS .'index.ctp'; $result = $ThemeView->getViewFileName('index'); + debug($expected); $this->assertEqual($result, $expected); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'test_plugin' . DS . 'layouts' . DS .'plugin_default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'test_plugin' . DS . 'layouts' . DS .'plugin_default.ctp'; $result = $ThemeView->getLayoutFileName('plugin_default'); $this->assertEqual($result, $expected); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'layouts' . DS .'default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'layouts' . DS .'default.ctp'; $result = $ThemeView->getLayoutFileName('default'); $this->assertEqual($result, $expected); } @@ -182,25 +183,25 @@ class ThemeViewTest extends CakeTestCase { $ThemeView = new TestThemeView($this->Controller); $ThemeView->theme = 'test_theme'; - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS .'pages' . DS .'home.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS .'pages' . DS .'home.ctp'; $result = $ThemeView->getViewFileName('home'); $this->assertEqual($result, $expected); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'posts' . DS .'index.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'posts' . DS .'index.ctp'; $result = $ThemeView->getViewFileName('/posts/index'); $this->assertEqual($result, $expected); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'layouts' . DS .'default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'layouts' . DS .'default.ctp'; $result = $ThemeView->getLayoutFileName(); $this->assertEqual($result, $expected); $ThemeView->layoutPath = 'rss'; - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS . 'rss' . DS . 'default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS . 'rss' . DS . 'default.ctp'; $result = $ThemeView->getLayoutFileName(); $this->assertEqual($result, $expected); $ThemeView->layoutPath = 'email' . DS . 'html'; - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS . 'email' . DS . 'html' . DS . 'default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS . 'email' . DS . 'html' . DS . 'default.ctp'; $result = $ThemeView->getLayoutFileName(); $this->assertEqual($result, $expected); } diff --git a/lib/Cake/tests/cases/libs/view/view.test.php b/lib/Cake/tests/cases/libs/view/view.test.php index 61762f475..8b90213cc 100644 --- a/lib/Cake/tests/cases/libs/view/view.test.php +++ b/lib/Cake/tests/cases/libs/view/view.test.php @@ -201,10 +201,10 @@ class ViewTest extends CakeTestCase { $this->PostsController->index(); $this->View = new View($this->PostsController); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), 'views' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS, - TEST_CAKE_CORE_INCLUDE_PATH . 'View' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS, + LIBS . 'View' . DS ) ), true); @@ -238,11 +238,11 @@ class ViewTest extends CakeTestCase { $View = new TestView($this->Controller); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS .'tests' . DS .'index.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS .'tests' . DS .'index.ctp'; $result = $View->getViewFileName('index'); $this->assertEqual($result, $expected); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS . 'layouts' . DS .'default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS . 'layouts' . DS .'default.ctp'; $result = $View->getLayoutFileName(); $this->assertEqual($result, $expected); } @@ -265,10 +265,10 @@ class ViewTest extends CakeTestCase { $paths = $View->paths('test_plugin'); $expected = array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'plugins' . DS . 'test_plugin' . DS, - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'views' . DS, - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS, - TEST_CAKE_CORE_INCLUDE_PATH . 'View' . DS + LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'plugins' . DS . 'test_plugin' . DS, + LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'views' . DS, + LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS, + LIBS . 'View' . DS ); $this->assertEqual($paths, $expected); } @@ -286,15 +286,15 @@ class ViewTest extends CakeTestCase { $View = new TestView($this->Controller); App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), + 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS .'tests' . DS .'index.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS .'tests' . DS .'index.ctp'; $result = $View->getViewFileName('index'); $this->assertEqual($result, $expected); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS . 'layouts' . DS .'default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS .'test_plugin' . DS . 'views' . DS . 'layouts' . DS .'default.ctp'; $result = $View->getLayoutFileName(); $this->assertEqual($result, $expected); } @@ -314,29 +314,29 @@ class ViewTest extends CakeTestCase { $View = new TestView($this->Controller); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS .'pages' . DS .'home.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS .'pages' . DS .'home.ctp'; $result = $View->getViewFileName('home'); $this->assertEqual($result, $expected); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS .'posts' . DS .'index.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS .'posts' . DS .'index.ctp'; $result = $View->getViewFileName('/posts/index'); $this->assertEqual($result, $expected); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS .'posts' . DS .'index.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS .'posts' . DS .'index.ctp'; $result = $View->getViewFileName('../posts/index'); $this->assertEqual($result, $expected); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS .'default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS .'default.ctp'; $result = $View->getLayoutFileName(); $this->assertEqual($result, $expected); $View->layoutPath = 'rss'; - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS . 'rss' . DS . 'default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS . 'rss' . DS . 'default.ctp'; $result = $View->getLayoutFileName(); $this->assertEqual($result, $expected); $View->layoutPath = 'email' . DS . 'html'; - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS . 'email' . DS . 'html' . DS . 'default.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'layouts' . DS . 'email' . DS . 'html' . DS . 'default.ctp'; $result = $View->getLayoutFileName(); $this->assertEqual($result, $expected); @@ -733,7 +733,7 @@ class ViewTest extends CakeTestCase { $result = $View->getViewFileName('../themed/test_theme/posts/index'); $this->assertPattern('/themed(\/|\\\)test_theme(\/|\\\)posts(\/|\\\)index.ctp/', $result); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS .'posts' . DS .'index.ctp'; + $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS .'posts' . DS .'index.ctp'; $result = $View->getViewFileName('../posts/index'); $this->assertEqual($result, $expected); diff --git a/lib/Cake/tests/cases/libs/xml.test.php b/lib/Cake/tests/cases/libs/xml.test.php index ee00efd2b..6a61d6cab 100644 --- a/lib/Cake/tests/cases/libs/xml.test.php +++ b/lib/Cake/tests/cases/libs/xml.test.php @@ -137,7 +137,7 @@ class XmlTest extends CakeTestCase { $this->assertEqual($obj->firstChild->nodeName, 'tag'); $this->assertEqual($obj->firstChild->nodeValue, 'value'); - $xml = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'fixtures' . DS . 'sample.xml'; + $xml = LIBS . 'tests' . DS . 'fixtures' . DS . 'sample.xml'; $obj = Xml::build($xml); $this->assertEqual($obj->getName(), 'tags'); $this->assertEqual(count($obj), 2); @@ -378,7 +378,7 @@ class XmlTest extends CakeTestCase { $obj = Xml::build($xml); $this->assertEqual(Xml::toArray($obj), array('tag' => 'name')); - $xml = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'fixtures' . DS . 'sample.xml'; + $xml = LIBS . 'tests' . DS . 'fixtures' . DS . 'sample.xml'; $obj = Xml::build($xml); $expected = array( 'tags' => array( @@ -520,7 +520,7 @@ class XmlTest extends CakeTestCase { * @return void */ public function testRss() { - $rss = file_get_contents(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'fixtures' . DS . 'rss.xml'); + $rss = file_get_contents(LIBS . 'tests' . DS . 'fixtures' . DS . 'rss.xml'); $rssAsArray = Xml::toArray(Xml::build($rss)); $this->assertEqual($rssAsArray['rss']['@version'], '2.0'); $this->assertEqual(count($rssAsArray['rss']['channel']['item']), 2); @@ -651,7 +651,7 @@ class XmlTest extends CakeTestCase { * @return void */ public function testSoap() { - $xmlRequest = Xml::build(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'fixtures' . DS . 'soap_request.xml'); + $xmlRequest = Xml::build(LIBS . 'tests' . DS . 'fixtures' . DS . 'soap_request.xml'); $expected = array( 'Envelope' => array( '@soap:encodingStyle' => 'http://www.w3.org/2001/12/soap-encoding', @@ -664,7 +664,7 @@ class XmlTest extends CakeTestCase { ); $this->assertEqual(Xml::toArray($xmlRequest), $expected); - $xmlResponse = Xml::build(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'fixtures' . DS . 'soap_response.xml'); + $xmlResponse = Xml::build(LIBS . 'tests' . DS . 'fixtures' . DS . 'soap_response.xml'); $expected = array( 'Envelope' => array( '@soap:encodingStyle' => 'http://www.w3.org/2001/12/soap-encoding', From 2cb2609a4342da449d70d4322ac47d02b9e3fccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 19 Dec 2010 23:49:20 -0430 Subject: [PATCH 077/214] Making ThemeView test pass --- lib/Cake/View/ThemeView.php | 2 +- lib/Cake/tests/cases/libs/view/theme.test.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Cake/View/ThemeView.php b/lib/Cake/View/ThemeView.php index 02cba797f..bbb6ab623 100644 --- a/lib/Cake/View/ThemeView.php +++ b/lib/Cake/View/ThemeView.php @@ -60,7 +60,7 @@ class ThemeView extends View { $count = count($paths); for ($i = 0; $i < $count; $i++) { if (strpos($paths[$i], DS . 'plugins' . DS) === false - && strpos($paths[$i], DS . 'libs' . DS . 'view') === false) { + && strpos($paths[$i], DS . 'Cake' . DS . 'View') === false) { if ($plugin) { $themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS . 'plugins' . DS . $plugin . DS; } diff --git a/lib/Cake/tests/cases/libs/view/theme.test.php b/lib/Cake/tests/cases/libs/view/theme.test.php index 8c7344328..19004383f 100644 --- a/lib/Cake/tests/cases/libs/view/theme.test.php +++ b/lib/Cake/tests/cases/libs/view/theme.test.php @@ -122,7 +122,7 @@ class ThemeViewTest extends CakeTestCase { $this->ThemeView = new ThemeView($this->PostsController); App::build(array( 'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); } @@ -156,7 +156,6 @@ class ThemeViewTest extends CakeTestCase { $ThemeView = new TestThemeView($this->Controller); $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'test_plugin' . DS . 'tests' . DS .'index.ctp'; $result = $ThemeView->getViewFileName('index'); - debug($expected); $this->assertEqual($result, $expected); $expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'test_plugin' . DS . 'layouts' . DS .'plugin_default.ctp'; From 3fff5d144a7591400c7436a30af197112dc2dd25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Sun, 19 Dec 2010 23:58:47 -0430 Subject: [PATCH 078/214] Making SessionHelper tests pass again --- lib/Cake/tests/cases/libs/view/helpers/session.test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/tests/cases/libs/view/helpers/session.test.php b/lib/Cake/tests/cases/libs/view/helpers/session.test.php index eb278b9de..63be0cba0 100644 --- a/lib/Cake/tests/cases/libs/view/helpers/session.test.php +++ b/lib/Cake/tests/cases/libs/view/helpers/session.test.php @@ -41,6 +41,7 @@ class SessionHelperTest extends CakeTestCase { $controller = null; $this->View = new View($controller); $this->Session = new SessionHelper($this->View); + CakeSession::start(); $_SESSION = array( 'test' => 'info', @@ -129,7 +130,7 @@ class SessionHelperTest extends CakeTestCase { $this->assertEqual($result, $expected); App::build(array( - 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS) )); $result = $this->Session->flash('notification', true); $result = str_replace("\r\n", "\n", $result); From 43401c271a34f32b710ce18d1d0b15f2310b026a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Lorenzo=20Rodri=CC=81guez?= Date: Tue, 21 Dec 2010 21:46:12 -0430 Subject: [PATCH 079/214] Fixing App::uses usage un CakeRouteTest --- lib/Cake/tests/cases/libs/route/cake_route.test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/tests/cases/libs/route/cake_route.test.php b/lib/Cake/tests/cases/libs/route/cake_route.test.php index 76f76f336..904a1ca88 100644 --- a/lib/Cake/tests/cases/libs/route/cake_route.test.php +++ b/lib/Cake/tests/cases/libs/route/cake_route.test.php @@ -1,6 +1,6 @@ Date: Tue, 21 Dec 2010 22:01:38 -0430 Subject: [PATCH 080/214] Extracting JsBaseEngineHelper to its own file, fixing some JsHelper related test cases --- lib/Cake/View/Helper/JqueryEngineHelper.php | 2 +- lib/Cake/View/Helper/JsBaseEngineHelper.php | 652 ++++++++++++++++++ lib/Cake/View/Helper/JsHelper.php | 635 +---------------- lib/Cake/View/Helper/MootoolsEngineHelper.php | 2 +- .../View/Helper/PrototypeEngineHelper.php | 2 +- .../tests/cases/libs/view/helpers/js.test.php | 1 + .../view/helpers/mootools_engine.test.php | 2 +- 7 files changed, 659 insertions(+), 637 deletions(-) create mode 100644 lib/Cake/View/Helper/JsBaseEngineHelper.php diff --git a/lib/Cake/View/Helper/JqueryEngineHelper.php b/lib/Cake/View/Helper/JqueryEngineHelper.php index bc3d90423..17e226d6f 100644 --- a/lib/Cake/View/Helper/JqueryEngineHelper.php +++ b/lib/Cake/View/Helper/JqueryEngineHelper.php @@ -23,7 +23,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::uses('JsHelper', 'View/Helper'); +App::uses('AppHelper', 'View/Helper'); App::uses('JsBaseEngineHelper', 'View/Helper'); class JqueryEngineHelper extends JsBaseEngineHelper { diff --git a/lib/Cake/View/Helper/JsBaseEngineHelper.php b/lib/Cake/View/Helper/JsBaseEngineHelper.php new file mode 100644 index 000000000..8d52f6939 --- /dev/null +++ b/lib/Cake/View/Helper/JsBaseEngineHelper.php @@ -0,0 +1,652 @@ + default arguments. + * + * @var array + * @access protected + */ + protected $_callbackArguments = array(); + +/** + * Constructor. + * + * @return void + */ + function __construct() { + $this->useNative = function_exists('json_encode'); + } + +/** + * Create an `alert()` message in Javascript + * + * @param string $message Message you want to alter. + * @return string completed alert() + */ + public function alert($message) { + return 'alert("' . $this->escape($message) . '");'; + } + +/** + * Redirects to a URL. Creates a window.location modification snippet + * that can be used to trigger 'redirects' from Javascript. + * + * @param mixed $url + * @param array $options + * @return string completed redirect in javascript + */ + public function redirect($url = null) { + return 'window.location = "' . Router::url($url) . '";'; + } + +/** + * Create a `confirm()` message + * + * @param string $message Message you want confirmed. + * @return string completed confirm() + */ + public function confirm($message) { + return 'confirm("' . $this->escape($message) . '");'; + } + +/** + * Generate a confirm snippet that returns false from the current + * function scope. + * + * @param string $message Message to use in the confirm dialog. + * @return string completed confirm with return script + */ + public function confirmReturn($message) { + $out = 'var _confirm = ' . $this->confirm($message); + $out .= "if (!_confirm) {\n\treturn false;\n}"; + return $out; + } + +/** + * Create a `prompt()` Javascript function + * + * @param string $message Message you want to prompt. + * @param string $default Default message + * @return string completed prompt() + */ + public function prompt($message, $default = '') { + return 'prompt("' . $this->escape($message) . '", "' . $this->escape($default) . '");'; + } + +/** + * Generates a JavaScript object in JavaScript Object Notation (JSON) + * from an array. Will use native JSON encode method if available, and $useNative == true + * + * ### Options: + * + * - `prefix` - String prepended to the returned data. + * - `postfix` - String appended to the returned data. + * + * @param array $data Data to be converted. + * @param array $options Set of options, see above. + * @return string A JSON code block + */ + public function object($data = array(), $options = array()) { + $defaultOptions = array( + 'prefix' => '', 'postfix' => '', + ); + $options = array_merge($defaultOptions, $options); + + if (is_object($data)) { + $data = get_object_vars($data); + } + + $out = $keys = array(); + $numeric = true; + + if ($this->useNative && function_exists('json_encode')) { + $rt = json_encode($data); + } else { + if (is_null($data)) { + return 'null'; + } + if (is_bool($data)) { + return $data ? 'true' : 'false'; + } + if (is_array($data)) { + $keys = array_keys($data); + } + + if (!empty($keys)) { + $numeric = (array_values($keys) === array_keys(array_values($keys))); + } + + foreach ($data as $key => $val) { + if (is_array($val) || is_object($val)) { + $val = $this->object($val); + } else { + $val = $this->value($val); + } + if (!$numeric) { + $val = '"' . $this->value($key, false) . '":' . $val; + } + $out[] = $val; + } + + if (!$numeric) { + $rt = '{' . join(',', $out) . '}'; + } else { + $rt = '[' . join(',', $out) . ']'; + } + } + $rt = $options['prefix'] . $rt . $options['postfix']; + return $rt; + } + +/** + * Converts a PHP-native variable of any type to a JSON-equivalent representation + * + * @param mixed $val A PHP variable to be converted to JSON + * @param boolean $quoteStrings If false, leaves string values unquoted + * @return string a JavaScript-safe/JSON representation of $val + */ + public function value($val, $quoteString = true) { + switch (true) { + case (is_array($val) || is_object($val)): + $val = $this->object($val); + break; + case ($val === null): + $val = 'null'; + break; + case (is_bool($val)): + $val = ($val === true) ? 'true' : 'false'; + break; + case (is_int($val)): + $val = $val; + break; + case (is_float($val)): + $val = sprintf("%.11f", $val); + break; + default: + $val = $this->escape($val); + if ($quoteString) { + $val = '"' . $val . '"'; + } + break; + } + return $val; + } + +/** + * Escape a string to be JSON friendly. + * + * List of escaped elements: + * + * - "\r" => '\n' + * - "\n" => '\n' + * - '"' => '\"' + * + * @param string $script String that needs to get escaped. + * @return string Escaped string. + */ + public function escape($string) { + return $this->_utf8ToHex($string); + } + +/** + * Encode a string into JSON. Converts and escapes necessary characters. + * + * @param string $string The string that needs to be utf8->hex encoded + * @return void + */ + protected function _utf8ToHex($string) { + $length = strlen($string); + $return = ''; + for ($i = 0; $i < $length; ++$i) { + $ord = ord($string{$i}); + switch (true) { + case $ord == 0x08: + $return .= '\b'; + break; + case $ord == 0x09: + $return .= '\t'; + break; + case $ord == 0x0A: + $return .= '\n'; + break; + case $ord == 0x0C: + $return .= '\f'; + break; + case $ord == 0x0D: + $return .= '\r'; + break; + case $ord == 0x22: + case $ord == 0x2F: + case $ord == 0x5C: + $return .= '\\' . $string{$i}; + break; + case (($ord >= 0x20) && ($ord <= 0x7F)): + $return .= $string{$i}; + break; + case (($ord & 0xE0) == 0xC0): + if ($i + 1 >= $length) { + $i += 1; + $return .= '?'; + break; + } + $charbits = $string{$i} . $string{$i + 1}; + $char = Multibyte::utf8($charbits); + $return .= sprintf('\u%04s', dechex($char[0])); + $i += 1; + break; + case (($ord & 0xF0) == 0xE0): + if ($i + 2 >= $length) { + $i += 2; + $return .= '?'; + break; + } + $charbits = $string{$i} . $string{$i + 1} . $string{$i + 2}; + $char = Multibyte::utf8($charbits); + $return .= sprintf('\u%04s', dechex($char[0])); + $i += 2; + break; + case (($ord & 0xF8) == 0xF0): + if ($i + 3 >= $length) { + $i += 3; + $return .= '?'; + break; + } + $charbits = $string{$i} . $string{$i + 1} . $string{$i + 2} . $string{$i + 3}; + $char = Multibyte::utf8($charbits); + $return .= sprintf('\u%04s', dechex($char[0])); + $i += 3; + break; + case (($ord & 0xFC) == 0xF8): + if ($i + 4 >= $length) { + $i += 4; + $return .= '?'; + break; + } + $charbits = $string{$i} . $string{$i + 1} . $string{$i + 2} . $string{$i + 3} . $string{$i + 4}; + $char = Multibyte::utf8($charbits); + $return .= sprintf('\u%04s', dechex($char[0])); + $i += 4; + break; + case (($ord & 0xFE) == 0xFC): + if ($i + 5 >= $length) { + $i += 5; + $return .= '?'; + break; + } + $charbits = $string{$i} . $string{$i + 1} . $string{$i + 2} . $string{$i + 3} . $string{$i + 4} . $string{$i + 5}; + $char = Multibyte::utf8($charbits); + $return .= sprintf('\u%04s', dechex($char[0])); + $i += 5; + break; + } + } + return $return; + } + +/** + * Create javascript selector for a CSS rule + * + * @param string $selector The selector that is targeted + * @return object instance of $this. Allows chained methods. + */ + abstract public function get($selector); + +/** + * Add an event to the script cache. Operates on the currently selected elements. + * + * ### Options + * + * - `wrap` - Whether you want the callback wrapped in an anonymous function. (defaults to true) + * - `stop` - Whether you want the event to stopped. (defaults to true) + * + * @param string $type Type of event to bind to the current dom id + * @param string $callback The Javascript function you wish to trigger or the function literal + * @param array $options Options for the event. + * @return string completed event handler + */ + abstract public function event($type, $callback, $options = array()); + +/** + * Create a domReady event. This is a special event in many libraries + * + * @param string $functionBody The code to run on domReady + * @return string completed domReady method + */ + abstract public function domReady($functionBody); + +/** + * Create an iteration over the current selection result. + * + * @param string $callback The function body you wish to apply during the iteration. + * @return string completed iteration + */ + abstract public function each($callback); + +/** + * Trigger an Effect. + * + * ### Supported Effects + * + * The following effects are supported by all core JsEngines + * + * - `show` - reveal an element. + * - `hide` - hide an element. + * - `fadeIn` - Fade in an element. + * - `fadeOut` - Fade out an element. + * - `slideIn` - Slide an element in. + * - `slideOut` - Slide an element out. + * + * ### Options + * + * - `speed` - Speed at which the animation should occur. Accepted values are 'slow', 'fast'. Not all effects use + * the speed option. + * + * @param string $name The name of the effect to trigger. + * @param array $options Array of options for the effect. + * @return string completed string with effect. + */ + abstract public function effect($name, $options = array()); + +/** + * Make an XHR request + * + * ### Event Options + * + * - `complete` - Callback to fire on complete. + * - `success` - Callback to fire on success. + * - `before` - Callback to fire on request initialization. + * - `error` - Callback to fire on request failure. + * + * ### Options + * + * - `method` - The method to make the request with defaults to GET in more libraries + * - `async` - Whether or not you want an asynchronous request. + * - `data` - Additional data to send. + * - `update` - Dom id to update with the content of the request. + * - `type` - Data type for response. 'json' and 'html' are supported. Default is html for most libraries. + * - `evalScripts` - Whether or not