diff --git a/app/webroot/test.php b/app/webroot/test.php
index ffcedfe3917..f216a4cdde1 100644
--- a/app/webroot/test.php
+++ b/app/webroot/test.php
@@ -75,6 +75,6 @@
die(__d('cake', 'Debug setting does not allow access to this url.'));
}
-require_once CAKE_TESTS_LIB . 'CakeTestSuiteDispatcher.php';
+require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
CakeTestSuiteDispatcher::run();
diff --git a/lib/Cake/Configure/PhpReader.php b/lib/Cake/Configure/PhpReader.php
index 4d00b2aeefc..0a0574c61f6 100644
--- a/lib/Cake/Configure/PhpReader.php
+++ b/lib/Cake/Configure/PhpReader.php
@@ -34,9 +34,12 @@ class PhpReader implements ConfigReaderInterface {
/**
* Constructor for PHP Config file reading.
*
- * @param string $path The path to read config files from. Defaults to CONFIGS
+ * @param string $path The path to read config files from. Defaults to APP . 'Config' . DS
*/
- public function __construct($path = CONFIGS) {
+ public function __construct($path = null) {
+ if (!$path) {
+ $path = APP . 'Config' . DS;
+ }
$this->_path = $path;
}
@@ -81,4 +84,4 @@ public function read($key) {
}
return $config;
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Console/Command/AclShell.php b/lib/Cake/Console/Command/AclShell.php
index 2a4c72e4547..c9b01fa8eeb 100644
--- a/lib/Cake/Console/Command/AclShell.php
+++ b/lib/Cake/Console/Command/AclShell.php
@@ -20,7 +20,7 @@
App::uses('DbAcl', 'Model');
/**
- * Shell for ACL management. This console is known to have issues with zend.ze1_compatibility_mode
+ * Shell for ACL management. This console is known to have issues with zend.ze1_compatibility_mode
* being enabled. Be sure to turn it off when using this shell.
*
* @package cake.console.libs
@@ -86,7 +86,7 @@ public function startup() {
$this->args = null;
return $this->DbConfig->execute();
}
- require_once (CONFIGS.'database.php');
+ require_once (APP . 'Config' . DS . 'database.php');
if (!in_array($this->command, array('initdb'))) {
$collection = new ComponentCollection();
@@ -348,13 +348,13 @@ public function initdb() {
*/
public function getOptionParser() {
$parser = parent::getOptionParser();
-
+
$type = array(
- 'choices' => array('aro', 'aco'),
+ 'choices' => array('aro', 'aco'),
'required' => true,
'help' => __d('cake_console', 'Type of node to create.')
);
-
+
$parser->description(__d('cake_console', 'A console tool for managing the DbAcl'))
->addSubcommand('create', array(
'help' => __d('cake_console', 'Create a new ACL node'),
diff --git a/lib/Cake/Console/Command/ApiShell.php b/lib/Cake/Console/Command/ApiShell.php
index 3e6fab46095..260e68b28a7 100644
--- a/lib/Cake/Console/Command/ApiShell.php
+++ b/lib/Cake/Console/Command/ApiShell.php
@@ -41,14 +41,14 @@ class ApiShell extends Shell {
*/
public function initialize() {
$this->paths = array_merge($this->paths, array(
- 'behavior' => LIBS . 'Model' . DS . 'Behavior' . DS,
- 'cache' => LIBS . 'Cache' . DS,
- 'controller' => LIBS . 'Controller' . DS,
- 'component' => LIBS . 'Controller' . DS . 'Component' . DS,
- 'helper' => LIBS . 'View' . DS . 'Helper' . DS,
- 'model' => LIBS . 'Model' . DS,
- 'view' => LIBS . 'View' . DS,
- 'core' => LIBS
+ 'behavior' => CAKE . 'Model' . DS . 'Behavior' . DS,
+ 'cache' => CAKE . 'Cache' . DS,
+ 'controller' => CAKE . 'Controller' . DS,
+ 'component' => CAKE . 'Controller' . DS . 'Component' . DS,
+ 'helper' => CAKE . 'View' . DS . 'Helper' . DS,
+ 'model' => CAKE . 'Model' . DS,
+ 'view' => CAKE . 'View' . DS,
+ 'core' => CAKE
));
}
diff --git a/lib/Cake/Console/Command/ConsoleShell.php b/lib/Cake/Console/Command/ConsoleShell.php
index 099c3921f2b..aed3598b10f 100644
--- a/lib/Cake/Console/Command/ConsoleShell.php
+++ b/lib/Cake/Console/Command/ConsoleShell.php
@@ -339,7 +339,7 @@ protected function _loadRoutes() {
Router::reload();
extract(Router::getNamedExpressions());
- if (!@include(CONFIGS . 'routes.php')) {
+ if (!@include(APP . 'Config' . DS . 'routes.php')) {
return false;
}
Router::parse('/');
diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php
index 27b26f72804..d03b58f3719 100644
--- a/lib/Cake/Console/Command/SchemaShell.php
+++ b/lib/Cake/Console/Command/SchemaShell.php
@@ -440,7 +440,7 @@ public function getOptionParser() {
);
$path = array(
'help' => __d('cake_console', 'Path to read and write schema.php'),
- 'default' => CONFIGS . 'Schema'
+ 'default' => APP . 'Config' . 'Schema'
);
$file = array(
'help' => __d('cake_console', 'File name to read and write.'),
diff --git a/lib/Cake/Console/Command/Task/ControllerTask.php b/lib/Cake/Console/Command/Task/ControllerTask.php
index adbaa9f4090..bfc38a5c0fc 100644
--- a/lib/Cake/Console/Command/Task/ControllerTask.php
+++ b/lib/Cake/Console/Command/Task/ControllerTask.php
@@ -36,18 +36,19 @@ class ControllerTask extends BakeTask {
public $tasks = array('Model', 'Test', 'Template', 'DbConfig', 'Project');
/**
- * path to CONTROLLERS directory
+ * path to Controller directory
*
* @var array
* @access public
*/
- public $path = CONTROLLERS;
+ public $path = null;
/**
* Override initialize
*
*/
public function initialize() {
+ $this->path = current(App::path('Controller'));
}
/**
diff --git a/lib/Cake/Console/Command/Task/ModelTask.php b/lib/Cake/Console/Command/Task/ModelTask.php
index 70f6dff998c..06bb17d3a7f 100644
--- a/lib/Cake/Console/Command/Task/ModelTask.php
+++ b/lib/Cake/Console/Command/Task/ModelTask.php
@@ -30,12 +30,12 @@
class ModelTask extends BakeTask {
/**
- * path to MODELS directory
+ * path to Model directory
*
* @var string
* @access public
*/
- public $path = MODELS;
+ public $path = null;
/**
* tasks
@@ -69,6 +69,14 @@ class ModelTask extends BakeTask {
*/
protected $_validations = array();
+/**
+ * Override initialize
+ *
+ */
+ public function initialize() {
+ $this->path = current(App::path('Model'));
+ }
+
/**
* Execution method always used for tasks
*
diff --git a/lib/Cake/Console/Command/Task/PluginTask.php b/lib/Cake/Console/Command/Task/PluginTask.php
index 9d409a87266..b6f96e02d81 100644
--- a/lib/Cake/Console/Command/Task/PluginTask.php
+++ b/lib/Cake/Console/Command/Task/PluginTask.php
@@ -28,7 +28,7 @@
class PluginTask extends Shell {
/**
- * path to CONTROLLERS directory
+ * path to plugins directory
*
* @var array
* @access public
@@ -41,7 +41,7 @@ class PluginTask extends Shell {
* @return void
*/
function initialize() {
- $this->path = APP . 'Plugin' . DS;
+ $this->path = current(App::path('plugins'));
}
/**
@@ -94,7 +94,7 @@ public function bake($plugin) {
$this->findPath($pathOptions);
}
$this->hr();
- $this->out(__d('cake_console', "Plugin Name: %s", $plugin));
+ $this->out(__d('cake_console', "Plugin Name: %s", $plugin));
$this->out(__d('cake_console', "Plugin Directory: %s", $this->path . $pluginPath));
$this->hr();
@@ -184,7 +184,7 @@ public function findPath($pathOptions) {
*/
public function getOptionParser() {
$parser = parent::getOptionParser();
- return $parser->description(__d('cake_console',
+ return $parser->description(__d('cake_console',
'Create the directory structure, AppModel and AppController classes for a new plugin. ' .
'Can create plugins in any of your bootstrapped plugin paths.'
))->addArgument('name', array(
diff --git a/lib/Cake/Console/Command/Task/ProjectTask.php b/lib/Cake/Console/Command/Task/ProjectTask.php
index c2f9abf4700..bfa87f167a6 100644
--- a/lib/Cake/Console/Command/Task/ProjectTask.php
+++ b/lib/Cake/Console/Command/Task/ProjectTask.php
@@ -82,14 +82,14 @@ public function execute() {
if ($this->securitySalt($path) === true) {
$this->out(__d('cake_console', ' * Random hash key created for \'Security.salt\''));
} else {
- $this->err(__d('cake_console', 'Unable to generate random hash for \'Security.salt\', you should change it in %s', CONFIGS . 'core.php'));
+ $this->err(__d('cake_console', 'Unable to generate random hash for \'Security.salt\', you should change it in %s', APP . 'Config' . DS . 'core.php'));
$success = false;
}
if ($this->securityCipherSeed($path) === true) {
$this->out(__d('cake_console', ' * Random seed created for \'Security.cipherSeed\''));
} else {
- $this->err(__d('cake_console', 'Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', CONFIGS . 'core.php'));
+ $this->err(__d('cake_console', 'Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', APP . 'Config' . DS . 'core.php'));
$success = false;
}
@@ -202,7 +202,7 @@ function bake($path, $skel = null, $skip = array('empty')) {
public function createHome($dir) {
$app = basename($dir);
$path = $dir . 'View' . DS . 'pages' . DS;
- $source = LIBS . 'Console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp';
+ $source = CAKE . 'Console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp';
include($source);
return $this->createFile($path.'home.ctp', $output);
}
@@ -218,7 +218,7 @@ public function consolePath($path) {
$File = new File($path . 'Console' . DS . 'cake.php');
$contents = $File->read();
if (preg_match('/(__CAKE_PATH__)/', $contents, $match)) {
- $path = LIBS . 'Console' . DS;
+ $path = CAKE . 'Console' . DS;
$replacement = "'" . str_replace(DS, "' . DIRECTORY_SEPARATOR . '", $path) . "'";
$result = str_replace($match[0], $replacement, $contents);
if ($File->write($result)) {
@@ -260,7 +260,7 @@ public function securityCipherSeed($path) {
$contents = $File->read();
if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
if (!class_exists('Security')) {
- require LIBS . 'Utility' . DS . 'security.php';
+ require CAKE . 'Utility' . DS . 'security.php';
}
$string = substr(bin2hex(Security::generateAuthKey()), 0, 30);
$result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \''.$string.'\');', $contents);
@@ -313,7 +313,7 @@ public function corePath($path) {
* @return boolean Success
*/
public function cakeAdmin($name) {
- $path = (empty($this->configPath)) ? CONFIGS : $this->configPath;
+ $path = (empty($this->configPath)) ? APP . 'Config' . DS : $this->configPath;
$File = new File($path . 'core.php');
$contents = $File->read();
if (preg_match('%(\s*[/]*Configure::write\(\'Routing.prefixes\',[\s\'a-z,\)\(]*\);)%', $contents, $match)) {
diff --git a/lib/Cake/Console/Command/Task/ViewTask.php b/lib/Cake/Console/Command/Task/ViewTask.php
index ab3bf784ed5..7aad0c1f574 100644
--- a/lib/Cake/Console/Command/Task/ViewTask.php
+++ b/lib/Cake/Console/Command/Task/ViewTask.php
@@ -36,12 +36,12 @@ class ViewTask extends BakeTask {
public $tasks = array('Project', 'Controller', 'DbConfig', 'Template');
/**
- * path to VIEWS directory
+ * path to View directory
*
* @var array
* @access public
*/
- public $path = VIEWS;
+ public $path = null;
/**
* Name of the controller being used
@@ -89,6 +89,7 @@ class ViewTask extends BakeTask {
*
*/
public function initialize() {
+ $this->path = current(App::path('View'));
}
/**
@@ -407,7 +408,7 @@ public function getTemplate($action) {
}
if (!empty($this->template) && $action != $this->template) {
return $this->template;
- }
+ }
$template = $action;
$prefixes = Configure::read('Routing.prefixes');
foreach ((array)$prefixes as $prefix) {
diff --git a/lib/Cake/Console/Command/UpgradeShell.php b/lib/Cake/Console/Command/UpgradeShell.php
index 0e645568cc2..59b5b4147fc 100644
--- a/lib/Cake/Console/Command/UpgradeShell.php
+++ b/lib/Cake/Console/Command/UpgradeShell.php
@@ -338,6 +338,89 @@ public function configure() {
$this->_filesRegexpUpdate($patterns);
}
+/**
+ * constants
+ *
+ * @access public
+ * @return void
+ */
+ public function constants() {
+ $this->_paths = array(
+ APP
+ );
+ if (!empty($this->params['plugin'])) {
+ $this->_paths = array(App::pluginPath($this->params['plugin']));
+ }
+ $patterns = array(
+ array(
+ "LIBS -> CAKE",
+ '/\bLIBS\b/',
+ 'CAKE'
+ ),
+ array(
+ "CONFIGS -> APP . 'Config' . DS",
+ '/\bCONFIGS\b/',
+ 'APP . \'Config\' . DS'
+ ),
+ array(
+ "CONTROLLERS -> APP . 'Controller' . DS",
+ '/\bCONTROLLERS\b/',
+ 'APP . \'Controller\' . DS'
+ ),
+ array(
+ "COMPONENTS -> APP . 'Controller' . DS . 'Component' . DS",
+ '/\bCOMPONENTS\b/',
+ 'APP . \'Controller\' . DS . \'Component\''
+ ),
+ array(
+ "MODELS -> APP . 'Model' . DS",
+ '/\bMODELS\b/',
+ 'APP . \'Model\' . DS'
+ ),
+ array(
+ "BEHAVIORS -> APP . 'Model' . DS . 'Behavior' . DS",
+ '/\bBEHAVIORS\b/',
+ 'APP . \'Model\' . DS . \'Behavior\' . DS'
+ ),
+ array(
+ "VIEWS -> APP . 'View' . DS",
+ '/\bVIEWS\b/',
+ 'APP . \'View\' . DS'
+ ),
+ array(
+ "HELPERS -> APP . 'View' . DS . 'Helper' . DS",
+ '/\bHELPERS\b/',
+ 'APP . \'View\' . DS . \'Helper\' . DS'
+ ),
+ array(
+ "LAYOUTS -> APP . 'View' . DS . 'Layouts' . DS",
+ '/\bLAYOUTS\b/',
+ 'APP . \'View\' . DS . \'Layouts\' . DS'
+ ),
+ array(
+ "ELEMENTS -> APP . 'View' . DS . 'Elements' . DS",
+ '/\bELEMENTS\b/',
+ 'APP . \'View\' . DS . \'Elements\' . DS'
+ ),
+ array(
+ "CONSOLE_LIBS -> CAKE . 'Console' . DS",
+ '/\bCONSOLE_LIBS\b/',
+ 'CAKE . \'Console\' . DS'
+ ),
+ array(
+ "CAKE_TESTS_LIB -> CAKE . 'TestSuite' . DS",
+ '/\bCAKE_TESTS_LIB\b/',
+ 'CAKE . \'TestSuite\' . DS'
+ ),
+ array(
+ "CAKE_TESTS -> CAKE . 'Test' . DS",
+ '/\bCAKE_TESTS\b/',
+ 'CAKE . \'Test\' . DS'
+ )
+ );
+ $this->_filesRegexpUpdate($patterns);
+ }
+
/**
* Move application php files to where they now should be
*
@@ -549,6 +632,10 @@ function getOptionParser() {
->addSubcommand('configure', array(
'help' => "Update Configure::read() to Configure::read('debug')",
'parser' => $subcommandParser
+ ))
+ ->addSubcommand('constants', array(
+ 'help' => "Replace Obsolete constants",
+ 'parser' => $subcommandParser
));
}
}
diff --git a/lib/Cake/Console/ShellDispatcher.php b/lib/Cake/Console/ShellDispatcher.php
index a8421d63c37..6304b2f22e7 100644
--- a/lib/Cake/Console/ShellDispatcher.php
+++ b/lib/Cake/Console/ShellDispatcher.php
@@ -136,7 +136,7 @@ function __bootstrap() {
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 . 'ConsoleErrorHandler.php';
+ require_once CAKE . 'Console' . DS . 'ConsoleErrorHandler.php';
set_exception_handler(array('ConsoleErrorHandler', 'handleException'));
set_error_handler(array('ConsoleErrorHandler', 'handleError'), Configure::read('Error.level'));
diff --git a/lib/Cake/Console/templates/default/views/home.ctp b/lib/Cake/Console/templates/default/views/home.ctp
index 506563c9120..84e21fae82c 100644
--- a/lib/Cake/Console/templates/default/views/home.ctp
+++ b/lib/Cake/Console/templates/default/views/home.ctp
@@ -37,7 +37,7 @@ endif;
';
echo __('Your database configuration file is present.');
\$filePresent = true;
@@ -93,4 +93,4 @@ $output .= "\t\tYou can also add some CSS styles for your pages at: %s',\n";
$output .= "\t\tAPP . 'View' . DS . 'Pages' . DS . 'home.ctp.
', APP . 'View' . DS . 'Layouts' . DS . 'default.ctp.
', APP . 'webroot' . DS . 'css');\n";
$output .= "?>\n";
$output .= "
\n";
-?>
\ No newline at end of file
+?>
diff --git a/lib/Cake/Console/templates/skel/webroot/test.php b/lib/Cake/Console/templates/skel/webroot/test.php
index cb91803314b..89b5eae3d2a 100644
--- a/lib/Cake/Console/templates/skel/webroot/test.php
+++ b/lib/Cake/Console/templates/skel/webroot/test.php
@@ -75,6 +75,6 @@
die(__('Debug setting does not allow access to this url.'));
}
-require_once CAKE_TESTS_LIB . 'CakeTestSuiteDispatcher.php';
+require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
CakeTestSuiteDispatcher::run();
diff --git a/lib/Cake/Controller/Component/AclComponent.php b/lib/Cake/Controller/Component/AclComponent.php
index 5d2348e5268..69a7f93ca54 100644
--- a/lib/Cake/Controller/Component/AclComponent.php
+++ b/lib/Cake/Controller/Component/AclComponent.php
@@ -238,8 +238,8 @@ public function initialize($component);
}
/**
- * DbAcl implements an ACL control system in the database. ARO's and ACO's are
- * structured into trees and a linking table is used to define permissions. You
+ * DbAcl implements an ACL control system in the database. ARO's and ACO's are
+ * structured into trees and a linking table is used to define permissions. You
* can install the schema for DbAcl with the Schema Shell.
*
* `$aco` and `$aro` parameters can be slash delimited paths to tree nodes.
@@ -515,7 +515,7 @@ protected function _getAcoKeys($keys) {
}
/**
- * IniAcl implements an access control system using an INI file. An example
+ * IniAcl implements an access control system using an INI file. An example
* of the ini file used can be found in /config/acl.ini.php.
*
* @package cake.libs.model.iniacl
@@ -542,11 +542,11 @@ class IniAcl extends Object implements AclInterface {
/**
* Initialize method
*
- * @param AclBase $component
+ * @param AclBase $component
* @return void
*/
public function initialize($component) {
-
+
}
/**
@@ -558,7 +558,7 @@ public function initialize($component) {
* @return boolean Success
*/
public function allow($aro, $aco, $action = "*") {
-
+
}
/**
@@ -570,7 +570,7 @@ public function allow($aro, $aco, $action = "*") {
* @return boolean Success
*/
public function deny($aro, $aco, $action = "*") {
-
+
}
/**
@@ -582,12 +582,12 @@ public function deny($aro, $aco, $action = "*") {
* @return boolean Success
*/
public function inherit($aro, $aco, $action = "*") {
-
+
}
/**
- * Main ACL check function. Checks to see if the ARO (access request object) has access to the
- * ACO (access control object).Looks at the acl.ini.php file for permissions
+ * Main ACL check function. Checks to see if the ARO (access request object) has access to the
+ * ACO (access control object).Looks at the acl.ini.php file for permissions
* (see instructions in /config/acl.ini.php).
*
* @param string $aro ARO
@@ -597,10 +597,10 @@ public function inherit($aro, $aco, $action = "*") {
*/
public function check($aro, $aco, $aco_action = null) {
if ($this->config == null) {
- $this->config = $this->readConfigFile(CONFIGS . 'acl.ini.php');
+ $this->config = $this->readConfigFile(APP . 'Config' . DS . 'acl.ini.php');
}
$aclConfig = $this->config;
-
+
if (is_array($aro)) {
$aro = Set::classicExtract($aro, $this->userPath);
}
diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php
index f5ac9a63a87..0ddc49257d3 100644
--- a/lib/Cake/Core/App.php
+++ b/lib/Cake/Core/App.php
@@ -411,7 +411,7 @@ public static function themePath($theme) {
* @return string full path to package
*/
public static function core($type) {
- return array(LIBS . str_replace('/', DS, $type) . DS);
+ return array(CAKE . str_replace('/', DS, $type) . DS);
}
/**
@@ -563,7 +563,7 @@ public static function load($className) {
if (empty($plugin)) {
$appLibs = empty(self::$__packages['Lib']) ? APPLIBS : current(self::$__packages['Lib']);
$paths[] = $appLibs . $package . DS;
- $paths[] = LIBS . $package . DS;
+ $paths[] = CAKE . $package . DS;
}
foreach ($paths as $path) {
@@ -845,4 +845,4 @@ public static function shutdown() {
Cache::write('object_map', self::$__objects, '_cake_core_');
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Core/Configure.php b/lib/Cake/Core/Configure.php
index 4cf57577577..40671621db1 100644
--- a/lib/Cake/Core/Configure.php
+++ b/lib/Cake/Core/Configure.php
@@ -69,14 +69,14 @@ public static function bootstrap($boot = true) {
'www_root' => WWW_ROOT
));
- if (!include(CONFIGS . 'core.php')) {
- trigger_error(__d('cake_dev', "Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR);
+ if (!include(APP . 'Config' . DS . 'core.php')) {
+ trigger_error(__d('cake_dev', "Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", APP . 'Config' . DS), E_USER_ERROR);
}
App::init();
App::build();
- if (!include(CONFIGS . 'bootstrap.php')) {
- trigger_error(__d('cake_dev', "Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR);
+ if (!include(APP . 'Config' . DS . 'bootstrap.php')) {
+ trigger_error(__d('cake_dev', "Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", APP . 'Config' . DS), E_USER_ERROR);
}
$level = -1;
if (isset(self::$_values['Error']['level'])) {
@@ -295,7 +295,7 @@ public static function load($key, $config = 'default', $merge = true) {
return false;
}
$values = self::$_readers[$config]->read($key);
-
+
if ($merge) {
$keys = array_keys($values);
foreach ($keys as $key) {
@@ -304,7 +304,7 @@ public static function load($key, $config = 'default', $merge = true) {
}
}
}
-
+
return self::write($values);
}
@@ -318,7 +318,7 @@ public static function load($key, $config = 'default', $merge = true) {
*/
public static function version() {
if (!isset(self::$_values['Cake']['version'])) {
- require(LIBS . 'Config' . DS . 'config.php');
+ require(CAKE . 'Config' . DS . 'config.php');
self::write($config);
}
return self::$_values['Cake']['version'];
@@ -373,4 +373,4 @@ interface ConfigReaderInterface {
* @return array An array of data to merge into the runtime configuration
*/
function read($key);
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Core/Object.php b/lib/Cake/Core/Object.php
index 28a3d0d2920..345a4ca67f1 100644
--- a/lib/Cake/Core/Object.php
+++ b/lib/Cake/Core/Object.php
@@ -74,7 +74,7 @@ public function requestAction($url, $extra = array()) {
$extra['url'] = array();
}
$extra = array_merge(array('autoRender' => 0, 'return' => 1, 'bare' => 1, 'requested' => 1), $extra);
-
+
if (is_string($url)) {
$request = new CakeRequest($url);
} elseif (is_array($url)) {
@@ -119,7 +119,7 @@ public function dispatchMethod($method, $params = array()) {
}
/**
- * Stop execution of the current script. Wraps exit() making
+ * Stop execution of the current script. Wraps exit() making
* testing easier.
*
* @param $status see http://php.net/exit for values
@@ -139,7 +139,7 @@ protected function _stop($status = 0) {
*/
public function log($msg, $type = LOG_ERROR) {
if (!class_exists('CakeLog')) {
- require LIBS . 'cake_log.php';
+ require CAKE . 'cake_log.php';
}
if (!is_string($msg)) {
$msg = print_r($msg, true);
@@ -148,7 +148,7 @@ public function log($msg, $type = LOG_ERROR) {
}
/**
- * Allows setting of multiple properties of the object in a single line of code. Will only set
+ * Allows setting of multiple properties of the object in a single line of code. Will only set
* properties that are part of a class declaration.
*
* @param array $properties An associative array containing properties and corresponding values.
@@ -213,7 +213,7 @@ protected function _mergeVars($properties, $class, $normalize = true) {
foreach ($properties as $var) {
if (
isset($classProperties[$var]) &&
- !empty($classProperties[$var]) &&
+ !empty($classProperties[$var]) &&
is_array($this->{$var}) &&
$this->{$var} != $classProperties[$var]
) {
diff --git a/lib/Cake/Model/Behavior/AclBehavior.php b/lib/Cake/Model/Behavior/AclBehavior.php
index ae72d960e55..564c26e7f20 100644
--- a/lib/Cake/Model/Behavior/AclBehavior.php
+++ b/lib/Cake/Model/Behavior/AclBehavior.php
@@ -49,7 +49,7 @@ public function setup($model, $config = array()) {
$types = $this->__typeMaps[$this->settings[$model->name]['type']];
if (!class_exists('AclNode')) {
- require LIBS . 'model' . DS . 'db_acl.php';
+ require CAKE . 'model' . DS . 'db_acl.php';
}
if (!is_array($types)) {
$types = array($types);
diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php
index 9080d52b130..e26218c22ca 100644
--- a/lib/Cake/Model/CakeSchema.php
+++ b/lib/Cake/Model/CakeSchema.php
@@ -94,7 +94,7 @@ function __construct($options = array()) {
}
if (empty($options['path'])) {
- $this->path = CONFIGS . 'Schema';
+ $this->path = APP . 'Config' . 'Schema';
}
$options = array_merge(get_object_vars($this), $options);
@@ -277,7 +277,7 @@ public function read($options = array()) {
if (in_array($withTable, $currentTables)) {
$key = array_search($withTable, $currentTables);
$noPrefixWith = str_replace($prefix, '', $withTable);
-
+
$tables[$noPrefixWith] = $this->__columns($Object->$class);
$tables[$noPrefixWith]['indexes'] = $db->index($Object->$class);
$tables[$noPrefixWith]['tableParameters'] = $db->readTableParameters($withTable);
diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php
index 914e8911afd..1fbc25751ff 100644
--- a/lib/Cake/Model/ConnectionManager.php
+++ b/lib/Cake/Model/ConnectionManager.php
@@ -65,7 +65,7 @@ class ConnectionManager {
*
*/
private static function init() {
- include_once CONFIGS . 'database.php';
+ include_once APP . 'Config' . DS . 'database.php';
if (class_exists('DATABASE_CONFIG')) {
self::$config = new DATABASE_CONFIG();
}
@@ -265,4 +265,4 @@ public static function shutdown() {
session_write_close();
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php
index e2cf36e9b2c..39c7af289fa 100644
--- a/lib/Cake/Network/Email/CakeEmail.php
+++ b/lib/Cake/Network/Email/CakeEmail.php
@@ -46,7 +46,7 @@ class CakeEmail {
const LINE_LENGTH_SHOULD = 78;
/**
- * Line length - no must more - RFC 2822 - 2.1.1
+ * Line length - no must more - RFC 2822 - 2.1.1
*
* @constant LINE_LENGTH_MUST
*/
@@ -890,7 +890,7 @@ public function config($config = null) {
public function send($content = null) {
if (is_string($this->_config)) {
if (!config('email')) {
- throw new SocketException(__d('cake', '%s not found.', CONFIGS . 'email.php'));
+ throw new SocketException(__d('cake', '%s not found.', APP . 'Config' . 'email.php'));
}
$configs = new EmailConfig();
if (!isset($configs->{$this->_config})) {
@@ -971,7 +971,7 @@ public static function deliver($to = null, $subject = null, $message = null, $tr
if (is_string($transportConfig)) {
if (!config('email')) {
- throw new SocketException(__d('cake', '%s not found.', CONFIGS . 'email.php'));
+ throw new SocketException(__d('cake', '%s not found.', APP . 'Config' . 'email.php'));
}
$configs = new EmailConfig();
if (!isset($configs->{$transportConfig})) {
@@ -1276,7 +1276,7 @@ protected function _render($content) {
$msg[] = 'Content-Transfer-Encoding: 7bit';
$msg[] = '';
- $View->viewPath = $View->layoutPath = 'emails' . DS . 'text';
+ $View->viewPath = $View->layoutPath = 'Emails' . DS . 'text';
$View->viewVars['content'] = $originalContent;
$this->_textMessage = str_replace(array("\r\n", "\r"), "\n", $View->render($this->_template, $this->_layout));
$content = explode("\n", $this->_textMessage);
@@ -1288,7 +1288,7 @@ protected function _render($content) {
$msg[] = 'Content-Transfer-Encoding: 7bit';
$msg[] = '';
- $View->viewPath = $View->layoutPath = 'emails' . DS . 'html';
+ $View->viewPath = $View->layoutPath = 'Emails' . DS . 'html';
$View->viewVars['content'] = $originalContent;
$View->hasRendered = false;
$this->_htmlMessage = str_replace(array("\r\n", "\r"), "\n", $View->render($this->_template, $this->_layout));
@@ -1317,7 +1317,7 @@ protected function _render($content) {
}
}
- $View->viewPath = $View->layoutPath = 'emails' . DS . $this->_emailFormat;
+ $View->viewPath = $View->layoutPath = 'Emails' . DS . $this->_emailFormat;
$View->viewVars['content'] = $content;
$rendered = $View->render($this->_template, $this->_layout);
$content = explode("\n", $rendered);
diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php
index 53f24a76542..1879bac95f6 100644
--- a/lib/Cake/Routing/Dispatcher.php
+++ b/lib/Cake/Routing/Dispatcher.php
@@ -33,7 +33,7 @@
/**
* Dispatcher converts Requests into controller actions. It uses the dispatched Request
- * to locate and load the correct controller. If found, the requested action is called on
+ * to locate and load the correct controller. If found, the requested action is called on
* the controller.
*
* @package cake
@@ -64,7 +64,7 @@ public function __construct($url = null, $base = false) {
* to autoRender, via Controller::$autoRender, then Dispatcher will render the view.
*
* Actions in CakePHP can be any public method on a controller, that is not declared in Controller. If you
- * want controller methods to be public and in-accesible by URL, then prefix them with a `_`.
+ * want controller methods to be public and in-accesible by URL, then prefix them with a `_`.
* For example `public function _loadPosts() { }` would not be accessible via URL. Private and protected methods
* are also not accessible via URL.
*
@@ -103,7 +103,7 @@ public function dispatch(CakeRequest $request, $additionalParams = array()) {
}
/**
- * Check if the request's action is marked as private, with an underscore, of if the request is attempting to
+ * Check if the request's action is marked as private, with an underscore, of if the request is attempting to
* directly accessing a prefixed action.
*
* @param CakeRequest $request The request to check
@@ -236,7 +236,7 @@ protected function _loadController($request) {
* @return void
*/
protected function _loadRoutes() {
- include CONFIGS . 'routes.php';
+ include APP . 'Config' . DS . 'routes.php';
}
/**
@@ -278,7 +278,7 @@ public function asset($url) {
}
$filters = Configure::read('Asset.filter');
$isCss = (
- strpos($url, 'ccss/') === 0 ||
+ strpos($url, 'ccss/') === 0 ||
preg_match('#^(theme/([^/]+)/ccss/)|(([^/]+)(? array(LIBS . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
+ 'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
));
$this->_language = Configure::read('Config.language');
}
@@ -206,7 +206,7 @@ public function testH() {
$string = ' & ';
$result = h($string, false);
$this->assertEqual('<foo> & ', $result);
-
+
$string = ' & ';
$result = h($string, 'UTF-8');
$this->assertEqual('<foo> & ', $result);
@@ -226,7 +226,7 @@ public function testH() {
' '
);
$this->assertEqual($expected, $result);
-
+
$arr = array('f' => '', 'n' => ' ');
$result = h($arr, false);
$expected = array(
diff --git a/lib/Cake/Test/Case/Cache/CacheTest.php b/lib/Cake/Test/Case/Cache/CacheTest.php
index a51881f835e..7be4bb7b5ba 100644
--- a/lib/Cake/Test/Case/Cache/CacheTest.php
+++ b/lib/Cake/Test/Case/Cache/CacheTest.php
@@ -89,8 +89,8 @@ function testNonFatalErrorsWithCachedisable() {
*/
function testConfigWithLibAndPluginEngines() {
App::build(array(
- 'Lib' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'Lib' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::load('TestPlugin');
@@ -252,8 +252,8 @@ function testInitSettings() {
*/
function testDrop() {
App::build(array(
- 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
$result = Cache::drop('some_config_that_does_not_exist');
@@ -305,10 +305,10 @@ function testWriteEmptyValues() {
*/
function testWriteTriggerError() {
App::build(array(
- 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
-
+
Cache::config('test_trigger', array('engine' => 'TestAppCache', 'prefix' => ''));
try {
Cache::write('fail', 'value', 'test_trigger');
@@ -400,7 +400,7 @@ function testSetOnAlternateConfigs() {
Cache::config('file_config', array('engine' => 'File', 'prefix' => 'test_file_'));
Cache::set(array('duration' => '+1 year'), 'file_config');
$settings = Cache::settings('file_config');
-
+
$this->assertEquals('test_file_', $settings['prefix']);
$this->assertEquals(strtotime('+1 year') - time(), $settings['duration']);
}
diff --git a/lib/Cake/Test/Case/Configure/IniReaderTest.php b/lib/Cake/Test/Case/Configure/IniReaderTest.php
index a03313886f5..579c57eaa38 100644
--- a/lib/Cake/Test/Case/Configure/IniReaderTest.php
+++ b/lib/Cake/Test/Case/Configure/IniReaderTest.php
@@ -34,7 +34,7 @@ class IniReaderTest extends CakeTestCase {
*/
function setup() {
parent::setup();
- $this->path = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
+ $this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
}
/**
@@ -125,4 +125,4 @@ public function testReadingWithoutExtension() {
$config = $reader->read('nested');
$this->assertTrue($config['bools']['test_on']);
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/Configure/PhpReaderTest.php b/lib/Cake/Test/Case/Configure/PhpReaderTest.php
index 1de4c247108..060a41fe03e 100644
--- a/lib/Cake/Test/Case/Configure/PhpReaderTest.php
+++ b/lib/Cake/Test/Case/Configure/PhpReaderTest.php
@@ -26,7 +26,7 @@ class PhpReaderTest extends CakeTestCase {
*/
function setUp() {
parent::setUp();
- $this->path = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
+ $this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
}
/**
* test reading files
@@ -83,7 +83,7 @@ function testReadWithDots() {
*/
function testReadPluginValue() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::load('TestPlugin');
$reader = new PhpReader($this->path);
diff --git a/lib/Cake/Test/Case/Console/Command/ApiShellTest.php b/lib/Cake/Test/Case/Console/Command/ApiShellTest.php
index 045611ab3d1..5376569dc94 100644
--- a/lib/Cake/Test/Case/Console/Command/ApiShellTest.php
+++ b/lib/Cake/Test/Case/Console/Command/ApiShellTest.php
@@ -82,7 +82,7 @@ public function testMethodNameDetection () {
$this->Shell->expects($this->at(2))->method('out')->with($expected);
$this->Shell->args = array('controller');
- $this->Shell->paths['controller'] = LIBS . 'Controller' . DS;
+ $this->Shell->paths['controller'] = CAKE . 'Controller' . DS;
$this->Shell->main();
}
}
diff --git a/lib/Cake/Test/Case/Console/Command/CommandListShellTest.php b/lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
index 4244354f016..d30214777d6 100644
--- a/lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
+++ b/lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
@@ -41,10 +41,10 @@ public function setUp() {
parent::setUp();
App::build(array(
'plugins' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
),
'Console/Command' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
)
), true);
CakePlugin::loadAll();
@@ -130,7 +130,7 @@ function testSortPlugin() {
$expected = "/\[.*TestPlugin.*\]\n[ ]+example/";
$this->assertPattern($expected, $output);
-
+
$expected = "/\[.*Core.*\]\n[ ]+acl, api, bake, command_list, console, i18n, schema, testsuite/";
$this->assertPattern($expected, $output);
}
diff --git a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
index 3bd3b71edb1..10804ae5de2 100644
--- a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
+++ b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
@@ -97,7 +97,7 @@ class SchemaShellTest extends CakeTestCase {
* @var array
* @access public
*/
- public $fixtures = array('core.article', 'core.user', 'core.post', 'core.auth_user', 'core.author',
+ public $fixtures = array('core.article', 'core.user', 'core.post', 'core.auth_user', 'core.author',
'core.comment', 'core.test_plugin_comment'
);
@@ -187,7 +187,7 @@ public function testView() {
*/
public function testViewWithPlugins() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$this->Shell->args = array('TestPlugin.schema');
@@ -238,7 +238,7 @@ public function testDumpWithFileWriting() {
*/
public function testDumpFileWritingWithPlugins() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$this->Shell->args = array('TestPlugin.TestPluginApp');
@@ -314,7 +314,7 @@ public function testGenerateOverwrite() {
$this->Shell->expects($this->at(2))->method('out')
->with(new PHPUnit_Framework_Constraint_PCREMatch('/Schema file:\s[a-z\.]+\sgenerated/'));
-
+
$this->Shell->Schema = $this->getMock('CakeSchema');
$this->Shell->Schema->path = TMP;
$this->Shell->Schema->expects($this->once())->method('read')->will($this->returnValue(array('schema data')));
@@ -336,7 +336,7 @@ public function testGenerateOverwrite() {
*/
public function testGenerateWithPlugins() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::load('TestPlugin');
@@ -377,7 +377,7 @@ public function testCreateNoArgs() {
$this->Shell->create();
$db = ConnectionManager::getDataSource('test');
-
+
$db->cacheSources = false;
$sources = $db->listSources();
$this->assertTrue(in_array($db->config['prefix'] . 'i18n', $sources));
@@ -400,7 +400,7 @@ public function testCreateWithTableArgs() {
$this->Shell->params = array(
'connection' => 'test',
'name' => 'DbAcl',
- 'path' => CONFIGS . 'schema'
+ 'path' => APP . 'Config' . DS . 'schema'
);
$this->Shell->args = array('DbAcl', 'acos');
$this->Shell->startup();
@@ -439,7 +439,7 @@ public function testUpdateWithTable() {
$this->Shell->expects($this->any())->method('in')->will($this->returnValue('y'));
$this->Shell->expects($this->once())->method('__run')
->with($this->arrayHasKey('articles'), 'update', $this->isInstanceOf('CakeSchema'));
-
+
$this->Shell->update();
}
@@ -450,7 +450,7 @@ public function testUpdateWithTable() {
*/
public function testPluginParam() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$this->Shell->params = array(
@@ -458,7 +458,7 @@ public function testPluginParam() {
'connection' => 'test'
);
$this->Shell->startup();
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Config' . DS . 'Schema';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'Config' . DS . 'Schema';
$this->assertEqual($this->Shell->Schema->path, $expected);
CakePlugin::unload();
}
@@ -470,7 +470,7 @@ public function testPluginParam() {
*/
public function testPluginDotSyntaxWithCreate() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$this->Shell->params = array(
diff --git a/lib/Cake/Test/Case/Console/Command/ShellTest.php b/lib/Cake/Test/Case/Console/Command/ShellTest.php
index 28ddef75664..81438269f41 100644
--- a/lib/Cake/Test/Case/Console/Command/ShellTest.php
+++ b/lib/Cake/Test/Case/Console/Command/ShellTest.php
@@ -57,17 +57,17 @@ protected function _stop($status = 0) {
}
public function do_something() {
-
+
}
-
+
public function _secret() {
-
+
}
-
+
protected function no_access() {
-
+
}
-
+
public function mergeVars($properties, $class, $normalize = true) {
return $this->_mergeVars($properties, $class, $normalize);
}
@@ -169,8 +169,8 @@ function testMergeVars() {
*/
public function testInitialize() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
), true);
$this->Shell->uses = array('TestPlugin.TestPluginPost');
@@ -408,7 +408,7 @@ public function testError() {
*
* @return void
*/
- public function testLoadTasks() {
+ public function testLoadTasks() {
$this->assertTrue($this->Shell->loadTasks());
$this->Shell->tasks = null;
@@ -451,9 +451,9 @@ function test__getArgAndParamReferences() {
$this->Shell->params = array('help' => false);
$this->Shell->loadTasks();
$result = $this->Shell->TestApple;
-
+
$this->Shell->args = array('one', 'two');
-
+
$this->assertSame($this->Shell->args, $result->args);
$this->assertSame($this->Shell->params, $result->params);
}
@@ -546,7 +546,7 @@ function testCreateFileInteractive() {
$this->Shell->stdin->expects($this->at(0))
->method('read')
->will($this->returnValue('n'));
-
+
$this->Shell->stdin->expects($this->at(1))
->method('read')
->will($this->returnValue('y'));
@@ -651,11 +651,11 @@ function testCreateFileWindowsInteractive() {
function testHasTask() {
$this->Shell->tasks = array('Extract', 'DbConfig');
$this->Shell->loadTasks();
-
+
$this->assertTrue($this->Shell->hasTask('extract'));
$this->assertTrue($this->Shell->hasTask('Extract'));
$this->assertFalse($this->Shell->hasTask('random'));
-
+
$this->assertTrue($this->Shell->hasTask('db_config'));
$this->assertTrue($this->Shell->hasTask('DbConfig'));
}
@@ -749,7 +749,7 @@ function testRunCommandTriggeringHelp() {
->with(array('--help'))
->will($this->returnValue(array(array('help' => true), array())));
$Parser->expects($this->once())->method('help');
-
+
$Shell = $this->getMock('Shell', array('getOptionParser', 'out', 'startup', '_welcome'), array(), '', false);
$Shell->expects($this->once())->method('getOptionParser')
->will($this->returnValue($Parser));
diff --git a/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php
index 4c19f6440dd..0d55bac6c38 100644
--- a/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php
+++ b/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php
@@ -70,7 +70,7 @@ public function tearDown() {
public function testExecute() {
$this->Task->interactive = false;
- $this->Task->params['paths'] = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages';
+ $this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages';
$this->Task->params['output'] = $this->path . DS;
$this->Task->expects($this->never())->method('err');
$this->Task->expects($this->any())->method('in')
@@ -117,7 +117,7 @@ public function testExecute() {
$pattern = '/To change its layout, create: APP\/views\/layouts\/default\.ctp\./s';
$this->assertPattern($pattern, $result);
-
+
// extract.ctp
$pattern = '/\#: (\\\\|\/)extract\.ctp:6\n';
$pattern .= 'msgid "You have %d new message."\nmsgid_plural "You have %d new messages."/';
@@ -131,7 +131,7 @@ public function testExecute() {
$pattern .= '\#: (\\\\|\/)home\.ctp:99\n';
$pattern .= 'msgid "Editing this Page"\nmsgstr ""/';
$this->assertPattern($pattern, $result);
-
+
$pattern = '/\#: (\\\\|\/)extract\.ctp:17\nmsgid "';
$pattern .= 'Hot features!';
$pattern .= '\\\n - No Configuration: Set-up the database and let the magic begin';
@@ -162,7 +162,7 @@ public function testExecute() {
function testExtractWithExclude() {
$this->Task->interactive = false;
- $this->Task->params['paths'] = LIBS . 'Test' . DS . 'test_app' . DS . 'View';
+ $this->Task->params['paths'] = CAKE . 'Test' . DS . 'test_app' . DS . 'View';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['exclude'] = 'Pages,Layouts';
@@ -175,7 +175,7 @@ function testExtractWithExclude() {
$pattern = '/\#: .*extract\.ctp:6\n/';
$this->assertNotRegExp($pattern, $result);
-
+
$pattern = '/\#: .*default\.ctp:26\n/';
$this->assertNotRegExp($pattern, $result);
}
@@ -188,10 +188,10 @@ function testExtractWithExclude() {
function testExtractMultiplePaths() {
$this->Task->interactive = false;
- $this->Task->params['paths'] =
- LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages,' .
- LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Posts';
-
+ $this->Task->params['paths'] =
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Pages,' .
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Posts';
+
$this->Task->params['output'] = $this->path . DS;
$this->Task->expects($this->never())->method('err');
$this->Task->expects($this->never())->method('_stop');
diff --git a/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php
index b4eb78dbd24..8d0bd27de0d 100644
--- a/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php
+++ b/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php
@@ -43,8 +43,8 @@ public function setUp() {
parent::setUp();
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
-
- $this->Task = $this->getMock('ProjectTask',
+
+ $this->Task = $this->getMock('ProjectTask',
array('in', 'err', 'createFile', '_stop'),
array($out, $out, $in)
);
@@ -70,7 +70,7 @@ public function tearDown() {
* @return void
*/
protected function _setupTestProject() {
- $skel = LIBS . 'Console' . DS . 'templates' . DS . 'skel';
+ $skel = CAKE . 'Console' . DS . 'templates' . DS . 'skel';
$this->Task->expects($this->at(0))->method('in')->will($this->returnValue('y'));
$this->Task->bake($this->Task->path . 'bake_test_app', $skel);
}
@@ -91,12 +91,12 @@ public function testBake() {
'Console',
'Console' . DS . 'Command',
'Console' . DS . 'Command' . DS . 'Task',
- 'Controller',
- 'Model',
+ 'Controller',
+ 'Model',
'View',
'View' . DS . 'Helper',
'Test',
- 'Test' . DS . 'Case',
+ 'Test' . DS . 'Case',
'Test' . DS . 'Case' . DS . 'Model',
'Test' . DS . 'Fixture',
'tmp',
@@ -118,21 +118,21 @@ public function testBakeEmptyFlag() {
$this->Task->params['empty'] = true;
$this->_setupTestProject();
$path = $this->Task->path . 'bake_test_app';
-
+
$empty = array(
'Console' . DS . 'Command' . DS . 'Task',
- 'Controller' . DS . 'Component',
- 'Model' . DS . 'Behavior',
+ 'Controller' . DS . 'Component',
+ 'Model' . DS . 'Behavior',
'View' . DS . 'Helper',
'View' . DS . 'Errors',
'View' . DS . 'Scaffolds',
- 'Test' . DS . 'Case' . DS . 'Model',
+ 'Test' . DS . 'Case' . DS . 'Model',
'Test' . DS . 'Case' . DS . 'Controller',
'Test' . DS . 'Case' . DS . 'View' . DS . 'Helper',
'Test' . DS . 'Fixture',
'webroot' . DS . 'js'
);
-
+
foreach ($empty as $dir) {
$this->assertTrue(is_file($path . DS . $dir . DS . 'empty'), 'Missing empty file in ' . $dir);
}
@@ -220,7 +220,7 @@ public function testGetPrefix() {
* @return void
*/
public function testCakeAdmin() {
- $file = new File(CONFIGS . 'core.php');
+ $file = new File(APP . 'Config' . DS . 'core.php');
$contents = $file->read();;
$file = new File(TMP . 'tests' . DS . 'core.php');
$file->write($contents);
@@ -255,7 +255,7 @@ public function testGetPrefixWithMultiplePrefixes() {
* @return void
*/
public function testExecute() {
- $this->Task->params['skel'] = LIBS . 'Console' . DS. 'templates' . DS . 'skel';
+ $this->Task->params['skel'] = CAKE . 'Console' . DS. 'templates' . DS . 'skel';
$this->Task->params['working'] = TMP . 'tests' . DS;
$path = $this->Task->path . 'bake_test_app';
@@ -281,7 +281,7 @@ public function testExecute() {
*/
function testConsolePath() {
$this->_setupTestProject();
-
+
$path = $this->Task->path . 'bake_test_app' . DS;
$result = $this->Task->consolePath($path);
$this->assertTrue($result);
diff --git a/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php
index a19e9bf1293..e214b41a1d2 100644
--- a/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php
+++ b/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php
@@ -42,7 +42,7 @@ public function setup() {
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
- $this->Task = $this->getMock('TemplateTask',
+ $this->Task = $this->getMock('TemplateTask',
array('in', 'err', 'createFile', '_stop', 'clear'),
array($out, $out, $in)
);
@@ -73,7 +73,7 @@ public function testSet() {
$this->assertEqual($this->Task->templateVars['one'], 'three');
$this->assertTrue(isset($this->Task->templateVars['four']));
$this->assertEqual($this->Task->templateVars['four'], 'five');
-
+
$this->Task->templateVars = array();
$this->Task->set(array(3 => 'three', 4 => 'four'));
$this->Task->set(array(1 => 'one', 2 => 'two'));
@@ -87,7 +87,7 @@ public function testSet() {
* @return void
*/
public function testFindingInstalledThemesForBake() {
- $consoleLibs = LIBS . 'Console' . DS;
+ $consoleLibs = CAKE . 'Console' . DS;
$this->Task->initialize();
$this->assertEqual($this->Task->templatePaths['default'], $consoleLibs . 'templates' . DS . 'default' . DS);
}
@@ -99,7 +99,7 @@ public function testFindingInstalledThemesForBake() {
* @return void
*/
public function testGetThemePath() {
- $defaultTheme = LIBS . dirname(CONSOLE_LIBS) . 'templates' . DS . 'default' .DS;
+ $defaultTheme = CAKE . 'Console' . DS . 'templates' . DS . 'default' .DS;
$this->Task->templatePaths = array('default' => $defaultTheme);
$this->Task->expects($this->exactly(1))->method('in')->will($this->returnValue('1'));
@@ -126,7 +126,7 @@ public function testGetThemePath() {
public function testGenerate() {
App::build(array(
'Console' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Console' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS
)
));
$this->Task->initialize();
@@ -146,7 +146,7 @@ public function testGenerate() {
public function testGenerateWithTemplateFallbacks() {
App::build(array(
'Console' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Console' . DS,
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS,
CAKE_CORE_INCLUDE_PATH . DS . 'console' . DS
)
));
diff --git a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
index fd811d67afe..534d898ee20 100644
--- a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
+++ b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
@@ -242,7 +242,7 @@ public function setup() {
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
- $this->Task = $this->getMock('TestTask',
+ $this->Task = $this->getMock('TestTask',
array('in', 'err', 'createFile', '_stop', 'isLoadableClass'),
array($out, $out, $in)
);
@@ -542,7 +542,7 @@ public function testBakeWithPlugin() {
* @return void
*/
function testInteractiveWithPlugin() {
- $testApp = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS;
+ $testApp = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS;
App::build(array(
'plugins' => array($testApp)
), true);
@@ -555,8 +555,8 @@ function testInteractiveWithPlugin() {
->will($this->onConsecutiveCalls(
5, //helper
1 //OtherHelper
- ));
-
+ ));
+
$this->Task->expects($this->once())
->method('createFile')
->with($path, $this->anything());
@@ -564,7 +564,7 @@ function testInteractiveWithPlugin() {
$this->Task->stdout->expects($this->at(21))
->method('write')
->with('1. OtherHelperHelper');
-
+
$this->Task->execute();
}
diff --git a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php
index 08ca66ea629..c5bb2a31917 100644
--- a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php
+++ b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php
@@ -117,10 +117,10 @@ public function setUp() {
parent::setUp();
App::build(array(
'plugins' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
),
'Console/Command' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
)
), true);
CakePlugin::loadAll();
diff --git a/lib/Cake/Test/Case/Console/TaskCollectionTest.php b/lib/Cake/Test/Case/Console/TaskCollectionTest.php
index 0b11ce39a8d..1d8d9961dbe 100644
--- a/lib/Cake/Test/Case/Console/TaskCollectionTest.php
+++ b/lib/Cake/Test/Case/Console/TaskCollectionTest.php
@@ -88,7 +88,7 @@ function testLoadPluginTask() {
$dispatcher = $this->getMock('ShellDispatcher', array(), array(), '', false);
$shell = $this->getMock('Shell', array(), array(), '', false);
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$this->Tasks = new TaskCollection($shell, $dispatcher);
@@ -119,4 +119,4 @@ function testUnload() {
$this->assertEquals(array('Extract'), $result, 'loaded tasks is wrong');
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php
index 597ddce5d55..43098a3f44c 100644
--- a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php
+++ b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php
@@ -16,7 +16,7 @@
* @since CakePHP(tm) v 1.2.0.5435
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-
+
App::uses('AclComponent', 'Controller/Component');
App::uses('AclNode', 'Model');
class_exists('AclComponent');
@@ -210,7 +210,7 @@ function tearDown() {
}
/**
- * test that construtor throws an exception when Acl.classname is a
+ * test that construtor throws an exception when Acl.classname is a
* non-existant class
*
* @expectedException CakeException
@@ -262,7 +262,7 @@ class IniAclTest extends CakeTestCase {
* @return void
*/
function testCheck() {
- $iniFile = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.ini.php';
+ $iniFile = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.ini.php';
$Ini = new IniAcl();
$Ini->config = $Ini->readConfigFile($iniFile);
@@ -285,7 +285,7 @@ function testCheck() {
* @return void
*/
function testCheckArray() {
- $iniFile = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.ini.php';
+ $iniFile = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS . 'acl.ini.php';
$Ini = new IniAcl();
$Ini->config = $Ini->readConfigFile($iniFile);
diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php
index b43c50c2238..19611674ba9 100644
--- a/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php
+++ b/lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php
@@ -21,7 +21,7 @@
App::uses('CakeResponse', 'Network');
-require_once CAKE_TESTS . 'Case' . DS . 'Model' . DS . 'models.php';
+require_once CAKE . 'Test' . DS . 'Case' . DS . 'Model' . DS . 'models.php';
/**
* Test case for BasicAuthentication
@@ -100,7 +100,7 @@ function testAuthenticateNoData() {
function testAuthenticateNoUsername() {
$request = new CakeRequest('posts/index', false);
$_SERVER['PHP_AUTH_PW'] = 'foobar';
-
+
$this->response->expects($this->once())
->method('header')
->with('WWW-Authenticate: Basic realm="localhost"');
@@ -117,7 +117,7 @@ function testAuthenticateNoPassword() {
$request = new CakeRequest('posts/index', false);
$_SERVER['PHP_AUTH_USER'] = 'mariano';
$_SERVER['PHP_AUTH_PW'] = null;
-
+
$this->response->expects($this->once())
->method('header')
->with('WWW-Authenticate: Basic realm="localhost"');
@@ -152,10 +152,10 @@ function testAuthenticateChallenge() {
$this->response->expects($this->at(0))
->method('header')
->with('WWW-Authenticate: Basic realm="localhost"');
-
+
$this->response->expects($this->at(1))
->method('send');
-
+
$result = $this->auth->authenticate($request, $this->response);
$this->assertFalse($result);
}
@@ -201,11 +201,11 @@ function testAuthenticateFailReChallenge() {
$this->response->expects($this->at(1))
->method('statusCode')
->with(401);
-
+
$this->response->expects($this->at(2))
->method('send');
$this->assertFalse($this->auth->authenticate($request, $this->response));
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php
index 72047c5e83e..373e8bcbcde 100644
--- a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php
+++ b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php
@@ -19,7 +19,7 @@
App::uses('CakeRequest', 'Network');
App::uses('CakeResponse', 'Network');
-require_once CAKE_TESTS . 'Case' . DS . 'Model' . DS . 'models.php';
+require_once CAKE . 'Test' . DS . 'Case' . DS . 'Model' . DS . 'models.php';
/**
* Test case for DigestAuthentication
@@ -116,7 +116,7 @@ function testAuthenticateWrongUsername() {
response="6629fae49393a05397450978507c4ef1",
opaque="123abc"
DIGEST;
-
+
$this->response->expects($this->at(0))
->method('header')
->with('WWW-Authenticate: Digest realm="localhost",qop="auth",nonce="123",opaque="123abc"');
@@ -124,7 +124,7 @@ function testAuthenticateWrongUsername() {
$this->response->expects($this->at(1))
->method('statusCode')
->with(401);
-
+
$this->response->expects($this->at(2))
->method('send');
@@ -143,14 +143,14 @@ function testAuthenticateChallenge() {
$this->response->expects($this->at(0))
->method('header')
->with('WWW-Authenticate: Digest realm="localhost",qop="auth",nonce="123",opaque="123abc"');
-
+
$this->response->expects($this->at(1))
->method('statusCode')
->with(401);
-
+
$this->response->expects($this->at(2))
->method('send');
-
+
$result = $this->auth->authenticate($request, $this->response);
$this->assertFalse($result);
}
@@ -211,11 +211,11 @@ function testAuthenticateFailReChallenge() {
$this->response->expects($this->at(0))
->method('header')
->with('WWW-Authenticate: Digest realm="localhost",qop="auth",nonce="123",opaque="123abc"');
-
+
$this->response->expects($this->at(1))
->method('statusCode')
->with(401);
-
+
$this->response->expects($this->at(2))
->method('send');
@@ -300,4 +300,4 @@ function testPassword() {
$expected = md5('mark:localhost:password');
$this->assertEquals($expected, $result);
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php b/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php
index 70397d997fe..384b73fb0ad 100644
--- a/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php
+++ b/lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticate.php
@@ -20,7 +20,7 @@
App::uses('CakeRequest', 'Network');
App::uses('CakeResponse', 'Network');
-require_once CAKE_TESTS . 'Case' . DS . 'Model' . DS . 'models.php';
+require_once CAKE . 'Test' . DS . 'Case' . DS . 'Model' . DS . 'models.php';
/**
* Test case for FormAuthentication
@@ -155,7 +155,7 @@ function testAuthenticateScopeFail() {
function testPluginModel() {
Cache::delete('object_map', '_cake_core_');
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
), true);
CakePlugin::load('TestPlugin');
@@ -164,10 +164,10 @@ function testPluginModel() {
$user['username'] = 'gwoo';
$user['password'] = Security::hash(Configure::read('Security.salt') . 'cake');
$PluginModel->save($user, false);
-
+
$this->auth->settings['userModel'] = 'TestPlugin.TestPluginAuthUser';
$this->auth->settings['fields']['username'] = 'username';
-
+
$request = new CakeRequest('posts/index', false);
$request->data = array('TestPluginAuthUser' => array(
'username' => 'gwoo',
@@ -185,4 +185,4 @@ function testPluginModel() {
CakePlugin::unload();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
index ea54ff89fdc..01079fbec9c 100644
--- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
+++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
@@ -887,7 +887,7 @@ function testLoginRedirect() {
function testNoRedirectOnLoginAction() {
$controller = $this->getMock('Controller');
$controller->methods = array('login');
-
+
$url = '/AuthTest/login';
$this->Auth->request = $controller->request = new CakeRequest($url);
$this->Auth->request->addParams(Router::parse($url));
@@ -951,7 +951,7 @@ function testAdminRoute() {
*/
function testAjaxLogin() {
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$_SERVER['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest";
@@ -1127,7 +1127,7 @@ function testFlashSettings() {
$this->Auth->Session->expects($this->once())
->method('setFlash')
->with('Auth failure', 'custom', array(1), 'auth-key');
-
+
$this->Auth->flash = array(
'element' => 'custom',
'params' => array(1),
@@ -1187,6 +1187,6 @@ function testPassword() {
$result = $this->Auth->password('password');
$expected = Security::hash('password', null, true);
$this->assertEquals($expected, $result);
-
+
}
}
diff --git a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php
index 82e9e80c4b6..24711f0cbc8 100644
--- a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php
+++ b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php
@@ -157,7 +157,7 @@ function setUp() {
$this->Controller->EmailTest->initialize($this->Controller, array());
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
}
@@ -432,7 +432,7 @@ function testSendDebugWithNoSessions() {
*/
function testMessageRetrievalWithoutTemplate() {
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$this->Controller->EmailTest->to = 'postmaster@example.com';
@@ -470,7 +470,7 @@ function testMessageRetrievalWithoutTemplate() {
*/
function testMessageRetrievalWithTemplate() {
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$this->Controller->set('value', 22091985);
@@ -799,8 +799,8 @@ function testReset() {
function testPluginCustomViewClass() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$this->Controller->view = 'TestPlugin.Email';
diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
index fea7d68135d..31d81ff48a1 100644
--- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
+++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
@@ -373,7 +373,7 @@ function testRenderAsWithAttachment() {
$this->RequestHandler->request->expects($this->any())
->method('accepts')
->will($this->returnValue(array('application/xml')));
-
+
$this->RequestHandler->response = $this->getMock('CakeResponse', array('type', 'download', 'charset'));
$this->RequestHandler->response->expects($this->at(0))
->method('type')
@@ -384,7 +384,7 @@ function testRenderAsWithAttachment() {
$this->RequestHandler->response->expects($this->at(2))
->method('download')
->with('myfile.xml');
-
+
$this->RequestHandler->renderAs($this->Controller, 'xml', array('attachment' => 'myfile.xml'));
$expected = 'RequestHandlerTest' . DS . 'xml';
@@ -417,17 +417,17 @@ function testRespondAs() {
*/
function testRespondAsWithAttachment() {
$this->RequestHandler = $this->getMock(
- 'RequestHandlerComponent',
- array('_header'),
+ 'RequestHandlerComponent',
+ array('_header'),
array(&$this->Controller->Components)
);
$this->RequestHandler->response = $this->getMock('CakeResponse', array('type', 'download'));
$this->RequestHandler->request = $this->getMock('CakeRequest');
-
+
$this->RequestHandler->request->expects($this->once())
->method('accepts')
->will($this->returnValue(array('application/xml')));
-
+
$this->RequestHandler->response->expects($this->once())->method('download')
->with('myfile.xml');
$this->RequestHandler->response->expects($this->once())->method('type')
@@ -547,7 +547,7 @@ function testMobileDeviceDetection() {
$request->expects($this->once())->method('is')
->with('mobile')
->will($this->returnValue(true));
-
+
$this->RequestHandler->request = $request;
$this->assertTrue($this->RequestHandler->isMobile());
}
@@ -563,7 +563,7 @@ function testRequestProperties() {
$request->expects($this->once())->method('is')
->with('ssl')
->will($this->returnValue(true));
-
+
$this->RequestHandler->request = $request;
$this->assertTrue($this->RequestHandler->isSsl());
}
@@ -583,15 +583,15 @@ function testRequestMethod() {
$request->expects($this->at(1))->method('is')
->with('post')
->will($this->returnValue(false));
-
+
$request->expects($this->at(2))->method('is')
->with('delete')
->will($this->returnValue(true));
-
+
$request->expects($this->at(3))->method('is')
->with('put')
->will($this->returnValue(false));
-
+
$this->RequestHandler->request = $request;
$this->assertTrue($this->RequestHandler->isGet());
$this->assertFalse($this->RequestHandler->isPost());
@@ -613,7 +613,7 @@ function testMapAlias() {
$result = $this->RequestHandler->mapAlias('wap');
$this->assertEquals('text/vnd.wap.wml', $result);
-
+
$result = $this->RequestHandler->mapAlias(array('xml', 'js', 'json'));
$expected = array('application/xml', 'text/javascript', 'application/json');
$this->assertEquals($expected, $result);
@@ -695,7 +695,7 @@ function testClientProperties() {
*/
function testAjaxRedirectAsRequestAction() {
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
), true);
$this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
@@ -724,7 +724,7 @@ function testAjaxRedirectAsRequestAction() {
*/
function testAjaxRedirectAsRequestActionStillRenderingLayout() {
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
), true);
$this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
diff --git a/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php b/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php
index f21fc7d1f14..03e49179dbb 100644
--- a/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php
+++ b/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php
@@ -84,7 +84,7 @@ function testLoadWithAlias() {
$result = $this->Components->load('Cookie');
$this->assertInstanceOf('CookieAliasComponent', $result);
- App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
+ App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
CakePlugin::load('TestPlugin');
$result = $this->Components->load('SomeOther', array('className' => 'TestPlugin.OtherComponent'));
$this->assertInstanceOf('OtherComponentComponent', $result);
@@ -125,7 +125,7 @@ function testLoadMissingComponentFile() {
*/
function testLoadPluginComponent() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
CakePlugin::load('TestPlugin');
$result = $this->Components->load('TestPlugin.OtherComponent');
@@ -171,4 +171,4 @@ function testGetController() {
$this->assertSame($controller, $result);
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/Controller/ComponentTest.php b/lib/Cake/Test/Case/Controller/ComponentTest.php
index a93e231e2ed..b9cc715c560 100644
--- a/lib/Cake/Test/Case/Controller/ComponentTest.php
+++ b/lib/Cake/Test/Case/Controller/ComponentTest.php
@@ -251,7 +251,7 @@ class ComponentTest extends CakeTestCase {
function setUp() {
$this->_pluginPaths = App::path('plugins');
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
}
@@ -316,10 +316,10 @@ function testMultipleComponentInitialize() {
$Collection = new ComponentCollection();
$Banana = $Collection->load('Banana');
$Orange = $Collection->load('Orange');
-
+
$this->assertSame($Banana, $Orange->Banana, 'Should be references');
$Banana->testField = 'OrangeField';
-
+
$this->assertSame($Banana->testField, $Orange->Banana->testField, 'References are broken');
}
diff --git a/lib/Cake/Test/Case/Controller/ControllerTest.php b/lib/Cake/Test/Case/Controller/ControllerTest.php
index 75ebf7625db..97f0b5ccbc6 100644
--- a/lib/Cake/Test/Case/Controller/ControllerTest.php
+++ b/lib/Cake/Test/Case/Controller/ControllerTest.php
@@ -439,9 +439,9 @@ function testLoadModel() {
*/
function testLoadModelInPlugins() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- 'Controller' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
- 'Model' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'Controller' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
+ 'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
));
CakePlugin::load('TestPlugin');
App::uses('TestPluginAppController', 'TestPlugin.Controller');
@@ -482,7 +482,7 @@ function testConstructClasses() {
unset($Controller);
- App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
+ App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
CakePlugin::load('TestPlugin');
$Controller = new Controller($request);
@@ -572,7 +572,7 @@ function testFlash() {
$this->assertEqual($result, $expected);
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$Controller = new Controller($request);
$Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));
@@ -634,7 +634,7 @@ function testControllerSet() {
*/
function testRender() {
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
), true);
$request = new CakeRequest('controller_posts/index');
$request->params['action'] = 'index';
@@ -680,7 +680,7 @@ function testRender() {
function testComponentBeforeRenderChangingViewClass() {
App::build(array(
'View' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
)
), true);
$Controller = new Controller($this->getMock('CakeRequest'));
diff --git a/lib/Cake/Test/Case/Controller/PagesControllerTest.php b/lib/Cake/Test/Case/Controller/PagesControllerTest.php
index cebf1c365bb..ffcd0668afd 100644
--- a/lib/Cake/Test/Case/Controller/PagesControllerTest.php
+++ b/lib/Cake/Test/Case/Controller/PagesControllerTest.php
@@ -45,7 +45,7 @@ function endTest() {
function testDisplay() {
App::build(array(
'View' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
)
));
$Pages = new PagesController(new CakeRequest(null, false));
diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php
index b0eec3a18a9..c377ba9c059 100644
--- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php
+++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php
@@ -279,8 +279,8 @@ function setUp() {
$this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader'));
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
}
@@ -307,39 +307,39 @@ function testGetViewFilename() {
$this->Controller->request->params['action'] = 'index';
$ScaffoldView = new TestScaffoldView($this->Controller);
$result = $ScaffoldView->testGetFilename('index');
- $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'index.ctp';
+ $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'index.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('edit');
- $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'form.ctp';
+ $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('add');
- $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'form.ctp';
+ $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('view');
- $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'view.ctp';
+ $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'view.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('admin_index');
- $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'index.ctp';
+ $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'index.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('admin_view');
- $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'view.ctp';
+ $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'view.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('admin_edit');
- $expected =LIBS . 'View' . DS . 'scaffolds' . DS . 'form.ctp';
+ $expected =CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('admin_add');
- $expected = LIBS . 'View' . DS . 'scaffolds' . DS . 'form.ctp';
+ $expected = CAKE . 'View' . DS . 'scaffolds' . DS . 'form.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('error');
- $expected = LIBS . 'View' . DS . 'errors' . DS . 'scaffold_error.ctp';
+ $expected = CAKE . 'View' . DS . 'errors' . DS . 'scaffold_error.ctp';
$this->assertEqual($result, $expected);
$Controller = new ScaffoldMockController($this->request);
@@ -349,11 +349,11 @@ function testGetViewFilename() {
$ScaffoldView = new TestScaffoldView($Controller);
$result = $ScaffoldView->testGetFilename('admin_edit');
- $expected = LIBS . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('edit');
- $expected = LIBS . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' .DS . 'View' . DS . 'Posts' . DS . 'scaffold.form.ctp';
$this->assertEqual($result, $expected);
$Controller = new ScaffoldMockController($this->request);
@@ -368,12 +368,12 @@ function testGetViewFilename() {
$ScaffoldView = new TestScaffoldView($Controller);
$result = $ScaffoldView->testGetFilename('admin_add');
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin'
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'
. DS .'test_plugin' . DS . 'View' . DS . 'tests' . DS . 'scaffold.form.ctp';
$this->assertEqual($result, $expected);
$result = $ScaffoldView->testGetFilename('add');
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin'
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'
. DS .'test_plugin' . DS . 'View' . DS . 'tests' . DS . 'scaffold.form.ctp';
$this->assertEqual($result, $expected);
@@ -392,7 +392,7 @@ function testGetViewFileNameWithTheme() {
$ScaffoldView = new TestScaffoldView($this->Controller);
$result = $ScaffoldView->testGetFilename('index');
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS
. 'themed' . DS . 'test_theme' . DS . 'posts' . DS . 'scaffold.index.ctp';
$this->assertEqual($result, $expected);
}
@@ -456,7 +456,7 @@ function testViewScaffold() {
'action' => 'view',
);
$this->Controller->request->addParams($params);
-
+
//set router.
Router::reload();
Router::setRequestInfo($this->Controller->request);
diff --git a/lib/Cake/Test/Case/Core/AppTest.php b/lib/Cake/Test/Case/Core/AppTest.php
index 6edd0758d2d..1ca7c6324f7 100644
--- a/lib/Cake/Test/Case/Core/AppTest.php
+++ b/lib/Cake/Test/Case/Core/AppTest.php
@@ -221,22 +221,22 @@ function testBuildWithReset() {
*/
function testCore() {
$model = App::core('Model');
- $this->assertEqual(array(LIBS . 'Model' . DS), $model);
+ $this->assertEqual(array(CAKE . 'Model' . DS), $model);
$view = App::core('View');
- $this->assertEqual(array(LIBS . 'View' . DS), $view);
+ $this->assertEqual(array(CAKE . 'View' . DS), $view);
$controller = App::core('Controller');
- $this->assertEqual(array(LIBS . 'Controller' . DS), $controller);
+ $this->assertEqual(array(CAKE . 'Controller' . DS), $controller);
$component = App::core('Controller/Component');
- $this->assertEqual(array(LIBS . 'Controller' . DS . 'Component' . DS), str_replace('/', DS, $component));
+ $this->assertEqual(array(CAKE . 'Controller' . DS . 'Component' . DS), str_replace('/', DS, $component));
$auth = App::core('Controller/Component/Auth');
- $this->assertEqual(array(LIBS . 'Controller' . DS . 'Component' . DS . 'Auth' . DS), str_replace('/', DS, $auth));
+ $this->assertEqual(array(CAKE . 'Controller' . DS . 'Component' . DS . 'Auth' . DS), str_replace('/', DS, $auth));
$datasource = App::core('Model/Datasource');
- $this->assertEqual(array(LIBS . 'Model' . DS . 'Datasource' . DS), str_replace('/', DS, $datasource));
+ $this->assertEqual(array(CAKE . 'Model' . DS . 'Datasource' . DS), str_replace('/', DS, $datasource));
}
/**
@@ -246,7 +246,7 @@ function testCore() {
* @return void
*/
function testListObjects() {
- $result = App::objects('class', LIBS . 'Routing', false);
+ $result = App::objects('class', CAKE . 'Routing', false);
$this->assertTrue(in_array('Dispatcher', $result));
$this->assertTrue(in_array('Router', $result));
@@ -300,7 +300,7 @@ function testListObjects() {
App::build(array(
'plugins' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS
)
));
$result = App::objects('plugin', null, false);
@@ -317,8 +317,8 @@ function testListObjects() {
*/
function testListObjectsInPlugin() {
App::build(array(
- 'Model' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::loadAll();
@@ -369,16 +369,16 @@ function testListObjectsInPlugin() {
*/
function testPluginPath() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::loadAll();
$path = App::pluginPath('TestPlugin');
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
$this->assertEqual($path, $expected);
$path = App::pluginPath('TestPluginTwo');
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS;
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS;
$this->assertEqual($path, $expected);
App::build();
}
@@ -390,14 +390,14 @@ function testPluginPath() {
*/
function testThemePath() {
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
));
$path = App::themePath('test_theme');
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
$this->assertEqual($path, $expected);
$path = App::themePath('TestTheme');
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS;
$this->assertEqual($path, $expected);
App::build();
@@ -490,8 +490,8 @@ function testClassLoading() {
*/
function testPluginImporting() {
App::build(array(
- 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::loadAll();
@@ -534,7 +534,7 @@ function testImportingHelpersFromAlternatePaths() {
$this->assertFalse(class_exists('BananaHelper', false), 'BananaHelper exists, cannot test importing it.');
App::build(array(
'View/Helper' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Helper' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Helper' . DS
)
));
$this->assertFalse(class_exists('BananaHelper', false), 'BananaHelper exists, cannot test importing it.');
@@ -551,10 +551,10 @@ function testImportingHelpersFromAlternatePaths() {
* @return void
*/
function testFileLoading () {
- $file = App::import('File', 'RealFile', false, array(), LIBS . 'Config' . DS . 'config.php');
+ $file = App::import('File', 'RealFile', false, array(), CAKE . 'Config' . DS . 'config.php');
$this->assertTrue($file);
- $file = App::import('File', 'NoFile', false, array(), LIBS . 'Config' . DS . 'cake' . DS . 'config.php');
+ $file = App::import('File', 'NoFile', false, array(), CAKE . 'Config' . DS . 'cake' . DS . 'config.php');
$this->assertFalse($file);
}
@@ -566,12 +566,12 @@ function testFileLoading () {
*/
function testFileLoadingWithArray() {
$type = array('type' => 'File', 'name' => 'SomeName', 'parent' => false,
- 'file' => LIBS . DS . 'Config' . DS . 'config.php');
+ 'file' => CAKE . DS . 'Config' . DS . 'config.php');
$file = App::import($type);
$this->assertTrue($file);
$type = array('type' => 'File', 'name' => 'NoFile', 'parent' => false,
- 'file' => LIBS . 'Config' . DS . 'cake' . DS . 'config.php');
+ 'file' => CAKE . 'Config' . DS . 'cake' . DS . 'config.php');
$file = App::import($type);
$this->assertFalse($file);
}
@@ -583,13 +583,13 @@ function testFileLoadingWithArray() {
* @return void
*/
function testFileLoadingReturnValue () {
- $file = App::import('File', 'Name', false, array(), LIBS . 'Config' . DS . 'config.php', true);
+ $file = App::import('File', 'Name', false, array(), CAKE . 'Config' . DS . 'config.php', true);
$this->assertTrue(!empty($file));
$this->assertTrue(isset($file['Cake.version']));
$type = array('type' => 'File', 'name' => 'OtherName', 'parent' => false,
- 'file' => LIBS . 'Config' . DS . 'config.php', 'return' => true);
+ 'file' => CAKE . 'Config' . DS . 'config.php', 'return' => true);
$file = App::import($type);
$this->assertTrue(!empty($file));
@@ -603,10 +603,10 @@ function testFileLoadingReturnValue () {
* @return void
*/
function testLoadingWithSearch () {
- $file = App::import('File', 'NewName', false, array(LIBS . 'Config' . DS), 'config.php');
+ $file = App::import('File', 'NewName', false, array(CAKE . 'Config' . DS), 'config.php');
$this->assertTrue($file);
- $file = App::import('File', 'AnotherNewName', false, array(LIBS), 'config.php');
+ $file = App::import('File', 'AnotherNewName', false, array(CAKE), 'config.php');
$this->assertFalse($file);
}
@@ -622,7 +622,7 @@ function testLoadingWithSearchArray() {
'name' => 'RandomName',
'parent' => false,
'file' => 'config.php',
- 'search' => array(LIBS . 'Config' . DS)
+ 'search' => array(CAKE . 'Config' . DS)
);
$file = App::import($type);
$this->assertTrue($file);
@@ -632,7 +632,7 @@ function testLoadingWithSearchArray() {
'name' => 'AnotherRandomName',
'parent' => false,
'file' => 'config.php',
- 'search' => array(LIBS)
+ 'search' => array(CAKE)
);
$file = App::import($type);
$this->assertFalse($file);
@@ -649,7 +649,7 @@ function testMultipleLoading() {
$this->markTestSkipped('Cannot test loading of classes that exist.');
}
App::build(array(
- 'Model' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
+ 'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
));
$toLoad = array('PersisterOne', 'PersisterTwo');
$load = App::import('Model', $toLoad);
@@ -668,8 +668,8 @@ function testMultipleLoading() {
function testLoadingVendor() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- 'vendors' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'vendors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
), App::RESET);
CakePlugin::loadAll();
@@ -725,8 +725,8 @@ function testLoadingVendor() {
*/
public function testLoadClassInLibs() {
App::build(array(
- 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), App::RESET);
CakePlugin::loadAll();
diff --git a/lib/Cake/Test/Case/Core/CakePluginTest.php b/lib/Cake/Test/Case/Core/CakePluginTest.php
index 9937b36080f..4b0b4f7e14e 100644
--- a/lib/Cake/Test/Case/Core/CakePluginTest.php
+++ b/lib/Cake/Test/Case/Core/CakePluginTest.php
@@ -16,7 +16,7 @@ class CakePluginTest extends CakeTestCase {
*/
public function setUp() {
App::build(array(
- 'plugins' => array(CAKE_TESTS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
}
@@ -51,14 +51,14 @@ public function testUnload() {
CakePlugin::load('TestPlugin');
$expected = array('TestPlugin');
$this->assertEquals($expected, CakePlugin::loaded());
-
+
CakePlugin::unload('TestPlugin');
$this->assertEquals(array(), CakePlugin::loaded());
CakePlugin::load('TestPlugin');
$expected = array('TestPlugin');
$this->assertEquals($expected, CakePlugin::loaded());
-
+
CakePlugin::unload('TestFakePlugin');
$this->assertEquals($expected, CakePlugin::loaded());
}
@@ -177,10 +177,10 @@ public function testLoadNotFound() {
*/
public function testPath() {
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
- $expected = CAKE_TESTS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
$this->assertEquals(CakePlugin::path('TestPlugin'), $expected);
- $expected = CAKE_TESTS . 'test_app' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS;
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPluginTwo' . DS;
$this->assertEquals(CakePlugin::path('TestPluginTwo'), $expected);
}
@@ -243,4 +243,4 @@ public function testLoadAllWithDefaultsAndOverride() {
public function pluginBootstrap() {
Configure::write('CakePluginTest.test_plugin.bootstrap', 'called plugin bootstrap callback');
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/Core/ConfigureTest.php b/lib/Cake/Test/Case/Core/ConfigureTest.php
index f31a753ceaf..cb85fcd7597 100644
--- a/lib/Cake/Test/Case/Core/ConfigureTest.php
+++ b/lib/Cake/Test/Case/Core/ConfigureTest.php
@@ -90,7 +90,7 @@ function testRead() {
$result = Configure::read('debug');
$this->assertTrue($result >= 0);
-
+
$result = Configure::read();
$this->assertTrue(is_array($result));
$this->assertTrue(isset($result['debug']));
@@ -198,7 +198,7 @@ function testLoadExceptionOnNonExistantFile() {
* @return void
*/
function testLoadWithMerge() {
- Configure::config('test', new PhpReader(LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS));
+ Configure::config('test', new PhpReader(CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS));
$result = Configure::load('var_test', 'test');
$this->assertTrue($result);
@@ -219,7 +219,7 @@ function testLoadWithMerge() {
* @return void
*/
function testLoadNoMerge() {
- Configure::config('test', new PhpReader(LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS));
+ Configure::config('test', new PhpReader(CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS));
$result = Configure::load('var_test', 'test');
$this->assertTrue($result);
@@ -241,7 +241,7 @@ function testLoadNoMerge() {
* @return void
*/
function testLoadPlugin() {
- App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), true);
+ App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), true);
Configure::config('test', new PhpReader());
CakePlugin::load('TestPlugin');
$result = Configure::load('TestPlugin.load', 'test');
diff --git a/lib/Cake/Test/Case/Core/ObjectTest.php b/lib/Cake/Test/Case/Core/ObjectTest.php
index 0f7f023de4b..ace5a125079 100644
--- a/lib/Cake/Test/Case/Core/ObjectTest.php
+++ b/lib/Cake/Test/Case/Core/ObjectTest.php
@@ -471,9 +471,9 @@ function testPersistWithBehavior() {
Configure::write('Cache.disable', false);
App::build(array(
- 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS),
- 'behaviors' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model'. DS . 'Behavior' . DS),
+ 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS),
+ 'behaviors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model'. DS . 'Behavior' . DS),
), true);
$this->assertFalse(class_exists('PersisterOneBehaviorBehavior'));
@@ -532,8 +532,8 @@ function testPersistWithBehaviorAndRequestAction() {
$this->assertFalse(class_exists('ContainableBehavior'));
App::build(array(
- 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
- 'behaviors' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model'. DS . 'Behavior' . DS),
+ 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
+ 'behaviors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model'. DS . 'Behavior' . DS),
), true);
$this->assertFalse(class_exists('PersistOneBehaviorBehavior'));
@@ -676,9 +676,9 @@ function testMethodDispatching() {
*/
function testRequestAction() {
App::build(array(
- 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
- 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS),
- 'controllers' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Controller' . DS)
+ 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
+ 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
+ 'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS)
));
$result = $this->object->requestAction('');
$this->assertFalse($result);
@@ -716,11 +716,11 @@ function testRequestAction() {
*/
function testRequestActionPlugins() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
CakePlugin::loadAll();
Router::reload();
-
+
$result = $this->object->requestAction('/test_plugin/tests/index', array('return'));
$expected = 'test plugin index';
$this->assertEqual($result, $expected);
@@ -744,7 +744,7 @@ function testRequestActionPlugins() {
);
$expected = 25;
$this->assertEqual($result, $expected);
-
+
App::build();
CakePlugin::unload();
}
@@ -756,10 +756,10 @@ function testRequestActionPlugins() {
*/
function testRequestActionArray() {
App::build(array(
- 'models' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
- 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS),
- 'controllers' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS)
+ 'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
+ 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
+ 'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS)
));
CakePlugin::loadAll();
@@ -770,7 +770,7 @@ function testRequestActionArray() {
$this->assertEqual($result, $expected);
$result = $this->object->requestAction(
- array('controller' => 'request_action', 'action' => 'another_ra_test'),
+ array('controller' => 'request_action', 'action' => 'another_ra_test'),
array('pass' => array('5', '7'))
);
$expected = 12;
@@ -824,7 +824,7 @@ function testRequestActionParamParseAndPass() {
$this->assertEqual($result['named'], $expected);
$result = $this->object->requestAction(
- array('controller' => 'request_action', 'action' => 'params_pass'),
+ array('controller' => 'request_action', 'action' => 'params_pass'),
array('named' => array('sort' => 'desc', 'limit' => 5))
);
$this->assertEqual($result['named'], $expected);
diff --git a/lib/Cake/Test/Case/Error/ErrorHandlerTest.php b/lib/Cake/Test/Case/Error/ErrorHandlerTest.php
index a045f4ad572..2e4399f1751 100644
--- a/lib/Cake/Test/Case/Error/ErrorHandlerTest.php
+++ b/lib/Cake/Test/Case/Error/ErrorHandlerTest.php
@@ -37,7 +37,7 @@ class ErrorHandlerTest extends CakeTestCase {
function setUp() {
App::build(array(
'View' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
)
), true);
Router::reload();
@@ -230,7 +230,7 @@ function testHandleExceptionLog() {
function testLoadPluginHanlder() {
App::build(array(
'plugins' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
)
), true);
CakePlugin::load('TestPlugin');
diff --git a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php
index beca8eac2d0..ac4484b2b2e 100644
--- a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php
+++ b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php
@@ -158,7 +158,7 @@ class ExceptionRendererTest extends CakeTestCase {
function setUp() {
App::build(array(
'views' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
)
), true);
Router::reload();
@@ -203,7 +203,7 @@ protected function _mockResponse($error) {
*/
function testSubclassMethodsNotBeingConvertedToError() {
Configure::write('debug', 2);
-
+
$exception = new MissingWidgetThingException('Widget not found');
$ExceptionRenderer = $this->_mockResponse(new MyCustomExceptionRenderer($exception));
@@ -240,10 +240,10 @@ function testSubclassMethodsNotBeingConvertedDebug0() {
*/
function testSubclassConvertingFrameworkErrors() {
Configure::write('debug', 0);
-
+
$exception = new MissingControllerException('PostsController');
$ExceptionRenderer = $this->_mockResponse(new MyCustomExceptionRenderer($exception));
-
+
$this->assertEqual('error400', $ExceptionRenderer->method);
ob_start();
diff --git a/lib/Cake/Test/Case/I18n/I18nTest.php b/lib/Cake/Test/Case/I18n/I18nTest.php
index 5c4f8766971..f5024fd62a9 100644
--- a/lib/Cake/Test/Case/I18n/I18nTest.php
+++ b/lib/Cake/Test/Case/I18n/I18nTest.php
@@ -34,8 +34,8 @@ class I18nTest extends CakeTestCase {
function setUp() {
Cache::delete('object_map', '_cake_core_');
App::build(array(
- 'locales' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Locale' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::loadAll();
}
@@ -89,7 +89,7 @@ function testTranslationCaching() {
$this->assertEqual($cachedDom2['LC_MESSAGES']['dom2.foo'], 'Dom 2 Foo');
$this->assertEqual($cachedDom2['LC_MESSAGES']['dom2.bar'], 'Dom 2 Bar');
- // modify cache entry manually to verify that dom1 entries now will be read from cache
+ // modify cache entry manually to verify that dom1 entries now will be read from cache
$cachedDom1['LC_MESSAGES']['dom1.foo'] = 'FOO';
Cache::write('dom1_' . $lang, $cachedDom1, '_cake_core_');
$this->assertEqual(I18n::translate('dom1.foo', false, 'dom1'), 'FOO');
@@ -2432,7 +2432,7 @@ function testNoCoreTranslation () {
*/
function testPluginTranslation() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
Configure::write('Config.language', 'po');
@@ -2649,9 +2649,9 @@ function testTimeDefinition() {
function testTimeDefinitionJapanese(){
Configure::write('Config.language', 'ja_jp');
$result = __c('d_fmt', 5);
-
+
$expected = "%Y年%m月%d日";
-
+
$this->assertEqual($result, $expected);
$result = __c('am_pm', 5);
diff --git a/lib/Cake/Test/Case/Log/CakeLogTest.php b/lib/Cake/Test/Case/Log/CakeLogTest.php
index c910780f706..f20af387339 100644
--- a/lib/Cake/Test/Case/Log/CakeLogTest.php
+++ b/lib/Cake/Test/Case/Log/CakeLogTest.php
@@ -47,8 +47,8 @@ function setUp() {
*/
function testImportingLoggers() {
App::build(array(
- 'libs' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::load('TestPlugin');
diff --git a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
index 27508a12e2c..6e08327f699 100644
--- a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
+++ b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
@@ -345,11 +345,11 @@ class Test2Behavior extends TestBehavior {
public $mapMethods = array('/mappingRobot(\w+)/' => 'mapped');
function resolveMethod($model, $stuff) {
-
+
}
-
+
function mapped($model, $method, $query) {
-
+
}
}
@@ -453,7 +453,7 @@ function testLoadAlias() {
$this->assertEquals($Apple->testMethod(true), 'working');
$this->assertEquals($Apple->Behaviors->dispatchMethod($Apple, 'testMethod'), 'working');
- App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
+ App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
CakePlugin::load('TestPlugin');
$this->assertTrue($Apple->Behaviors->load('SomeOther', array('className' => 'TestPlugin.TestPluginPersisterOne')));
$this->assertInstanceOf('TestPluginPersisterOneBehavior', $Apple->Behaviors->SomeOther);
@@ -1141,7 +1141,7 @@ function testHasMethodBasic() {
$Sample = new Sample();
$Collection = new BehaviorCollection();
$Collection->init('Sample', array('Test', 'Test2'));
-
+
$this->assertTrue($Collection->hasMethod('testMethod'));
$this->assertTrue($Collection->hasMethod('resolveMethod'));
diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php
index 2abe76e7413..953fada0fe8 100644
--- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php
+++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php
@@ -503,7 +503,7 @@ class CakeSchemaTest extends CakeTestCase {
* @access public
*/
public $fixtures = array(
- 'core.post', 'core.tag', 'core.posts_tag', 'core.test_plugin_comment',
+ 'core.post', 'core.tag', 'core.posts_tag', 'core.test_plugin_comment',
'core.datatype', 'core.auth_user', 'core.author',
'core.test_plugin_article', 'core.user', 'core.comment'
);
@@ -665,7 +665,7 @@ function testSchemaReadWithConfigPrefix() {
function testSchemaReadWithPlugins() {
App::objects('model', null, false);
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
@@ -984,7 +984,7 @@ function testSchemaLoading() {
*/
function testSchemaLoadingFromPlugin() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$Other = $this->Schema->load(array('name' => 'TestPluginApp', 'plugin' => 'TestPlugin'));
diff --git a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php
index 2fdc1d0fe86..6c56e6a8eb4 100644
--- a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php
+++ b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php
@@ -80,7 +80,7 @@ public function testGetDataSourceException() {
*/
function testGetPluginDataSource() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$name = 'test_source';
@@ -102,7 +102,7 @@ function testGetPluginDataSource() {
*/
function testGetPluginDataSourceAndPluginDriver() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$name = 'test_plugin_source_and_driver';
@@ -126,7 +126,7 @@ function testGetPluginDataSourceAndPluginDriver() {
*/
function testGetLocalDataSourceAndPluginDriver() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
$name = 'test_local_source_and_plugin_driver';
@@ -149,9 +149,9 @@ function testGetLocalDataSourceAndPluginDriver() {
*/
function testGetPluginDataSourceAndLocalDriver() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'Model/Datasource/Database' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Database' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Database' . DS
)
));
@@ -272,9 +272,9 @@ function testCreateDataSourceWithIntegrationTests() {
*/
function testConnectionData() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'Model/Datasource' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS
)
));
CakePlugin::loadAll();
@@ -328,7 +328,7 @@ function testConnectionData() {
public function testDrop() {
App::build(array(
'Model/Datasource' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS
)
));
ConnectionManager::create('droppable', array('datasource' => 'Test2Source'));
diff --git a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php
index dbd87e892a6..b7cb1195b48 100644
--- a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php
+++ b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php
@@ -23,7 +23,7 @@ class TestCakeSession extends CakeSession {
public static function setUserAgent($value) {
self::$_userAgent = $value;
}
-
+
public static function setHost($host) {
self::_setHost($host);
}
@@ -143,7 +143,7 @@ function testSessionPath() {
*
* @access public
* @return void
- */
+ */
function testCakeSessionPathEmpty() {
TestCakeSession::init('');
$this->assertEquals(TestCakeSession::$path, '/', 'Session path is empty, with "" as $base needs to be /');
@@ -302,7 +302,7 @@ function testWriteEmptyKey() {
*/
function testId() {
TestCakeSession::destroy();
-
+
$result = TestCakeSession::id();
$expected = session_id();
$this->assertEquals($expected, $result);
@@ -528,9 +528,9 @@ function testReadAndWriteWithCakeStorage() {
function testUsingAppLibsHandler() {
App::build(array(
'Model/Datasource/Session' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS
),
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
Configure::write('Session', array(
'defaults' => 'cake',
@@ -551,16 +551,16 @@ function testUsingAppLibsHandler() {
*/
function testUsingPluginHandler() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
-
+
Configure::write('Session', array(
'defaults' => 'cake',
'handler' => array(
'engine' => 'TestPlugin.TestPluginSession'
)
));
-
+
TestCakeSession::destroy();
$this->assertTrue(TestCakeSession::started());
@@ -611,7 +611,7 @@ function testReadAndWriteWithCacheStorage() {
function testReadAndWriteWithCustomCacheConfig() {
Configure::write('Session.defaults', 'cache');
Configure::write('Session.handler.config', 'session_test');
-
+
Cache::config('session_test', array(
'engine' => 'File',
'prefix' => 'session_test_',
@@ -663,7 +663,7 @@ function testReadAndWriteWithDatabaseStorage() {
TestCakeSession::destroy();
$this->assertNull(TestCakeSession::read('SessionTestCase'));
-
+
Configure::write('Session', array(
'defaults' => 'php'
));
diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php
index 4dd371ef31e..77f4b9d0e01 100644
--- a/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php
+++ b/lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php
@@ -17,10 +17,10 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-require_once LIBS.'Model'.DS.'Model.php';
-require_once LIBS.'Model'.DS.'Datasource'.DS.'DataSource.php';
-require_once LIBS.'Model'.DS.'Datasource'.DS.'DboSource.php';
-require_once LIBS.'Model'.DS.'Datasource'.DS.'Database'.DS.'Mssql.php';
+require_once CAKE.'Model'.DS.'Model.php';
+require_once CAKE.'Model'.DS.'Datasource'.DS.'DataSource.php';
+require_once CAKE.'Model'.DS.'Datasource'.DS.'DboSource.php';
+require_once CAKE.'Model'.DS.'Datasource'.DS.'Database'.DS.'Mssql.php';
/**
* DboMssqlTestDb class
diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/OrcaleTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/OrcaleTest.php
index 453fc7ea0ac..8e20cbcbc61 100644
--- a/lib/Cake/Test/Case/Model/Datasource/Database/OrcaleTest.php
+++ b/lib/Cake/Test/Case/Model/Datasource/Database/OrcaleTest.php
@@ -17,8 +17,8 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-require_once LIBS . 'Model' . DS . 'Datasource' . DS . 'DboSource.php';
-require_once LIBS . 'Model' . DS . 'Datasource' . DS . 'Database' . DS . 'Oracle.php';
+require_once CAKE . 'Model' . DS . 'Datasource' . DS . 'DboSource.php';
+require_once CAKE . 'Model' . DS . 'Datasource' . DS . 'Database' . DS . 'Oracle.php';
/**
* DboOracleTest class
diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php
index e4da9ee47a4..94a312efc36 100644
--- a/lib/Cake/Test/Case/Routing/DispatcherTest.php
+++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php
@@ -20,7 +20,7 @@
App::uses('CakeResponse', 'Network');
if (!class_exists('AppController', false)) {
- require_once LIBS . 'Controller' . DS . 'AppController.php';
+ require_once CAKE . 'Controller' . DS . 'AppController.php';
} elseif (!defined('APP_CONTROLLER_EXISTS')){
define('APP_CONTROLLER_EXISTS', true);
}
@@ -436,7 +436,7 @@ class TestCachedPagesController extends Controller {
* @var string 'posts'
* @access public
*/
- public $viewPath = 'posts';
+ public $viewPath = 'Posts';
/**
* index method
@@ -739,7 +739,7 @@ public function testMissingAction() {
$this->assertEquals('Action SomePagesController::home() could not be found.', $e->getMessage());
}
}
-
+
/**
* test that methods declared in Controller are treated as missing methods.
*
@@ -765,7 +765,7 @@ function testMissingActionFromBaseClassMethods() {
*/
public function testDispatchBasic() {
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$Dispatcher = new TestDispatcher();
Configure::write('App.baseUrl', '/index.php');
@@ -813,7 +813,7 @@ public function testDispatchBasic() {
$url = new CakeRequest('test_dispatch_pages/camelCased');
$controller = $Dispatcher->dispatch($url, array('return' => 1));
$this->assertEqual('TestDispatchPages', $controller->name);
-
+
$url = new CakeRequest('test_dispatch_pages/camelCased/something. .');
$controller = $Dispatcher->dispatch($url, array('return' => 1));
$this->assertEqual($controller->params['pass'][0], 'something. .', 'Period was chopped off. %s');
@@ -857,7 +857,7 @@ public function testPluginDispatch() {
Router::reload();
$Dispatcher = new TestDispatcher();
Router::connect(
- '/my_plugin/:controller/*',
+ '/my_plugin/:controller/*',
array('plugin' => 'my_plugin', 'controller' => 'pages', 'action' => 'display')
);
@@ -1042,7 +1042,7 @@ function testPluginShortCutUrlsWithControllerThatNeedsToBeLoaded() {
}
Router::reload();
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
CakePlugin::loadAll();
@@ -1087,7 +1087,7 @@ public function testAutomaticPluginControllerMissingActionDispatch() {
$Dispatcher->base = false;
$url = new CakeRequest('my_plugin/not_here/param:value/param2:value2');
-
+
try {
$controller = $Dispatcher->dispatch($url, array('return'=> 1));
$this->fail('No exception.');
@@ -1142,7 +1142,7 @@ public function testPrefixProtection() {
public function testTestPluginDispatch() {
$Dispatcher = new TestDispatcher();
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::loadAll();
Router::reload();
@@ -1170,7 +1170,7 @@ public function testChangingParamsFromBeforeFilter() {
$_SERVER['PHP_SELF'] = '/cake/repo/branches/1.2.x.x/index.php';
$Dispatcher = new TestDispatcher();
$url = new CakeRequest('some_posts/index/param:value/param2:value2');
-
+
try {
$controller = $Dispatcher->dispatch($url, array('return'=> 1));
$this->fail('No exception.');
@@ -1200,9 +1200,9 @@ public function testAssets() {
Router::reload();
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- 'vendors' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'vendors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
CakePlugin::loadAll();
@@ -1215,7 +1215,7 @@ public function testAssets() {
} catch (MissingControllerException $e) {
$this->assertEquals('Controller class ThemeController could not be found.', $e->getMessage());
}
-
+
try {
$Dispatcher->dispatch(new CakeRequest('theme/test_theme/pdfs'));
$this->fail('No exception');
@@ -1227,21 +1227,21 @@ public function testAssets() {
$Dispatcher->dispatch(new CakeRequest('theme/test_theme/flash/theme_test.swf'));
$result = ob_get_clean();
- $file = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'flash' . DS . 'theme_test.swf');
+ $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . 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(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'pdfs' . DS . 'theme_test.pdf');
+ $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . 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(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'img' . DS . 'test.jpg');
+ $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'webroot' . DS . 'img' . DS . 'test.jpg');
$this->assertEqual($file, $result);
ob_start();
@@ -1262,20 +1262,20 @@ public function testAssets() {
ob_start();
$Dispatcher->asset('test_plugin/root.js');
$result = ob_get_clean();
- $expected = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'root.js');
+ $expected = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . 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(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'flash' . DS . 'plugin_test.swf');
+ $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . 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(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot' . DS . 'pdfs' . DS . 'plugin_test.pdf');
+ $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . 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);
@@ -1297,7 +1297,7 @@ public function testAssets() {
ob_start();
$Dispatcher->asset('test_plugin/img/cake.icon.gif');
$result = ob_get_clean();
- $file = file_get_contents(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' .DS . 'webroot' . DS . 'img' . DS . 'cake.icon.gif');
+ $file = file_get_contents(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' .DS . 'webroot' . DS . 'img' . DS . 'cake.icon.gif');
$this->assertEqual($file, $result);
ob_start();
@@ -1321,7 +1321,7 @@ public function testAssets() {
$Dispatcher->asset('test_plugin/css/theme_one.htc');
$result = ob_get_clean();
$this->assertEqual('htc file', $result);
-
+
if (php_sapi_name() == 'cli') {
while (ob_get_level()) {
ob_get_clean();
@@ -1348,7 +1348,7 @@ function testMissingAssetProcessor404() {
}
/**
- * test that asset filters work for theme and plugin assets
+ * test that asset filters work for theme and plugin assets
*
* @return void
*/
@@ -1368,7 +1368,7 @@ function testAssetFilterForThemeAndPlugins() {
$this->assertTrue($Dispatcher->asset('test_plugin/cjs/debug_kit.js'));
$this->assertFalse($Dispatcher->asset('css/ccss/debug_kit.css'));
-
+
$this->assertFalse($Dispatcher->asset('js/cjs/debug_kit.js'));
}
/**
@@ -1388,7 +1388,7 @@ public function testFullPageCachingDispatch() {
Router::connect('/', array('controller' => 'test_cached_pages', 'action' => 'index'));
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS),
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
), true);
$dispatcher = new TestDispatcher();
diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php
index f53806894f8..a0af84d71ff 100644
--- a/lib/Cake/Test/Case/Routing/RouterTest.php
+++ b/lib/Cake/Test/Case/Routing/RouterTest.php
@@ -631,8 +631,8 @@ function testUrlGenerationWithAdminPrefix() {
$request = new CakeRequest();
$request->addParams(array(
- 'controller' => 'registrations', 'action' => 'admin_index',
- 'plugin' => null, 'prefix' => 'admin', 'admin' => true,
+ 'controller' => 'registrations', 'action' => 'admin_index',
+ 'plugin' => null, 'prefix' => 'admin', 'admin' => true,
'url' => array('ext' => 'html', 'url' => 'admin/registrations/index')
));
$request->base = '';
@@ -647,8 +647,8 @@ function testUrlGenerationWithAdminPrefix() {
Router::reload();
$request = new CakeRequest();
$request->addParams(array(
- 'controller' => 'subscriptions', 'action' => 'admin_index',
- 'plugin' => null, 'admin' => true,
+ 'controller' => 'subscriptions', 'action' => 'admin_index',
+ 'plugin' => null, 'admin' => true,
'url' => array('url' => 'admin/subscriptions/index/page:2')
));
$request->base = '/magazine';
@@ -688,7 +688,7 @@ function testUrlGenerationWithAdminPrefix() {
Router::reload();
$request = new CakeRequest();
$request->addParams(array(
- 'admin' => true, 'action' => 'index', 'plugin' => null, 'controller' => 'users',
+ 'admin' => true, 'action' => 'index', 'plugin' => null, 'controller' => 'users',
'url' => array('url' => 'users')
));
$request->base = '/';
@@ -743,7 +743,7 @@ function testUrlGenerationWithAdminPrefix() {
$request = new CakeRequest();
Router::setRequestInfo(
$request->addParams(array(
- 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_edit', 'pass' => array('284'),
+ 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_edit', 'pass' => array('284'),
'prefix' => 'admin', 'admin' => true,
'url' => array('url' => 'admin/pages/edit/284')
))->addPaths(array(
@@ -762,7 +762,7 @@ function testUrlGenerationWithAdminPrefix() {
$request = new CakeRequest();
Router::setRequestInfo(
$request->addParams(array(
- 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_add', 'prefix' => 'admin',
+ 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_add', 'prefix' => 'admin',
'admin' => true, 'url' => array('url' => 'admin/pages/add')
))->addPaths(array(
'base' => '', 'here' => '/admin/pages/add', 'webroot' => '/'
@@ -780,7 +780,7 @@ function testUrlGenerationWithAdminPrefix() {
$request = new CakeRequest();
Router::setRequestInfo(
$request->addParams(array(
- 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_edit', 'prefix' => 'admin',
+ 'plugin' => null, 'controller' => 'pages', 'action' => 'admin_edit', 'prefix' => 'admin',
'admin' => true, 'pass' => array('284'), 'url' => array('url' => 'admin/pages/edit/284')
))->addPaths(array(
'base' => '', 'here' => '/admin/pages/edit/284', 'webroot' => '/'
@@ -797,7 +797,7 @@ function testUrlGenerationWithAdminPrefix() {
Router::parse('/');
Router::setRequestInfo(
$request->addParams(array(
- 'plugin' => null, 'controller' => 'posts', 'action' => 'admin_index', 'prefix' => 'admin',
+ 'plugin' => null, 'controller' => 'posts', 'action' => 'admin_index', 'prefix' => 'admin',
'admin' => true, 'pass' => array('284'), 'url' => array('url' => 'admin/posts')
))->addPaths(array(
'base' => '', 'here' => '/admin/posts', 'webroot' => '/'
@@ -1186,7 +1186,7 @@ function testPrefixRoutingAndPlugins() {
$paths = App::path('plugins');
App::build(array(
'plugins' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
)
), true);
CakePlugin::loadAll();
@@ -1514,7 +1514,7 @@ function testUrlGenerationWithLegacyPrefixes() {
$request = new CakeRequest();
Router::setRequestInfo(
$request->addParams(array(
- 'plugin' => null, 'controller' => 'images', 'action' => 'index',
+ 'plugin' => null, 'controller' => 'images', 'action' => 'index',
'prefix' => null, 'admin' => false,'url' => array('url' => 'images/index')
))->addPaths(array(
'base' => '',
@@ -1582,7 +1582,7 @@ function testUrlGenerationWithAutoPrefixes() {
$request = new CakeRequest();
Router::setRequestInfo(
$request->addParams(array(
- 'plugin' => null, 'controller' => 'images', 'action' => 'index',
+ 'plugin' => null, 'controller' => 'images', 'action' => 'index',
'prefix' => null, 'protected' => false, 'url' => array('url' => 'images/index')
))->addPaths(array(
'base' => '',
@@ -1610,7 +1610,7 @@ function testUrlGenerationWithAutoPrefixes() {
$result = Router::url(array('action' => 'protected_edit', 1, 'protected' => true));
$expected = '/protected/images/edit/1';
$this->assertEqual($result, $expected);
-
+
$result = Router::url(array('action' => 'protectededit', 1, 'protected' => true));
$expected = '/protected/images/protectededit/1';
$this->assertEqual($result, $expected);
@@ -2211,7 +2211,7 @@ function testDefaultsMethod() {
function testConnectDefaultRoutes() {
App::build(array(
'plugins' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
)
), true);
CakePlugin::loadAll();
diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php
index f20514fad09..4f4ed6b2eae 100644
--- a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php
+++ b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php
@@ -23,7 +23,7 @@
App::uses('CakeHtmlReporter', 'TestSuite/Reporter');
if (!class_exists('AppController', false)) {
- require_once LIBS . 'Controller' . DS . 'AppController.php';
+ require_once CAKE . 'Controller' . DS . 'AppController.php';
} elseif (!defined('APP_CONTROLLER_EXISTS')) {
define('APP_CONTROLLER_EXISTS', true);
}
@@ -36,8 +36,8 @@
class CakeTestCaseTest extends CakeTestCase {
public static function setUpBeforeClass() {
- require_once LIBS . 'Test' . DS . 'Fixture' . DS . 'AssertTagsTestCase.php';
- require_once LIBS . 'Test' . DS . 'Fixture' . DS . 'FixturizedTestCase.php';
+ require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'AssertTagsTestCase.php';
+ require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'FixturizedTestCase.php';
}
/**
diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
index f7fe86db94f..22a3ec15258 100644
--- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
+++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
@@ -122,10 +122,10 @@ class ControllerTestCaseTest extends CakeTestCase {
function setUp() {
parent::setUp();
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- 'Controller' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
- 'Model' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'Controller' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
+ 'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
));
CakePlugin::loadAll();
$this->Case = new ControllerTestCase();
@@ -257,7 +257,7 @@ function testTestAction() {
'var' => 'string'
);
$this->assertEquals($expected, $results);
-
+
$result = $this->Case->controller->response->body();
$this->assertPattern('/This is the TestsAppsController index view/', $result);
@@ -273,7 +273,7 @@ function testTestAction() {
* Tests using loaded routes during tests
*/
function testUseRoutes() {
- include LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
+ include CAKE . 'Test' . 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'));
@@ -281,19 +281,19 @@ function testUseRoutes() {
$expected = array('cakephp' => 'cool');
$this->assertEquals($result, $expected);
- include LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
+ include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
$result = $this->Case->testAction('/some_alias');
$this->assertEquals($result, 5);
- include LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
+ include CAKE . 'Test' . 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 LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
+ include CAKE . 'Test' . 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));
+ $this->assertEquals($result, Router::url(array('controller' => 'tests_apps', 'action' => 'some_method'), true));
}
/**
@@ -302,7 +302,7 @@ function testUseRoutes() {
* @expectedException MissingActionException
*/
function testSkipRoutes() {
- include LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
+ include CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS . 'routes.php';
$this->Case->loadRoutes = false;
$result = $this->Case->testAction('/tests_apps/missing_action.json', array('return' => 'view'));
@@ -459,4 +459,4 @@ function testNoMocking() {
$this->assertPattern('/<\/html>/', $result);
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php b/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php
index 3df26f39dbc..08c6d2c99ed 100644
--- a/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php
+++ b/lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php
@@ -45,7 +45,7 @@ public function setUp() {
function testGetPathFilter() {
$this->Coverage->appTest = false;
$result = $this->Coverage->getPathFilter();
- $this->assertEquals(LIBS, $result);
+ $this->assertEquals(CAKE, $result);
$this->Coverage->appTest = true;
$result = $this->Coverage->getPathFilter();
@@ -64,7 +64,7 @@ function testGetPathFilter() {
*/
function testFilterCoverageDataByPathRemovingElements() {
$data = array(
- LIBS . 'dispatcher.php' => array(
+ CAKE . 'dispatcher.php' => array(
10 => -1,
12 => 1
),
@@ -74,8 +74,8 @@ function testFilterCoverageDataByPathRemovingElements() {
)
);
$this->Coverage->setCoverage($data);
- $result = $this->Coverage->filterCoverageDataByPath(LIBS);
- $this->assertTrue(isset($result[LIBS . 'dispatcher.php']));
+ $result = $this->Coverage->filterCoverageDataByPath(CAKE);
+ $this->assertTrue(isset($result[CAKE . 'dispatcher.php']));
$this->assertFalse(isset($result[APP . 'app_model.php']));
}
@@ -178,4 +178,4 @@ function tearDown() {
CakePlugin::unload();
unset($this->Coverage);
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/Utility/FolderTest.php b/lib/Cake/Test/Case/Utility/FolderTest.php
index f30c59e43f6..67dec086933 100644
--- a/lib/Cake/Test/Case/Utility/FolderTest.php
+++ b/lib/Cake/Test/Case/Utility/FolderTest.php
@@ -147,7 +147,7 @@ function testRecursiveCreateFailure() {
* @return void
*/
function testOperations() {
- $path = LIBS . 'Console' . DS . 'templates' . DS . 'skel';
+ $path = CAKE . 'Console' . DS . 'templates' . DS . 'skel';
$Folder = new Folder($path);
$result = is_dir($Folder->pwd());
@@ -220,7 +220,7 @@ function testOperations() {
public function testChmod() {
$this->skipIf(DIRECTORY_SEPARATOR === '\\', '%s Folder permissions tests not supported on Windows');
- $path = LIBS . 'Console' . DS . 'templates' . DS . 'skel';
+ $path = CAKE . 'Console' . DS . 'templates' . DS . 'skel';
$Folder = new Folder($path);
$subdir = 'test_folder_new';
@@ -316,41 +316,41 @@ function testFolderTree() {
$Folder = new Folder();
$expected = array(
array(
- LIBS . 'Config',
- LIBS . 'Config' . DS . 'unicode',
- LIBS . 'Config' . DS . 'unicode' . DS . 'casefolding'
+ CAKE . 'Config',
+ CAKE . 'Config' . DS . 'unicode',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding'
),
array(
- LIBS . 'Config' . DS . 'config.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'
+ CAKE . 'Config' . DS . 'config.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0080_00ff.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0100_017f.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0180_024F.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0250_02af.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0370_03ff.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0400_04ff.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0500_052f.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '0530_058f.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '1e00_1eff.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '1f00_1fff.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2100_214f.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2150_218f.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2460_24ff.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c00_2c5f.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c60_2c7f.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . '2c80_2cff.php',
+ CAKE . 'Config' . DS . 'unicode' . DS . 'casefolding' . DS . 'ff00_ffef.php'
)
);
- $result = $Folder->tree(LIBS . 'Config', false);
+ $result = $Folder->tree(CAKE . 'Config', false);
$this->assertIdentical(array_diff($expected[0], $result[0]), array());
$this->assertIdentical(array_diff($result[0], $expected[0]), array());
- $result = $Folder->tree(LIBS . 'Config', false, 'dir');
+ $result = $Folder->tree(CAKE . 'Config', false, 'dir');
$this->assertIdentical(array_diff($expected[0], $result), array());
$this->assertIdentical(array_diff($result, $expected[0]), array());
- $result = $Folder->tree(LIBS . 'Config', false, 'files');
+ $result = $Folder->tree(CAKE . 'Config', false, 'files');
$this->assertIdentical(array_diff($expected[1], $result), array());
$this->assertIdentical(array_diff($result, $expected[1]), array());
}
@@ -486,7 +486,7 @@ function testInCakePath() {
*/
function testFind() {
$Folder = new Folder();
- $Folder->cd(LIBS . 'Config');
+ $Folder->cd(CAKE . 'Config');
$result = $Folder->find();
$expected = array('config.php');
$this->assertIdentical(array_diff($expected, $result), array());
@@ -539,17 +539,17 @@ function testFind() {
*/
function testFindRecursive() {
$Folder = new Folder();
- $Folder->cd(LIBS);
+ $Folder->cd(CAKE);
$result = $Folder->findRecursive('(config|paths)\.php');
$expected = array(
- LIBS . 'Config' . DS . 'config.php'
+ CAKE . 'Config' . DS . 'config.php'
);
$this->assertIdentical(array_diff($expected, $result), array());
$this->assertIdentical(array_diff($result, $expected), array());
$result = $Folder->findRecursive('(config|paths)\.php', true);
$expected = array(
- LIBS . 'Config' . DS . 'config.php'
+ CAKE . 'Config' . DS . 'config.php'
);
$this->assertIdentical($result, $expected);
@@ -583,7 +583,7 @@ function testFindRecursive() {
);
$this->assertIdentical($result, $expected);
- $Folder->cd(LIBS . 'Config');
+ $Folder->cd(CAKE . 'Config');
$Folder->cd(TMP);
$Folder->delete($Folder->pwd() . DS . 'testme');
$File->delete();
diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php
index fbdcfa17067..4b77d32d482 100644
--- a/lib/Cake/Test/Case/Utility/XmlTest.php
+++ b/lib/Cake/Test/Case/Utility/XmlTest.php
@@ -133,7 +133,7 @@ public function testBuild() {
$this->assertEqual($obj->firstChild->nodeName, 'tag');
$this->assertEqual($obj->firstChild->nodeValue, 'value');
- $xml = LIBS . 'Test' . DS . 'Fixture' . DS . 'sample.xml';
+ $xml = CAKE . 'Test' . DS . 'Fixture' . DS . 'sample.xml';
$obj = Xml::build($xml);
$this->assertEqual($obj->getName(), 'tags');
$this->assertEqual(count($obj), 2);
@@ -374,7 +374,7 @@ public function testToArray() {
$obj = Xml::build($xml);
$this->assertEqual(Xml::toArray($obj), array('tag' => 'name'));
- $xml = LIBS . 'Test' . DS . 'Fixture' . DS . 'sample.xml';
+ $xml = CAKE . 'Test' . DS . 'Fixture' . DS . 'sample.xml';
$obj = Xml::build($xml);
$expected = array(
'tags' => array(
@@ -516,7 +516,7 @@ public function testToArray() {
* @return void
*/
public function testRss() {
- $rss = file_get_contents(LIBS . 'Test' . DS . 'Fixture' . DS . 'rss.xml');
+ $rss = file_get_contents(CAKE . 'Test' . DS . 'Fixture' . DS . 'rss.xml');
$rssAsArray = Xml::toArray(Xml::build($rss));
$this->assertEqual($rssAsArray['rss']['@version'], '2.0');
$this->assertEqual(count($rssAsArray['rss']['channel']['item']), 2);
@@ -647,7 +647,7 @@ public function testXmlRpc() {
* @return void
*/
public function testSoap() {
- $xmlRequest = Xml::build(LIBS . 'Test' . DS . 'Fixture' . DS . 'soap_request.xml');
+ $xmlRequest = Xml::build(CAKE . 'Test' . DS . 'Fixture' . DS . 'soap_request.xml');
$expected = array(
'Envelope' => array(
'@soap:encodingStyle' => 'http://www.w3.org/2001/12/soap-encoding',
@@ -660,7 +660,7 @@ public function testSoap() {
);
$this->assertEqual(Xml::toArray($xmlRequest), $expected);
- $xmlResponse = Xml::build(LIBS . 'Test' . DS . 'Fixture' . DS . 'soap_response.xml');
+ $xmlResponse = Xml::build(CAKE . 'Test' . DS . 'Fixture' . DS . 'soap_response.xml');
$expected = array(
'Envelope' => array(
'@soap:encodingStyle' => 'http://www.w3.org/2001/12/soap-encoding',
diff --git a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
index d41d86f7990..0d6e9fbebbd 100644
--- a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
+++ b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
@@ -84,7 +84,7 @@ function setUp() {
Configure::write('Cache.check', true);
Configure::write('Cache.disable', false);
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
), true);
}
@@ -422,7 +422,7 @@ function testCacheWithNamedAndPassedArgs() {
'cache_parsing' => 21600
);
$this->Controller->request->here = '/cache_test/cache_parsing/1/2/name:mark/ice:cream';
-
+
$View = new View($this->Controller);
$result = $View->render('index');
@@ -442,7 +442,7 @@ function testCacheWithNamedAndPassedArgs() {
function testCacheWithCustomRoutes() {
Router::reload();
Router::connect('/:lang/:controller/:action/*', array(), array('lang' => '[a-z]{3}'));
-
+
$this->Controller->cache_parsing();
$this->Controller->request->addParams(array(
'lang' => 'en',
@@ -520,10 +520,10 @@ function testAfterRenderConditions() {
$Cache->expects($this->once())->method('cache')
->with('posts/index', $View->output, false);
$Cache->afterRender('posts/index');
-
+
Configure::write('Cache.check', false);
$Cache->afterRender('posts/index');
-
+
Configure::write('Cache.check', true);
$View->cacheAction = false;
$Cache->afterRender('posts/index');
diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
index 0a15c691bb7..13b60536723 100644
--- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
+++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
@@ -381,7 +381,7 @@ function testImageTagWithTheme() {
$file = new File($testfile, true);
App::build(array(
- 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
Configure::write('Asset.timestamp', true);
Configure::write('debug', 1);
@@ -416,10 +416,10 @@ function testImageTagWithTheme() {
*/
function testThemeAssetsInMainWebrootPath() {
App::build(array(
- 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$webRoot = Configure::read('App.www_root');
- Configure::write('App.www_root', LIBS . 'Test' . DS . 'test_app' . DS . 'webroot' . DS);
+ Configure::write('App.www_root', CAKE . 'Test' . DS . 'test_app' . DS . 'webroot' . DS);
$this->Html->theme = 'test_theme';
$result = $this->Html->css('webroot_test');
@@ -662,7 +662,7 @@ function testScriptInTheme() {
$file = new File($testfile, true);
App::build(array(
- 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$this->Html->webroot = '/';
@@ -1383,7 +1383,7 @@ function testCrumbList() {
*/
public function testLoadConfig() {
- $path = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
+ $path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
$result = $this->Html->loadConfig('htmlhelper_tags', $path);
$expected = array(
@@ -1423,7 +1423,7 @@ public function testLoadConfigWrongFile() {
* @expectedException ConfigureException
*/
public function testLoadConfigWrongReader() {
- $path = LIBS . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
+ $path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
$result = $this->Html->loadConfig(array('htmlhelper_tags', 'wrong_reader'), $path);
}
diff --git a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php
index d0eae9740b0..7dcb20babf4 100644
--- a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php
+++ b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php
@@ -132,7 +132,7 @@ function testFlash() {
$this->assertEqual($result, $expected);
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$result = $this->Session->flash('notification');
$result = str_replace("\r\n", "\n", $result);
@@ -165,10 +165,10 @@ function testFlashAttributes() {
*/
function testFlashElementInAttrs() {
App::build(array(
- 'views' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$result = $this->Session->flash('flash', array(
- 'element' => 'session_helper',
+ 'element' => 'session_helper',
'params' => array('title' => 'Notice!', 'name' => 'Alert!')
));
$expected = "\n\t
Alert!
\n\t
Notice!
\n\t
This is a calling
\n
";
diff --git a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php
index c5e4f1ce18e..d1092d8628f 100644
--- a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php
+++ b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php
@@ -656,7 +656,7 @@ function testFromString() {
*/
function testConvertSpecifiers() {
App::build(array(
- 'locales' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
+ 'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
), true);
Configure::write('Config.language', 'time_test');
$time = strtotime('Thu Jan 14 11:43:39 2010');
@@ -765,7 +765,7 @@ function testConvertPercentE() {
*/
function testI18nFormat() {
App::build(array(
- 'locales' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
+ 'locales' => array(CAKE . 'Test' . 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/Test/Case/View/HelperCollectionTest.php b/lib/Cake/Test/Case/View/HelperCollectionTest.php
index d3d09388212..1d3eae5c2a3 100644
--- a/lib/Cake/Test/Case/View/HelperCollectionTest.php
+++ b/lib/Cake/Test/Case/View/HelperCollectionTest.php
@@ -82,7 +82,7 @@ function testLoadWithAlias() {
$result = $this->Helpers->load('Html');
$this->assertInstanceOf('HtmlAliasHelper', $result);
- App::build(array('plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
+ App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
CakePlugin::loadAll();
$result = $this->Helpers->load('SomeOther', array('className' => 'TestPlugin.OtherHelper'));
$this->assertInstanceOf('OtherHelperHelper', $result);
@@ -123,7 +123,7 @@ function testLoadMissingHelperFile() {
*/
function testLoadPluginHelper() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
CakePlugin::loadAll();
$result = $this->Helpers->load('TestPlugin.OtherHelper');
@@ -153,4 +153,4 @@ function testUnload() {
$this->assertEquals(array('Form'), $result, 'loaded helpers is wrong');
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Test/Case/View/HelperTest.php b/lib/Cake/Test/Case/View/HelperTest.php
index f0483486332..547c449c7ff 100644
--- a/lib/Cake/Test/Case/View/HelperTest.php
+++ b/lib/Cake/Test/Case/View/HelperTest.php
@@ -172,10 +172,10 @@ class TestHelper extends Helper {
/**
* expose a method as public
*
- * @param string $options
- * @param string $exclude
- * @param string $insertBefore
- * @param string $insertAfter
+ * @param string $options
+ * @param string $exclude
+ * @param string $insertBefore
+ * @param string $insertAfter
* @return void
*/
function parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) {
@@ -518,8 +518,8 @@ function testAssetTimestampPluginsAndThemes() {
$_timestamp = Configure::read('Asset.timestamp');
Configure::write('Asset.timestamp', 'force');
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
));
CakePlugin::loadAll();
@@ -759,7 +759,7 @@ function testWebrootPaths() {
$this->Helper->theme = 'test_theme';
App::build(array(
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$result = $this->Helper->webroot('/img/cake.power.gif');
@@ -771,7 +771,7 @@ function testWebrootPaths() {
$this->assertEqual($result, $expected);
$webRoot = Configure::read('App.www_root');
- Configure::write('App.www_root', LIBS . 'Test' . DS . 'test_app' . DS . 'webroot' . DS);
+ Configure::write('App.www_root', CAKE . 'Test' . DS . 'test_app' . DS . 'webroot' . DS);
$result = $this->Helper->webroot('/img/cake.power.gif');
$expected = '/theme/test_theme/img/cake.power.gif';
@@ -799,7 +799,7 @@ function testWebrootPaths() {
*/
function testLazyLoadingHelpers() {
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
CakePlugin::loadAll();
$Helper = new TestHelper($this->View);
diff --git a/lib/Cake/Test/Case/View/MediaViewTest.php b/lib/Cake/Test/Case/View/MediaViewTest.php
index 2a8cd5b86ef..1ddc7bc23a9 100644
--- a/lib/Cake/Test/Case/View/MediaViewTest.php
+++ b/lib/Cake/Test/Case/View/MediaViewTest.php
@@ -72,7 +72,7 @@ public function testRenderNotFound() {
*/
function testRender() {
$this->MediaView->viewVars = array(
- 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS,
+ 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS,
'id' => 'test_asset.css',
'extension' => 'css',
);
@@ -120,7 +120,7 @@ function testRenderWithUnknownFileTypeGeneric() {
$currentUserAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
$_SERVER['HTTP_USER_AGENT'] = 'Some generic browser';
$this->MediaView->viewVars = array(
- 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS,
+ 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS,
'id' => 'no_section.ini',
'extension' => 'ini',
);
@@ -180,7 +180,7 @@ function testRenderWithUnknownFileTypeOpera() {
$currentUserAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
$_SERVER['HTTP_USER_AGENT'] = 'Opera/9.80 (Windows NT 6.0; U; en) Presto/2.8.99 Version/11.10';
$this->MediaView->viewVars = array(
- 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS,
+ 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS,
'id' => 'no_section.ini',
'extension' => 'ini',
);
@@ -245,7 +245,7 @@ function testRenderWithUnknownFileTypeIE() {
$currentUserAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)';
$this->MediaView->viewVars = array(
- 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Config' . DS,
+ 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS,
'id' => 'no_section.ini',
'extension' => 'ini',
);
@@ -308,7 +308,7 @@ function testRenderWithUnknownFileTypeIE() {
*/
function testConnectionAborted() {
$this->MediaView->viewVars = array(
- 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS,
+ 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS,
'id' => 'test_asset.css',
'extension' => 'css',
);
@@ -332,7 +332,7 @@ function testConnectionAborted() {
*/
function testConnectionAbortedOnBuffering() {
$this->MediaView->viewVars = array(
- 'path' => LIBS . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS,
+ 'path' => CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor' . DS .'css' . DS,
'id' => 'test_asset.css',
'extension' => 'css',
);
diff --git a/lib/Cake/Test/Case/View/ThemeViewTest.php b/lib/Cake/Test/Case/View/ThemeViewTest.php
index 3ca49982faf..f13f6219229 100644
--- a/lib/Cake/Test/Case/View/ThemeViewTest.php
+++ b/lib/Cake/Test/Case/View/ThemeViewTest.php
@@ -35,7 +35,7 @@ class ThemePostsController extends Controller {
* @access public
*/
public $name = 'ThemePosts';
-
+
public $theme = null;
/**
@@ -117,8 +117,8 @@ function setUp() {
$this->PostsController->index();
$this->ThemeView = new ThemeView($this->PostsController);
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
CakePlugin::loadAll();
}
@@ -152,15 +152,15 @@ function testPluginThemedGetTemplate() {
$this->Controller->theme = 'TestTheme';
$ThemeView = new TestThemeView($this->Controller);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Tests' . DS .'index.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Tests' . DS .'index.ctp';
$result = $ThemeView->getViewFileName('index');
$this->assertEqual($result, $expected);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Layouts' . DS .'plugin_default.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Layouts' . DS .'plugin_default.ctp';
$result = $ThemeView->getLayoutFileName('plugin_default');
$this->assertEqual($result, $expected);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS .'default.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS .'default.ctp';
$result = $ThemeView->getLayoutFileName('default');
$this->assertEqual($result, $expected);
}
@@ -180,25 +180,25 @@ function testGetTemplate() {
$ThemeView = new TestThemeView($this->Controller);
$ThemeView->theme = 'TestTheme';
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp';
$result = $ThemeView->getViewFileName('home');
$this->assertEqual($result, $expected);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Posts' . DS .'index.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Posts' . DS .'index.ctp';
$result = $ThemeView->getViewFileName('/Posts/index');
$this->assertEqual($result, $expected);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS .'default.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'TestTheme' . DS . 'Layouts' . DS .'default.ctp';
$result = $ThemeView->getLayoutFileName();
$this->assertEqual($result, $expected);
$ThemeView->layoutPath = 'rss';
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp';
$result = $ThemeView->getLayoutFileName();
$this->assertEqual($result, $expected);
$ThemeView->layoutPath = 'emails' . DS . 'html';
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp';
$result = $ThemeView->getLayoutFileName();
$this->assertEqual($result, $expected);
}
diff --git a/lib/Cake/Test/Case/View/ViewTest.php b/lib/Cake/Test/Case/View/ViewTest.php
index eac6401fc6e..50da25efee7 100644
--- a/lib/Cake/Test/Case/View/ViewTest.php
+++ b/lib/Cake/Test/Case/View/ViewTest.php
@@ -191,13 +191,13 @@ function setUp() {
$request = $this->getMock('CakeRequest');
$this->Controller = new Controller($request);
$this->PostsController = new ViewPostsController($request);
- $this->PostsController->viewPath = 'posts';
+ $this->PostsController->viewPath = 'Posts';
$this->PostsController->index();
$this->View = new View($this->PostsController);
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'View' => array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
)
), true);
CakePlugin::loadAll();
@@ -260,12 +260,12 @@ function testPluginPathGeneration() {
$paths = $View->paths('TestPlugin');
$pluginPath = CakePlugin::path('TestPlugin');
$expected = array(
- LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Plugins' . DS . 'TestPlugin' . DS,
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Plugins' . DS . 'TestPlugin' . DS,
$pluginPath . 'View' . DS,
$pluginPath . 'views' . DS,
$pluginPath . 'Lib' . DS . 'View' . DS,
- LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS,
- LIBS . 'View' . DS
+ CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS,
+ CAKE . 'View' . DS
);
$this->assertEqual($paths, $expected);
}
@@ -283,12 +283,12 @@ function testCamelCasePluginGetTemplate() {
$View = new TestView($this->Controller);
App::build(array(
- 'plugins' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
- 'View' => array(LIBS . 'Test' . DS . 'test_app' . DS . 'View'. DS)
+ 'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
+ 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
$pluginPath = CakePlugin::path('TestPlugin');
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS .'TestPlugin' . DS . 'View' . DS .'Tests' . DS .'index.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS .'TestPlugin' . DS . 'View' . DS .'Tests' . DS .'index.ctp';
$result = $View->getViewFileName('index');
$this->assertEqual($result, $expected);
@@ -312,29 +312,29 @@ function testGetTemplate() {
$View = new TestView($this->Controller);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp';
$result = $View->getViewFileName('home');
$this->assertEqual($result, $expected);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp';
$result = $View->getViewFileName('/Posts/index');
$this->assertEqual($result, $expected);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp';
$result = $View->getViewFileName('../Posts/index');
$this->assertEqual($result, $expected);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS .'default.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS .'default.ctp';
$result = $View->getLayoutFileName();
$this->assertEqual($result, $expected);
$View->layoutPath = 'rss';
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp';
$result = $View->getLayoutFileName();
$this->assertEqual($result, $expected);
$View->layoutPath = 'emails' . DS . 'html';
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp';
$result = $View->getLayoutFileName();
$this->assertEqual($result, $expected);
@@ -350,7 +350,7 @@ function testGetTemplate() {
function testMissingView() {
$this->Controller->plugin = null;
$this->Controller->name = 'Pages';
- $this->Controller->viewPath = 'pages';
+ $this->Controller->viewPath = 'Pages';
$this->Controller->action = 'display';
$this->Controller->params['pass'] = array('home');
@@ -369,7 +369,7 @@ function testMissingView() {
function testMissingLayout() {
$this->Controller->plugin = null;
$this->Controller->name = 'Posts';
- $this->Controller->viewPath = 'posts';
+ $this->Controller->viewPath = 'Posts';
$this->Controller->layout = 'whatever';
$View = new TestView($this->Controller);
@@ -751,7 +751,7 @@ function testViewFileName() {
$View = new TestView($this->PostsController);
$result = $View->getViewFileName('index');
- $this->assertPattern('/posts(\/|\\\)index.ctp/', $result);
+ $this->assertPattern('/Posts(\/|\\\)index.ctp/', $result);
$result = $View->getViewFileName('/Pages/home');
$this->assertPattern('/Pages(\/|\\\)home.ctp/', $result);
@@ -762,7 +762,7 @@ function testViewFileName() {
$result = $View->getViewFileName('../Themed/TestTheme/Posts/index');
$this->assertPattern('/Themed(\/|\\\)TestTheme(\/|\\\)Posts(\/|\\\)index.ctp/', $result);
- $expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp';
+ $expected = CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Posts' . DS .'index.ctp';
$result = $View->getViewFileName('../Posts/index');
$this->assertEqual($result, $expected);
diff --git a/lib/Cake/Test/test_app/View/Layouts/emails/html/default.ctp b/lib/Cake/Test/test_app/View/Layouts/Emails/html/default.ctp
similarity index 100%
rename from lib/Cake/Test/test_app/View/Layouts/emails/html/default.ctp
rename to lib/Cake/Test/test_app/View/Layouts/Emails/html/default.ctp
diff --git a/lib/Cake/Test/test_app/View/Layouts/emails/html/thin.ctp b/lib/Cake/Test/test_app/View/Layouts/Emails/html/thin.ctp
similarity index 100%
rename from lib/Cake/Test/test_app/View/Layouts/emails/html/thin.ctp
rename to lib/Cake/Test/test_app/View/Layouts/Emails/html/thin.ctp
diff --git a/lib/Cake/Test/test_app/View/Layouts/emails/text/default.ctp b/lib/Cake/Test/test_app/View/Layouts/Emails/text/default.ctp
similarity index 100%
rename from lib/Cake/Test/test_app/View/Layouts/emails/text/default.ctp
rename to lib/Cake/Test/test_app/View/Layouts/Emails/text/default.ctp
diff --git a/lib/Cake/Test/test_app/View/Pages/home.ctp b/lib/Cake/Test/test_app/View/Pages/home.ctp
index a26cfdb0b5a..1473e9579a8 100644
--- a/lib/Cake/Test/test_app/View/Pages/home.ctp
+++ b/lib/Cake/Test/test_app/View/Pages/home.ctp
@@ -49,7 +49,7 @@ App::uses('Debugger', 'Utility');
';
echo __d('cake_dev', 'Your database configuration file is present.');
$filePresent = true;
@@ -160,4 +160,4 @@ You can also add some CSS styles for your pages at: APP/webroot/css.');
-
\ No newline at end of file
+
diff --git a/lib/Cake/Test/test_app/View/Posts/test_nocache_tags.ctp b/lib/Cake/Test/test_app/View/Posts/test_nocache_tags.ctp
index 3375d8fbfdd..1d5ee6767d5 100644
--- a/lib/Cake/Test/test_app/View/Posts/test_nocache_tags.ctp
+++ b/lib/Cake/Test/test_app/View/Posts/test_nocache_tags.ctp
@@ -62,7 +62,7 @@
@@ -138,4 +138,4 @@ if (!empty($filePresent)):
irc.freenode.net #cakephp
-
\ No newline at end of file
+
diff --git a/lib/Cake/Test/test_app/View/Themed/TestTheme/plugins/TestPlugin/Layouts/plugin_default.ctp b/lib/Cake/Test/test_app/View/Themed/TestTheme/Plugins/TestPlugin/Layouts/plugin_default.ctp
similarity index 100%
rename from lib/Cake/Test/test_app/View/Themed/TestTheme/plugins/TestPlugin/Layouts/plugin_default.ctp
rename to lib/Cake/Test/test_app/View/Themed/TestTheme/Plugins/TestPlugin/Layouts/plugin_default.ctp
diff --git a/lib/Cake/Test/test_app/View/Themed/TestTheme/plugins/TestPlugin/tests/index.ctp b/lib/Cake/Test/test_app/View/Themed/TestTheme/Plugins/TestPlugin/Tests/index.ctp
similarity index 100%
rename from lib/Cake/Test/test_app/View/Themed/TestTheme/plugins/TestPlugin/tests/index.ctp
rename to lib/Cake/Test/test_app/View/Themed/TestTheme/Plugins/TestPlugin/Tests/index.ctp
diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
index 0949468b11b..c63a96a2cb0 100644
--- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
+++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
@@ -17,7 +17,7 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-define('CORE_TEST_CASES', LIBS . 'Test' . DS . 'Case');
+define('CORE_TEST_CASES', CAKE . 'Test' . DS . 'Case');
define('APP_TEST_CASES', TESTS . 'Case');
App::uses('CakeTestSuiteCommand', 'TestSuite');
@@ -123,7 +123,7 @@ protected function _checkPHPUnit() {
$found = $this->loadTestFramework();
if (!$found) {
$baseDir = $this->_baseDir;
- include CAKE_TESTS_LIB . 'templates/phpunit.php';
+ include CAKE . 'TestSuite' . DS . 'templates' . DS . 'phpunit.php';
exit();
}
}
@@ -166,7 +166,7 @@ public function loadTestFramework() {
function _checkXdebug() {
if (!extension_loaded('xdebug')) {
$baseDir = $this->_baseDir;
- include CAKE_TESTS_LIB . 'templates/xdebug.php';
+ include CAKE . 'TestSuite' . DS . 'templates' . DS . 'xdebug.php';
exit();
}
}
@@ -238,7 +238,7 @@ function _runTestCase() {
'baseUrl' => $this->_baseUrl,
'baseDir' => $this->_baseDir,
);
-
+
$options = array(
'--filter', $this->params['filter'],
'--output', $this->params['output'],
@@ -252,7 +252,7 @@ function _runTestCase() {
} catch (MissingConnectionException $exception) {
ob_end_clean();
$baseDir = $this->_baseDir;
- include CAKE_TESTS_LIB . 'templates' . DS . 'missing_connection.php';
+ include CAKE . 'TestSuite' . DS . 'templates' . DS . 'missing_connection.php';
exit();
}
}
diff --git a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php
index 3a04a946c7d..377211e50dc 100644
--- a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php
+++ b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php
@@ -45,7 +45,7 @@ abstract class BaseCoverageReport {
/**
* Array of test case file names. Used to do basename() matching with
- * files that have coverage to decide which results to show on page load.
+ * files that have coverage to decide which results to show on page load.
*
* @var array
*/
@@ -101,7 +101,7 @@ public function getPathFilter() {
} elseif ($this->pluginTest) {
$path = App::pluginPath($this->pluginTest);
} else {
- $path = LIBS;
+ $path = CAKE;
}
return $path;
}
@@ -168,4 +168,4 @@ abstract public function report();
*/
abstract public function generateDiff($filename, $fileLines, $coverageData);
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
index 246251aedac..a820889bb01 100644
--- a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
+++ b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
@@ -105,7 +105,7 @@ protected function _loadFixtures($fixtures) {
if (strpos($fixture, 'core.') === 0) {
$fixture = substr($fixture, strlen('core.'));
- $fixturePaths[] = LIBS . 'Test' . DS . 'Fixture';
+ $fixturePaths[] = CAKE . 'Test' . DS . 'Fixture';
} elseif (strpos($fixture, 'app.') === 0) {
$fixture = substr($fixture, strlen('app.'));
$fixturePaths = array(
@@ -122,7 +122,7 @@ protected function _loadFixtures($fixtures) {
} else {
$fixturePaths = array(
TESTS . 'Fixture',
- LIBS . 'tests' . DS . 'Fixture'
+ CAKE . 'tests' . DS . 'Fixture'
);
}
@@ -250,4 +250,4 @@ public function shutDown() {
}
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
index 428b11d856c..2ef0338eee4 100644
--- a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
+++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
@@ -51,7 +51,7 @@ public function paintHeader() {
public function paintDocumentStart() {
ob_start();
$baseDir = $this->params['baseDir'];
- include CAKE_TESTS_LIB . 'templates' . DS . 'header.php';
+ include CAKE . 'TestSuite' . DS . 'templates' . DS . 'header.php';
}
/**
@@ -64,7 +64,7 @@ public function paintTestMenu() {
$cases = $this->baseUrl() . '?show=cases';
$plugins = App::objects('plugin', null, false);
sort($plugins);
- include CAKE_TESTS_LIB . 'templates' . DS . 'menu.php';
+ include CAKE . 'TestSuite' . DS . 'templates' . DS . 'menu.php';
}
/**
@@ -212,7 +212,7 @@ protected function _queryString($url) {
*/
public function paintDocumentEnd() {
$baseDir = $this->params['baseDir'];
- include CAKE_TESTS_LIB . 'templates/footer.php';
+ include CAKE . 'TestSuite' . DS . 'templates' . DS . 'footer.php';
if (ob_get_length()) {
ob_end_flush();
}
@@ -343,4 +343,4 @@ public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
}
echo '' . __d('cake_dev', 'Running %s', $suite->getName()) . '
';
}
-}
\ No newline at end of file
+}
diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php
index ff14957ba96..7f43d8ce249 100644
--- a/lib/Cake/Utility/Debugger.php
+++ b/lib/Cake/Utility/Debugger.php
@@ -397,8 +397,8 @@ public static function trimPath($path) {
} elseif (strpos($path, ROOT) === 0) {
return str_replace(ROOT, 'ROOT', $path);
}
-
- if (strpos($path, LIBS) === 0) {
+
+ if (strpos($path, CAKE) === 0) {
return str_replace($corePath, 'CORE' . DS, $path);
}
return $path;
@@ -565,7 +565,7 @@ public function output($format = null, $strings = array()) {
/**
* Takes a processed array of data from an error and displays it in the chosen format.
*
- * @param string $data
+ * @param string $data
* @return void
*/
public function outputError($data) {
diff --git a/lib/Cake/View/Helper/HtmlHelper.php b/lib/Cake/View/Helper/HtmlHelper.php
index f10afa30572..382f78b14cc 100644
--- a/lib/Cake/View/Helper/HtmlHelper.php
+++ b/lib/Cake/View/Helper/HtmlHelper.php
@@ -648,7 +648,7 @@ function getCrumbList($options = array()) {
return null;
}
}
-
+
/**
* Creates a formatted IMG element. If `$options['url']` is provided, an image link will be
* generated with the link pointed at `$options['url']`. This method will set an empty
@@ -928,7 +928,10 @@ function __nestedListItem($items, $options, $itemOptions, $tag) {
* @param string $path Path with config file
* @return mixed False to error or loaded configs
*/
- public function loadConfig($configFile, $path = CONFIGS) {
+ public function loadConfig($configFile, $path = null) {
+ if (!$path) {
+ $path = APP . 'Config' . DS;
+ }
$file = null;
$reader = 'php';
diff --git a/lib/Cake/View/Pages/home.ctp b/lib/Cake/View/Pages/home.ctp
index a12b8bd271b..9c442b11773 100644
--- a/lib/Cake/View/Pages/home.ctp
+++ b/lib/Cake/View/Pages/home.ctp
@@ -57,7 +57,7 @@ endif;
';
echo __d('cake_dev', 'Your database configuration file is present.');
$filePresent = true;
@@ -168,4 +168,4 @@ You can also add some CSS styles for your pages at: APP/webroot/css.');
-
\ No newline at end of file
+
diff --git a/lib/Cake/View/ScaffoldView.php b/lib/Cake/View/ScaffoldView.php
index 746e84eeaee..6a82133dcbd 100644
--- a/lib/Cake/View/ScaffoldView.php
+++ b/lib/Cake/View/ScaffoldView.php
@@ -80,7 +80,7 @@ protected function _getViewFileName($name = null) {
}
if ($name === 'scaffolds' . DS . $subDir . 'error') {
- return LIBS . 'View' . DS . 'errors' . DS . 'scaffold_error.ctp';
+ return CAKE . 'View' . DS . 'Errors' . DS . 'scaffold_error.ctp';
}
throw new MissingViewException($paths[0] . $name . $this->ext);
diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php
index 4bea45d86e4..e197d55b2bb 100644
--- a/lib/Cake/basics.php
+++ b/lib/Cake/basics.php
@@ -44,10 +44,10 @@
function config() {
$args = func_get_args();
foreach ($args as $arg) {
- if ($arg === 'database' && file_exists(CONFIGS . 'database.php')) {
- include_once(CONFIGS . $arg . '.php');
- } elseif (file_exists(CONFIGS . $arg . '.php')) {
- include_once(CONFIGS . $arg . '.php');
+ if ($arg === 'database' && file_exists(APP . 'Config' . 'database.php')) {
+ include_once(APP . 'Config' . $arg . '.php');
+ } elseif (file_exists(APP . 'Config' . $arg . '.php')) {
+ include_once(APP . 'Config' . $arg . '.php');
if (count($args) == 1) {
return true;
diff --git a/lib/Cake/bootstrap.php b/lib/Cake/bootstrap.php
index 00284c1cdfc..471ded4fc9e 100644
--- a/lib/Cake/bootstrap.php
+++ b/lib/Cake/bootstrap.php
@@ -48,65 +48,11 @@
define('APP', ROOT.DS.APP_DIR.DS);
}
-/**
- * Path to the application's models directory.
- */
- define('MODELS', APP.'Model'.DS);
-
-/**
- * Path to model behaviors directory.
- */
- define('BEHAVIORS', MODELS.'Behavior'.DS);
-
-/**
- * Path to the application's controllers directory.
- */
- define('CONTROLLERS', APP.'Controller'.DS);
-
-/**
- * Path to the application's components directory.
- */
- define('COMPONENTS', CONTROLLERS.'Component'.DS);
-
/**
* Path to the application's libs directory.
*/
define('APPLIBS', APP.'Lib'.DS);
-/**
- * Path to the application's views directory.
- */
- define('VIEWS', APP.'View'.DS);
-
-/**
- * Path to the application's helpers directory.
- */
- define('HELPERS', VIEWS.'Helper'.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.
*/
@@ -122,11 +68,6 @@
*/
define('IMAGES', WWW_ROOT.'img'.DS);
-/**
- * Path to the console libs direcotry.
- */
- define('CONSOLE_LIBS', CAKE . 'Console' . DS);
-
/**
* Path to the tests directory.
*/
@@ -134,43 +75,6 @@
define('TESTS', APP.'Test'.DS);
}
-/**
- * Path to the core tests directory.
- */
-if (!defined('CAKE_TESTS')) {
- define('CAKE_TESTS', CAKE.'Test'.DS);
-}
-
-/**
- * Path to the test suite.
- */
- define('CAKE_TESTS_LIB', LIBS . 'TestSuite' . DS);
-
-/**
- * Path to the controller test directory.
- */
- define('CONTROLLER_TESTS', TESTS.'Case'.DS.'Controller'.DS);
-
-/**
- * Path to the components test directory.
- */
- define('COMPONENT_TESTS', TESTS.'Case'.DS.'Component'.DS);
-
-/**
- * Path to the helpers test directory.
- */
- define('HELPER_TESTS', TESTS.'Case'.DS.'View'.DS.'Helper'.DS);
-
-/**
- * Path to the models' test directory.
- */
- define('MODEL_TESTS', TESTS.'Case'.DS.'Model'.DS);
-
-/**
- * Path to the lib test directory.
- */
- define('LIB_TESTS', CAKE_TESTS.'Case'.DS.'Lib'.DS);
-
/**
* Path to the temporary files directory.
*/
@@ -217,9 +121,9 @@
}
-require LIBS . 'basics.php';
-require LIBS . 'Core' . DS .'App.php';
-require LIBS . 'Error' . DS . 'exceptions.php';
+require CAKE . 'basics.php';
+require CAKE . 'Core' . DS .'App.php';
+require CAKE . 'Error' . DS . 'exceptions.php';
spl_autoload_register(array('App', 'load'));