diff --git a/app/Config/Schema/db_acl.php b/app/Config/Schema/db_acl.php index e03a8950f..149ded03e 100644 --- a/app/Config/Schema/db_acl.php +++ b/app/Config/Schema/db_acl.php @@ -1,6 +1,4 @@ array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), - 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'model' => array('type'=>'string', 'null' => true), - 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'alias' => array('type'=>'string', 'null' => true), - 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), + 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'model' => array('type' => 'string', 'null' => true), + 'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'alias' => array('type' => 'string', 'null' => true), + 'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); public $aros = array( - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), - 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'model' => array('type'=>'string', 'null' => true), - 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'alias' => array('type'=>'string', 'null' => true), - 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), + 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'model' => array('type' => 'string', 'null' => true), + 'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'alias' => array('type' => 'string', 'null' => true), + 'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); public $aros_acos = array( - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), - 'aro_id' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), - 'aco_id' => array('type'=>'integer', 'null' => false, 'length' => 10), - '_create' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), - '_read' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), - '_update' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), - '_delete' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1)) - ); + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), + 'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'), + 'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10), + '_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2), + '_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2), + '_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2), + '_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1)) + ); } diff --git a/app/Config/Schema/i18n.php b/app/Config/Schema/i18n.php index 8ca081c99..8de0052dd 100644 --- a/app/Config/Schema/i18n.php +++ b/app/Config/Schema/i18n.php @@ -1,6 +1,4 @@ array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), - 'locale' => array('type'=>'string', 'null' => false, 'length' => 6, 'key' => 'index'), - 'model' => array('type'=>'string', 'null' => false, 'key' => 'index'), - 'foreign_key' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), - 'field' => array('type'=>'string', 'null' => false, 'key' => 'index'), - 'content' => array('type'=>'text', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0)) - ); + 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), + 'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'), + 'model' => array('type' => 'string', 'null' => false, 'key' => 'index'), + 'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'), + 'field' => array('type' => 'string', 'null' => false, 'key' => 'index'), + 'content' => array('type' => 'text', 'null' => true, 'default' => null), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0)) + ); } diff --git a/app/Config/Schema/sessions.php b/app/Config/Schema/sessions.php index 7b7db69ab..e98ca060f 100644 --- a/app/Config/Schema/sessions.php +++ b/app/Config/Schema/sessions.php @@ -1,6 +1,4 @@ array('type'=>'string', 'null' => false, 'key' => 'primary'), - 'data' => array('type'=>'text', 'null' => true, 'default' => NULL), - 'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL), - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) - ); + 'id' => array('type' => 'string', 'null' => false, 'key' => 'primary'), + 'data' => array('type' => 'text', 'null' => true, 'default' => null), + 'expires' => array('type' => 'integer', 'null' => true, 'default' => null), + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) + ); } diff --git a/app/Console/cake.php b/app/Console/cake.php index 9732be9ef..edef89473 100644 --- a/app/Console/cake.php +++ b/app/Console/cake.php @@ -22,10 +22,10 @@ $dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php'; if (function_exists('ini_set')) { $root = dirname(dirname(dirname(__FILE__))); - ini_set('include_path', $root . $ds. 'lib' . PATH_SEPARATOR . ini_get('include_path')); + ini_set('include_path', $root . $ds . 'lib' . PATH_SEPARATOR . ini_get('include_path')); } -if (!include($dispatcher)) { +if (!include ($dispatcher)) { trigger_error('Could not locate CakePHP core files.', E_USER_ERROR); } unset($paths, $path, $dispatcher, $root, $ds); diff --git a/app/Controller/PagesController.php b/app/Controller/PagesController.php index 4759719ae..5a2e57db4 100644 --- a/app/Controller/PagesController.php +++ b/app/Controller/PagesController.php @@ -38,7 +38,6 @@ class PagesController extends AppController { */ public $name = 'Pages'; - /** * This controller does not use a model * diff --git a/app/webroot/index.php b/app/webroot/index.php index 36090de65..e125e09da 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -21,9 +21,9 @@ /** * Use the DS to separate the directories in other defines */ - if (!defined('DS')) { - define('DS', DIRECTORY_SEPARATOR); - } +if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); +} /** * These defines should only be edited if you have cake installed in * a directory layout other than the way it is distributed. @@ -34,16 +34,16 @@ * The full path to the directory which holds "app", WITHOUT a trailing DS. * */ - if (!defined('ROOT')) { - define('ROOT', dirname(dirname(dirname(__FILE__)))); - } +if (!defined('ROOT')) { + define('ROOT', dirname(dirname(dirname(__FILE__)))); +} /** * The actual directory name for the "app". * */ - if (!defined('APP_DIR')) { - define('APP_DIR', basename(dirname(dirname(__FILE__)))); - } +if (!defined('APP_DIR')) { + define('APP_DIR', basename(dirname(dirname(__FILE__)))); +} /** * The absolute path to the "cake" directory, WITHOUT a trailing DS. @@ -63,30 +63,30 @@ * Change at your own risk. * */ - if (!defined('WEBROOT_DIR')) { - define('WEBROOT_DIR', basename(dirname(__FILE__))); - } - if (!defined('WWW_ROOT')) { - define('WWW_ROOT', dirname(__FILE__) . DS); - } +if (!defined('WEBROOT_DIR')) { + define('WEBROOT_DIR', basename(dirname(__FILE__))); +} +if (!defined('WWW_ROOT')) { + define('WWW_ROOT', dirname(__FILE__) . DS); +} - if (!defined('CAKE_CORE_INCLUDE_PATH')) { - if (function_exists('ini_set')) { - ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); - } - if (!include('Cake' . DS . 'bootstrap.php')) { - $failed = true; - } - } else { - if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { - $failed = true; - } +if (!defined('CAKE_CORE_INCLUDE_PATH')) { + if (function_exists('ini_set')) { + ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); } - if (!empty($failed)) { - trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); + if (!include ('Cake' . DS . 'bootstrap.php')) { + $failed = true; } +} else { + if (!include (CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { + $failed = true; + } +} +if (!empty($failed)) { + trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); +} - App::uses('Dispatcher', 'Routing'); +App::uses('Dispatcher', 'Routing'); - $Dispatcher = new Dispatcher(); - $Dispatcher->dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding')))); +$Dispatcher = new Dispatcher(); +$Dispatcher->dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding')))); diff --git a/app/webroot/test.php b/app/webroot/test.php index 9a3a072ad..39bea7a91 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing + * @link http://book.cakephp.org/2.0/en/development/testing.html * @package app.webroot * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -21,9 +21,9 @@ ini_set('display_errors', 1); /** * Use the DS to separate the directories in other defines */ - if (!defined('DS')) { - define('DS', DIRECTORY_SEPARATOR); - } +if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); +} /** * These defines should only be edited if you have cake installed in * a directory layout other than the way it is distributed. @@ -34,16 +34,16 @@ ini_set('display_errors', 1); * The full path to the directory which holds "app", WITHOUT a trailing DS. * */ - if (!defined('ROOT')) { - define('ROOT', dirname(dirname(dirname(__FILE__)))); - } +if (!defined('ROOT')) { + define('ROOT', dirname(dirname(dirname(__FILE__)))); +} /** * The actual directory name for the "app". * */ - if (!defined('APP_DIR')) { - define('APP_DIR', basename(dirname(dirname(__FILE__)))); - } +if (!defined('APP_DIR')) { + define('APP_DIR', basename(dirname(dirname(__FILE__)))); +} /** * The absolute path to the "Cake" directory, WITHOUT a trailing DS. @@ -71,11 +71,11 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) { if (function_exists('ini_set')) { ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); } - if (!include('Cake' . DS . 'bootstrap.php')) { + if (!include ('Cake' . DS . 'bootstrap.php')) { $failed = true; } } else { - if (!include(CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { + if (!include (CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php')) { $failed = true; } } diff --git a/index.php b/index.php index 480a9c732..b54f617f3 100644 --- a/index.php +++ b/index.php @@ -20,21 +20,23 @@ * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + /** * Get Cake's root directory */ - define('APP_DIR', 'app'); - define('DS', DIRECTORY_SEPARATOR); - define('ROOT', dirname(__FILE__)); - define('WEBROOT_DIR', 'webroot'); - define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS); +define('APP_DIR', 'app'); +define('DS', DIRECTORY_SEPARATOR); +define('ROOT', dirname(__FILE__)); +define('WEBROOT_DIR', 'webroot'); +define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS); + /** * This only needs to be changed if the "cake" directory is located * outside of the distributed structure. * Full path to the directory containing "cake". Do not add trailing directory separator */ - if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); - } +if (!defined('CAKE_CORE_INCLUDE_PATH')) { + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); +} - require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php'; +require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php'; diff --git a/lib/Cake/Configure/IniReader.php b/lib/Cake/Configure/IniReader.php index f47713294..debd685c6 100644 --- a/lib/Cake/Configure/IniReader.php +++ b/lib/Cake/Configure/IniReader.php @@ -16,13 +16,15 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Hash', 'Utility'); /** - * Ini file configuration parser. Since IniReader uses parse_ini_file underneath, - * you should be aware that this class shares the same behavior, especially with - * regards to boolean and null values. + * Ini file configuration engine. * - * In addition to the native parse_ini_file features, IniReader also allows you + * Since IniReader uses parse_ini_file underneath, you should be aware that this + * class shares the same behavior, especially with regards to boolean and null values. + * + * In addition to the native `parse_ini_file` features, IniReader also allows you * to create nested array structures through usage of `.` delimited names. This allows * you to create nested arrays structures in an ini config file. For example: * @@ -126,6 +128,7 @@ class IniReader implements ConfigReaderInterface { if ($value === '') { $value = false; } + unset($values[$key]); if (strpos($key, '.') !== false) { $values = Hash::insert($values, $key, $value); } else { @@ -135,4 +138,47 @@ class IniReader implements ConfigReaderInterface { return $values; } +/** + * Dumps the state of Configure data into an ini formatted string. + * + * @param string $filename The filename on $this->_path to save into. + * @param array $data The data to convert to ini file. + * @return int Bytes saved. + */ + public function dump($filename, $data) { + $result = array(); + foreach ($data as $key => $value) { + if ($key[0] != '[') { + $result[] = "[$key]"; + } + if (is_array($value)) { + $keyValues = Hash::flatten($value, '.'); + foreach ($keyValues as $k => $v) { + $result[] = "$k = " . $this->_value($v); + } + } + } + $contents = join("\n", $result); + return file_put_contents($this->_path . $filename, $contents); + } + +/** + * Converts a value into the ini equivalent + * + * @param mixed $value to export. + * @return string String value for ini file. + */ + protected function _value($val) { + if ($val === null) { + return 'null'; + } + if ($val === true) { + return 'true'; + } + if ($val === false) { + return 'false'; + } + return (string)$val; + } + } diff --git a/lib/Cake/Configure/PhpReader.php b/lib/Cake/Configure/PhpReader.php index 2043351b8..f5d961961 100644 --- a/lib/Cake/Configure/PhpReader.php +++ b/lib/Cake/Configure/PhpReader.php @@ -4,7 +4,6 @@ * * PHP 5 * - * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License @@ -88,4 +87,17 @@ class PhpReader implements ConfigReaderInterface { return $config; } +/** + * Converts the provided $data into a string of PHP code that can + * be used saved into a file and loaded later. + * + * @param string $filename The filename to create on $this->_path. + * @param array $data Data to dump. + * @return int Bytes saved. + */ + public function dump($filename, $data) { + $contents = '_path . $filename, $contents); + } + } diff --git a/lib/Cake/Console/Command/Task/FixtureTask.php b/lib/Cake/Console/Command/Task/FixtureTask.php index c4bf93d62..92e5154c6 100644 --- a/lib/Cake/Console/Command/Task/FixtureTask.php +++ b/lib/Cake/Console/Command/Task/FixtureTask.php @@ -362,6 +362,9 @@ class FixtureTask extends BakeTask { $values = array(); foreach ($record as $field => $value) { $val = var_export($value, true); + if ($val === 'NULL') { + $val = 'null'; + } $values[] = "\t\t\t'$field' => $val"; } $out .= "\t\tarray(\n"; diff --git a/lib/Cake/Console/Command/Task/ProjectTask.php b/lib/Cake/Console/Command/Task/ProjectTask.php index 92135906a..03386dc99 100644 --- a/lib/Cake/Console/Command/Task/ProjectTask.php +++ b/lib/Cake/Console/Command/Task/ProjectTask.php @@ -70,12 +70,6 @@ class ProjectTask extends AppShell { $success = true; if ($this->bake($project)) { $path = Folder::slashTerm($project); - if ($this->createHome($path)) { - $this->out(__d('cake_console', ' * Welcome page created')); - } else { - $this->err(__d('cake_console', 'The Welcome page was NOT created')); - $success = false; - } if ($this->securitySalt($path) === true) { $this->out(__d('cake_console', ' * Random hash key created for \'Security.salt\'')); @@ -220,20 +214,6 @@ class ProjectTask extends AppShell { } } -/** - * Writes a file with a default home page to the project. - * - * @param string $dir Path to project - * @return boolean Success - */ - public function createHome($dir) { - $app = basename($dir); - $path = $dir . 'View' . DS . 'Pages' . DS; - $source = CAKE . 'Console' . DS . 'Templates' . DS . 'default' . DS . 'views' . DS . 'home.ctp'; - include $source; - return $this->createFile($path . 'home.ctp', $output); - } - /** * Generates the correct path to the CakePHP libs that are generating the project * and points app/console/cake.php to the right place diff --git a/lib/Cake/Console/Command/Task/TemplateTask.php b/lib/Cake/Console/Command/Task/TemplateTask.php index d9a0e3f43..34da4f00c 100644 --- a/lib/Cake/Console/Command/Task/TemplateTask.php +++ b/lib/Cake/Console/Command/Task/TemplateTask.php @@ -55,11 +55,18 @@ class TemplateTask extends AppShell { * Find the paths to all the installed shell themes in the app. * * Bake themes are directories not named `skel` inside a `Console/Templates` path. - * + * They are listed in this order: app -> plugin -> default + * * @return array Array of bake themes that are installed. */ protected function _findThemes() { - $paths = array(); + $paths = App::path('Console'); + + $plugins = App::objects('plugin'); + foreach ($plugins as $plugin) { + $paths[] = $this->_pluginPath($plugin) . 'Console' . DS; + } + $core = current(App::core('Console')); $separator = DS === '/' ? '/' : '\\\\'; $core = preg_replace('#shells' . $separator . '$#', '', $core); @@ -69,13 +76,7 @@ class TemplateTask extends AppShell { $contents = $Folder->read(); $themeFolders = $contents[0]; - $plugins = App::objects('plugin'); $paths[] = $core; - foreach ($plugins as $plugin) { - $paths[] = $this->_pluginPath($plugin) . 'Console' . DS; - } - - $paths = array_merge($paths, App::path('Console')); // TEMPORARY TODO remove when all paths are DS terminated foreach ($paths as $i => $path) { diff --git a/lib/Cake/Console/Command/Task/TestTask.php b/lib/Cake/Console/Command/Task/TestTask.php index 6b86f7fbe..feb107e07 100644 --- a/lib/Cake/Console/Command/Task/TestTask.php +++ b/lib/Cake/Console/Command/Task/TestTask.php @@ -77,7 +77,7 @@ class TestTask extends BakeTask { } if (count($this->args) > 1) { - $type = Inflector::underscore($this->args[0]); + $type = Inflector::classify($this->args[0]); if ($this->bake($type, $this->args[1])) { $this->out('Done'); } @@ -139,7 +139,7 @@ class TestTask extends BakeTask { $methods = $this->getTestableMethods($fullClassName); } $mock = $this->hasMockClass($type, $fullClassName); - list($preConstruct, $construction, $postConstruct) = $this->generateConstructor($type, $fullClassName); + list($preConstruct, $construction, $postConstruct) = $this->generateConstructor($type, $fullClassName, $plugin); $uses = $this->generateUses($type, $realType, $fullClassName); $this->out("\n" . __d('cake_console', 'Baking test case for %s %s ...', $className, $type), 1, Shell::QUIET); @@ -241,6 +241,12 @@ class TestTask extends BakeTask { */ public function isLoadableClass($package, $class) { App::uses($class, $package); + list($plugin, $ns) = pluginSplit($package); + if ($plugin) { + App::uses("{$plugin}AppController", $package); + App::uses("{$plugin}AppModel", $package); + App::uses("{$plugin}AppHelper", $package); + } return class_exists($class); } @@ -440,13 +446,14 @@ class TestTask extends BakeTask { * * @param string $type The Type of object you are generating tests for eg. controller * @param string $fullClassName The Classname of the class the test is being generated for. + * @param string $plugin The plugin name. * @return array Constructor snippets for the thing you are building. */ - public function generateConstructor($type, $fullClassName) { + public function generateConstructor($type, $fullClassName, $plugin) { $type = strtolower($type); $pre = $post = ''; if ($type == 'model') { - $construct = "ClassRegistry::init('$fullClassName');\n"; + $construct = "ClassRegistry::init('{$plugin}$fullClassName');\n"; } if ($type == 'behavior') { $construct = "new $fullClassName();\n"; diff --git a/lib/Cake/Console/Command/TestShell.php b/lib/Cake/Console/Command/TestShell.php index a3b410ba0..e5b76b900 100644 --- a/lib/Cake/Console/Command/TestShell.php +++ b/lib/Cake/Console/Command/TestShell.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/Command/TestsuiteShell.php b/lib/Cake/Console/Command/TestsuiteShell.php index 71decbeff..2f858c23b 100644 --- a/lib/Cake/Console/Command/TestsuiteShell.php +++ b/lib/Cake/Console/Command/TestsuiteShell.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ diff --git a/lib/Cake/Console/ShellDispatcher.php b/lib/Cake/Console/ShellDispatcher.php index 87c3c6e02..40c27cc15 100644 --- a/lib/Cake/Console/ShellDispatcher.php +++ b/lib/Cake/Console/ShellDispatcher.php @@ -160,9 +160,11 @@ class ShellDispatcher { $errorHandler = new ConsoleErrorHandler(); if (empty($error['consoleHandler'])) { $error['consoleHandler'] = array($errorHandler, 'handleError'); + Configure::write('error', $error); } if (empty($exception['consoleHandler'])) { $exception['consoleHandler'] = array($errorHandler, 'handleException'); + Configure::write('exception', $exception); } set_exception_handler($exception['consoleHandler']); set_error_handler($error['consoleHandler'], Configure::read('Error.level')); diff --git a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp index c0921c2c4..e34c382d5 100644 --- a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp +++ b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp @@ -31,6 +31,7 @@ /** * view method * + * @throws NotFoundException * @param string $id * @return void */ @@ -85,6 +86,7 @@ /** * edit method * + * @throws NotFoundException * @param string $id * @return void */ @@ -129,6 +131,8 @@ /** * delete method * + * @throws MethodNotAllowedException + * @throws NotFoundException * @param string $id * @return void */ @@ -154,4 +158,4 @@ $this->flash(__(' was not deleted'), array('action' => 'index')); $this->redirect(array('action' => 'index')); - } \ No newline at end of file + } diff --git a/lib/Cake/Console/Templates/default/classes/controller.ctp b/lib/Cake/Console/Templates/default/classes/controller.ctp index 741e06b00..6e27d0d19 100644 --- a/lib/Cake/Console/Templates/default/classes/controller.ctp +++ b/lib/Cake/Console/Templates/default/classes/controller.ctp @@ -46,36 +46,36 @@ class Controller extends App * @var mixed */ public $scaffold; - - - } diff --git a/lib/Cake/Console/Templates/default/classes/fixture.ctp b/lib/Cake/Console/Templates/default/classes/fixture.ctp index 48f6c7834..2bec6a549 100644 --- a/lib/Cake/Console/Templates/default/classes/fixture.ctp +++ b/lib/Cake/Console/Templates/default/classes/fixture.ctp @@ -25,6 +25,7 @@ * */ class Fixture extends CakeTestFixture { + /** * Table name @@ -32,6 +33,7 @@ class Fixture extends CakeTestFixture { * @var string */ public $table = ''; + /** @@ -40,8 +42,8 @@ class Fixture extends CakeTestFixture { * @var array */ public $import = ; - + /** * Fields @@ -49,8 +51,8 @@ class Fixture extends CakeTestFixture { * @var array */ public $fields = ; - + /** * Records @@ -58,5 +60,6 @@ class Fixture extends CakeTestFixture { * @var array */ public $records = ; + } diff --git a/lib/Cake/Console/Templates/default/classes/model.ctp b/lib/Cake/Console/Templates/default/classes/model.ctp index 3634b802f..f7895da2b 100644 --- a/lib/Cake/Console/Templates/default/classes/model.ctp +++ b/lib/Cake/Console/Templates/default/classes/model.ctp @@ -36,6 +36,7 @@ foreach (array('hasOne', 'belongsTo', 'hasMany', 'hasAndBelongsToMany') as $asso ?> */ class extends AppModel { + /** * Use database config @@ -43,12 +44,15 @@ class extends AppModel { * @var string */ public $useDbConfig = ''; - - /** * Primary key field @@ -56,7 +60,9 @@ if ($primaryKey !== 'id'): ?> * @var string */ public $primaryKey = ''; + /** * Display field @@ -64,6 +70,7 @@ if ($displayField): ?> * @var string */ public $displayField = ''; + ', ''); - + /** * Test * */ class Test extends { + /** * Auto render * @@ -47,6 +48,7 @@ class Test extends { public function redirect($url, $status = null, $exit = true) { $this->redirectUrl = $url; } + } @@ -55,13 +57,16 @@ class Test extends { * */ class Test extends CakeTestCase { + /** * Fixtures * * @var array */ - public $fixtures = array(''); + public $fixtures = array( + '' + ); /** @@ -94,7 +99,7 @@ class Test extends CakeTestCase { * @return void */ public function test() { - } + } diff --git a/lib/Cake/Console/Templates/default/views/home.ctp b/lib/Cake/Console/Templates/default/views/home.ctp deleted file mode 100644 index 424051981..000000000 --- a/lib/Cake/Console/Templates/default/views/home.ctp +++ /dev/null @@ -1,113 +0,0 @@ - -

For updates and important announcements, visit http://cakefest.org

-\n"; -$output .= "

Sweet, \"" . Inflector::humanize($app) . "\" got Baked by CakePHP!

\n"; -$output .=" - 0): - Debugger::checkSecurityKeys(); -endif; -?> -

-=')): - echo ''; - echo __d('cake_dev', 'Your version of PHP is 5.2.8 or higher.'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your version of PHP is too low. You need PHP 5.2.8 or higher to use CakePHP.'); - echo ''; - endif; -?> -

-

-'; - echo __d('cake_dev', 'Your tmp directory is writable.'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your tmp directory is NOT writable.'); - echo ''; - endif; -?> -

-

-'; - echo __d('cake_dev', 'The %s is being used for core caching. To change the config edit APP/Config/core.php ', ''. \$settings['engine'] . 'Engine'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your cache is NOT working. Please check the settings in APP/Config/core.php'); - echo ''; - endif; -?> -

-

-'; - echo __d('cake_dev', 'Your database configuration file is present.'); - \$filePresent = true; - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Your database configuration file is NOT present.'); - echo '
'; - echo __d('cake_dev', 'Rename APP/Config/database.php.default to APP/Config/database.php'); - echo '
'; - endif; -?> -

- -

- isConnected()): - echo ''; - echo __d('cake_dev', 'Cake is able to connect to the database.'); - echo ''; - else: - echo ''; - echo __d('cake_dev', 'Cake is NOT able to connect to the database.'); - echo ''; - endif; - ?> -

- -'; - __d('cake_dev', 'PCRE has not been compiled with Unicode support.'); - echo '
'; - __d('cake_dev', 'Recompile PCRE with Unicode support by adding --enable-unicode-properties when configuring'); - echo '

'; - } -?>\n"; -$output .= "

\n"; -$output .= "

\n"; -$output .= "', APP . 'View' . DS . 'Layouts' . DS . 'default.ctp.
', APP . 'webroot' . DS . 'css');\n"; -$output .= "?>\n"; -$output .= "

\n"; -?> diff --git a/lib/Cake/Console/Templates/skel/webroot/test.php b/lib/Cake/Console/Templates/skel/webroot/test.php index c28757943..37b7f2528 100644 --- a/lib/Cake/Console/Templates/skel/webroot/test.php +++ b/lib/Cake/Console/Templates/skel/webroot/test.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing + * @link http://book.cakephp.org/2.0/en/development/testing.html * @package app.webroot * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Controller/Component.php b/lib/Cake/Controller/Component.php index cecf39e05..876174e8c 100644 --- a/lib/Cake/Controller/Component.php +++ b/lib/Cake/Controller/Component.php @@ -35,7 +35,7 @@ App::uses('ComponentCollection', 'Controller'); * - `beforeRedirect()` - Fired before a redirect() is done. * * @package Cake.Controller - * @link http://book.cakephp.org/view/993/Components + * @link http://book.cakephp.org/2.0/en/controllers/components.html * @see Controller::$components */ class Component extends Object { diff --git a/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php b/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php index 560da028f..d9dc7248f 100644 --- a/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php @@ -30,6 +30,7 @@ abstract class BaseAuthenticate { * - `scope` Additional conditions to use when looking up and authenticating users, * i.e. `array('User.is_active' => 1).` * - `recursive` The value of the recursive key passed to find(). Defaults to 0. + * - `contain` Extra models to contain and store in session. * * @var array */ @@ -40,7 +41,8 @@ abstract class BaseAuthenticate { ), 'userModel' => 'User', 'scope' => array(), - 'recursive' => 0 + 'recursive' => 0, + 'contain' => null, ); /** @@ -82,13 +84,16 @@ abstract class BaseAuthenticate { } $result = ClassRegistry::init($userModel)->find('first', array( 'conditions' => $conditions, - 'recursive' => (int)$this->settings['recursive'] + 'recursive' => (int)$this->settings['recursive'], + 'contain' => $this->settings['contain'], )); if (empty($result) || empty($result[$model])) { return false; } - unset($result[$model][$fields['password']]); - return $result[$model]; + $user = $result[$model]; + unset($user[$fields['password']]); + unset($result[$model]); + return array_merge($user, $result); } /** diff --git a/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php b/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php index c8e772e1c..df65e9c71 100644 --- a/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php @@ -50,6 +50,7 @@ class BasicAuthenticate extends BaseAuthenticate { * - `scope` Additional conditions to use when looking up and authenticating users, * i.e. `array('User.is_active' => 1).` * - `recursive` The value of the recursive key passed to find(). Defaults to 0. + * - `contain` Extra models to contain and store in session. * - `realm` The realm authentication is for. Defaults the server name. * * @var array @@ -62,6 +63,7 @@ class BasicAuthenticate extends BaseAuthenticate { 'userModel' => 'User', 'scope' => array(), 'recursive' => 0, + 'contain' => null, 'realm' => '', ); diff --git a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php index 27722a9c7..bdea7d8aa 100644 --- a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php @@ -63,6 +63,8 @@ class DigestAuthenticate extends BaseAuthenticate { * - `userModel` The model name of the User, defaults to User. * - `scope` Additional conditions to use when looking up and authenticating users, * i.e. `array('User.is_active' => 1).` + * - `recursive` The value of the recursive key passed to find(). Defaults to 0. + * - `contain` Extra models to contain and store in session. * - `realm` The realm authentication is for, Defaults to the servername. * - `nonce` A nonce used for authentication. Defaults to `uniqid()`. * - `qop` Defaults to auth, no other values are supported at this time. @@ -79,6 +81,7 @@ class DigestAuthenticate extends BaseAuthenticate { 'userModel' => 'User', 'scope' => array(), 'recursive' => 0, + 'contain' => null, 'realm' => '', 'qop' => 'auth', 'nonce' => '', diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 9a60083eb..b8d6395e2 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -117,7 +117,7 @@ class AuthComponent extends Component { * You can also use AuthComponent::ALL instead of the string 'all' * * @var mixed - * @link http://book.cakephp.org/view/1275/authorize + * @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#authorization */ public $authorize = false; diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index 5c66f0509..6341a4901 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -100,6 +100,7 @@ class Controller extends Object implements CakeEventListener { * additional information about the request. * * @var CakeRequest + * @link http://book.cakephp.org/2.0/en/controllers/request-response.html#cakerequest */ public $request; @@ -107,6 +108,7 @@ class Controller extends Object implements CakeEventListener { * An instance of a CakeResponse object that contains information about the impending response * * @var CakeResponse + * @link http://book.cakephp.org/2.0/en/controllers/request-response.html#cakeresponse */ public $response; @@ -184,7 +186,7 @@ class Controller extends Object implements CakeEventListener { * Example: `public $components = array('Session', 'RequestHandler', 'Acl');` * * @var array - * @link http://book.cakephp.org/view/961/components-helpers-and-uses + * @link http://book.cakephp.org/2.0/en/controllers/components.html */ public $components = array('Session'); @@ -196,7 +198,8 @@ class Controller extends Object implements CakeEventListener { public $viewClass = 'View'; /** - * Instance of the View created during rendering. Won't be set until after Controller::render() is called. + * Instance of the View created during rendering. Won't be set until after + * Controller::render() is called. * * @var View */ @@ -234,7 +237,7 @@ class Controller extends Object implements CakeEventListener { * marks all the actions in the controller for view caching. * * @var mixed - * @link http://book.cakephp.org/view/1380/Caching-in-the-Controller + * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/cache.html#additional-configuration-options */ public $cacheAction = false; @@ -249,13 +252,13 @@ class Controller extends Object implements CakeEventListener { * Triggers Scaffolding * * @var mixed - * @link http://book.cakephp.org/view/1103/Scaffolding + * @link http://book.cakephp.org/2.0/en/controllers/scaffolding.html */ public $scaffold = false; /** - * Holds current methods of the controller. This is a list of all the methods reachable - * via url. Modifying this array, will allow you to change which methods can be reached. + * Holds current methods of the controller. This is a list of all the methods reachable + * via url. Modifying this array, will allow you to change which methods can be reached. * * @var array */ @@ -767,18 +770,18 @@ class Controller extends Object implements CakeEventListener { session_write_close(); } - if (!empty($status) && is_string($status)) { + if ($url !== null) { + $this->response->header('Location', Router::url($url, true)); + } + + if (is_string($status)) { $codes = array_flip($this->response->httpCodes()); if (isset($codes[$status])) { $status = $codes[$status]; } } - if ($url !== null) { - $this->response->header('Location', Router::url($url, true)); - } - - if (!empty($status) && ($status >= 300 && $status < 400)) { + if ($status) { $this->response->statusCode($status); } diff --git a/lib/Cake/Controller/Scaffold.php b/lib/Cake/Controller/Scaffold.php index 1d0fd3e1a..854312686 100644 --- a/lib/Cake/Controller/Scaffold.php +++ b/lib/Cake/Controller/Scaffold.php @@ -305,11 +305,11 @@ class Scaffold { throw new NotFoundException(__d('cake', 'Invalid %s', Inflector::humanize($this->modelClass))); } if ($this->ScaffoldModel->delete()) { - $message = __d('cake', 'The %1$s with id: %2$d has been deleted.', Inflector::humanize($this->modelClass), $id); + $message = __d('cake', 'The %1$s with id: %2$s has been deleted.', Inflector::humanize($this->modelClass), $id); return $this->_sendMessage($message); } else { $message = __d('cake', - 'There was an error deleting the %1$s with id: %2$d', + 'There was an error deleting the %1$s with id: %2$s', Inflector::humanize($this->modelClass), $id ); diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 01e0d1ae6..071faa7a6 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -913,7 +913,11 @@ class App { return; } - $errorHandler = Configure::read('Error.handler'); + if (PHP_SAPI === 'cli') { + $errorHandler = Configure::read('Error.consoleHandler'); + } else { + $errorHandler = Configure::read('Error.handler'); + } if (!is_callable($errorHandler)) { return; } diff --git a/lib/Cake/Core/Configure.php b/lib/Cake/Core/Configure.php index 45e60fd2d..b90fcfc6d 100644 --- a/lib/Cake/Core/Configure.php +++ b/lib/Cake/Core/Configure.php @@ -278,6 +278,45 @@ class Configure { return self::write($values); } +/** + * Dump data currently in Configure into $filename. The serialization format + * is decided by the config reader attached as $config. For example, if the + * 'default' adapter is a PhpReader, the generated file will be a PHP + * configuration file loadable by the PhpReader. + * + * ## Usage + * + * Given that the 'default' reader is an instance of PhpReader. + * Save all data in Configure to the file `my_config.php`: + * + * `Configure::dump('my_config.php', 'default');` + * + * Save only the error handling configuration: + * + * `Configure::dump('error.php', 'default', array('Error', 'Exception');` + * + * @param string $key The identifier to create in the config adapter. + * This could be a filename or a cache key depending on the adapter being used. + * @param string $config The name of the configured adapter to dump data with. + * @param array $keys The name of the top-level keys you want to dump. + * This allows you save only some data stored in Configure. + * @return boolean success + * @throws ConfigureException if the adapter does not implement a `dump` method. + */ + public static function dump($key, $config = 'default', $keys = array()) { + if (empty(self::$_readers[$config])) { + throw new ConfigureException(__d('cake', 'There is no "%s" adapter.', $config)); + } + if (!method_exists(self::$_readers[$config], 'dump')) { + throw new ConfigureException(__d('cake', 'The "%s" adapter, does not have a dump() method.', $config)); + } + $values = self::$_values; + if (!empty($keys) && is_array($keys)) { + $values = array_intersect_key($values, array_flip($keys)); + } + return (bool)self::$_readers[$config]->dump($key, $values); + } + /** * Used to determine the current version of CakePHP. * diff --git a/lib/Cake/Error/ErrorHandler.php b/lib/Cake/Error/ErrorHandler.php index 0a25b1c27..99b589655 100644 --- a/lib/Cake/Error/ErrorHandler.php +++ b/lib/Cake/Error/ErrorHandler.php @@ -204,7 +204,10 @@ class ErrorHandler { return false; } - ob_clean(); + if (ob_get_level()) { + ob_clean(); + } + if (Configure::read('debug')) { call_user_func($exceptionHandler, new FatalErrorException($description, 500, $file, $line)); } else { diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index adb6d4cce..d471b3123 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -147,8 +147,12 @@ class ExceptionRenderer { } $response = new CakeResponse(array('charset' => Configure::read('App.encoding'))); try { - $controller = new CakeErrorController($request, $response); + if (class_exists('AppController')) { + $controller = new CakeErrorController($request, $response); + } } catch (Exception $e) { + } + if (empty($controller)) { $controller = new Controller($request, $response); $controller->viewPath = 'Errors'; } @@ -264,6 +268,11 @@ class ExceptionRenderer { $this->controller->afterFilter(); $this->controller->response->send(); } catch (Exception $e) { + $this->controller->set(array( + 'error' => $e, + 'name' => $e->getMessage(), + 'code' => $e->getCode(), + )); $this->_outputMessageSafe('error500'); } } diff --git a/lib/Cake/Error/exceptions.php b/lib/Cake/Error/exceptions.php index fea1eacdf..53c1cb9d3 100644 --- a/lib/Cake/Error/exceptions.php +++ b/lib/Cake/Error/exceptions.php @@ -12,7 +12,7 @@ * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html * @package Cake.Error * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -555,3 +555,18 @@ class FatalErrorException extends CakeException { } } + +/** + * Not Implemented Exception - used when an API method is not implemented + * + * @package Cake.Error + */ +class NotImplementedException extends CakeException { + + protected $_messageTemplate = '%s is not implemented.'; + + public function __construct($message, $code = 501) { + parent::__construct($message, $code); + } + +} diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php index bce937cca..83378a6c2 100644 --- a/lib/Cake/Model/Behavior/TranslateBehavior.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -310,6 +310,42 @@ class TranslateBehavior extends ModelBehavior { * @return boolean */ public function beforeValidate(Model $model) { + unset($this->runtime[$model->alias]['beforeSave']); + $this->_setRuntimeData($model); + return true; + } + +/** + * beforeSave callback. + * + * Copies data into the runtime property when `$options['validate']` is + * disabled. Or the runtime data hasn't been set yet. + * + * @param Model $model Model save was called on. + * @return boolean true. + */ + public function beforeSave(Model $model, $options = array()) { + if (isset($options['validate']) && $options['validate'] == false) { + unset($this->runtime[$model->alias]['beforeSave']); + } + if (isset($this->runtime[$model->alias]['beforeSave'])) { + return true; + } + $this->_setRuntimeData($model); + return true; + } + +/** + * Sets the runtime data. + * + * Used from beforeValidate() and beforeSave() for compatibility issues, + * and to allow translations to be persisted even when validation + * is disabled. + * + * @param Model $model + * @return void + */ + protected function _setRuntimeData(Model $model) { $locale = $this->_getLocale($model); if (empty($locale)) { return true; @@ -333,7 +369,6 @@ class TranslateBehavior extends ModelBehavior { } } $this->runtime[$model->alias]['beforeSave'] = $tempData; - return true; } /** @@ -344,12 +379,17 @@ class TranslateBehavior extends ModelBehavior { * @return void */ public function afterSave(Model $model, $created) { - if (!isset($this->runtime[$model->alias]['beforeSave'])) { + if (!isset($this->runtime[$model->alias]['beforeValidate']) && !isset($this->runtime[$model->alias]['beforeSave'])) { return true; } $locale = $this->_getLocale($model); - $tempData = $this->runtime[$model->alias]['beforeSave']; - unset($this->runtime[$model->alias]['beforeSave']); + if (isset($this->runtime[$model->alias]['beforeValidate'])) { + $tempData = $this->runtime[$model->alias]['beforeValidate']; + } else { + $tempData = $this->runtime[$model->alias]['beforeSave']; + } + + unset($this->runtime[$model->alias]['beforeValidate'], $this->runtime[$model->alias]['beforeSave']); $conditions = array('model' => $model->alias, 'foreign_key' => $model->id); $RuntimeModel = $this->translateModel($model); diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index b9ae0ad0d..35698a347 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -414,12 +414,12 @@ class CakeSchema extends Object { unset($value['type']); $col .= join(', ', $this->_values($value)); } elseif ($field == 'indexes') { - $col = "\t\t'indexes' => array("; + $col = "\t\t'indexes' => array(\n\t\t\t"; $props = array(); foreach ((array)$value as $key => $index) { $props[] = "'{$key}' => array(" . join(', ', $this->_values($index)) . ")"; } - $col .= join(', ', $props); + $col .= join(",\n\t\t\t", $props) . "\n\t\t"; } elseif ($field == 'tableParameters') { $col = "\t\t'tableParameters' => array("; $props = array(); @@ -577,6 +577,9 @@ class CakeSchema extends Object { $vals[] = "'{$key}' => array('" . implode("', '", $val) . "')"; } elseif (!is_numeric($key)) { $val = var_export($val, true); + if ($val === 'NULL') { + $val = 'null'; + } $vals[] = "'{$key}' => {$val}"; } } diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index 70c51366c..9506a8a94 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -681,8 +681,8 @@ class Mysql extends DboSource { * * @return boolean */ - public function supportNestedTransaction() { - return $this->nestedTransaction && version_compare($this->getVersion(), '4.1', '>='); + public function nestedTransactionSupported() { + return $this->useNestedTransactions && version_compare($this->getVersion(), '4.1', '>='); } } diff --git a/lib/Cake/Model/Datasource/Database/Postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php index 35f568aad..132e822c1 100644 --- a/lib/Cake/Model/Datasource/Database/Postgres.php +++ b/lib/Cake/Model/Datasource/Database/Postgres.php @@ -900,8 +900,8 @@ class Postgres extends DboSource { * * @return boolean */ - public function supportNestedTransaction() { - return $this->nestedTransaction && version_compare($this->getVersion(), '8.0', '>='); + public function nestedTransactionSupported() { + return $this->useNestedTransactions && version_compare($this->getVersion(), '8.0', '>='); } } diff --git a/lib/Cake/Model/Datasource/Database/Sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php index 419709892..4c5b3e541 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -564,8 +564,8 @@ class Sqlite extends DboSource { * * @return boolean */ - public function supportNestedTransaction() { - return $this->nestedTransaction && version_compare($this->getVersion(), '3.6.8', '>='); + public function nestedTransactionSupported() { + return $this->useNestedTransactions && version_compare($this->getVersion(), '3.6.8', '>='); } } diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 0ba0eb3e2..0878efdd5 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -76,7 +76,7 @@ class DboSource extends DataSource { * * @var boolean */ - public $nestedTransaction = false; + public $useNestedTransactions = false; /** * Print full query debug info? @@ -2031,7 +2031,7 @@ class DboSource extends DataSource { * * @return boolean */ - public function supportNestedTransaction() { + public function nestedTransactionSupported() { return false; } @@ -2044,7 +2044,7 @@ class DboSource extends DataSource { */ public function begin() { if ($this->_transactionStarted) { - if ($this->supportNestedTransaction()) { + if ($this->nestedTransactionSupported()) { return $this->_beginNested(); } $this->_transactionNesting++; @@ -2092,7 +2092,7 @@ class DboSource extends DataSource { return $this->_connection->commit(); } - if ($this->supportNestedTransaction()) { + if ($this->nestedTransactionSupported()) { return $this->_commitNested(); } @@ -2134,7 +2134,7 @@ class DboSource extends DataSource { return $this->_connection->rollBack(); } - if ($this->supportNestedTransaction()) { + if ($this->nestedTransactionSupported()) { return $this->_rollbackNested(); } diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 5dc04a134..62ac03e18 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -60,7 +60,7 @@ class Model extends Object implements CakeEventListener { * Custom database table name, or null/false if no table association is desired. * * @var string - * @link http://book.cakephp.org/2.0/en/models/model-attributes.html#useTable + * @link http://book.cakephp.org/2.0/en/models/model-attributes.html#usetable */ public $useTable = null; @@ -70,7 +70,7 @@ class Model extends Object implements CakeEventListener { * This field is also used in `find('list')` when called with no extra parameters in the fields list * * @var string - * @link http://book.cakephp.org/2.0/en/models/model-attributes.html#displayField + * @link http://book.cakephp.org/2.0/en/models/model-attributes.html#displayfield */ public $displayField = null; @@ -262,7 +262,7 @@ class Model extends Object implements CakeEventListener { * caching only, the results are not stored beyond the current request. * * @var boolean - * @link http://book.cakephp.org/2.0/en/models/model-attributes.html#cacheQueries + * @link http://book.cakephp.org/2.0/en/models/model-attributes.html#cachequeries */ public $cacheQueries = false; @@ -1454,7 +1454,7 @@ class Model extends Object implements CakeEventListener { $defaults = array(); $this->id = false; $this->data = array(); - $this->validationErrors = $this->validator()->validationErrors = array(); + $this->validationErrors = array(); if ($data !== null && $data !== false) { foreach ($this->schema() as $field => $properties) { @@ -2041,7 +2041,7 @@ class Model extends Object implements CakeEventListener { } $options = array_merge(array('validate' => 'first', 'atomic' => true, 'deep' => false), $options); - $validationErrors = array(); + $this->validationErrors = $validationErrors = array(); if (empty($data) && $options['validate'] !== false) { $result = $this->save($data, $options); @@ -2109,6 +2109,10 @@ class Model extends Object implements CakeEventListener { * - fieldList: Equivalent to the $fieldList parameter in Model::save() * - deep: If set to true, all associated data will be validated as well. * + * Warning: This method could potentially change the passed argument `$data`, + * If you do not want this to happen, make a copy of `$data` before passing it + * to this method + * * @param array $data Record data to validate. This should be a numerically-indexed array * @param array $options Options to use when validating record data (see above), See also $options of validates(). * @return boolean True on success, or false on failure. @@ -2152,7 +2156,7 @@ class Model extends Object implements CakeEventListener { } $options = array_merge(array('validate' => 'first', 'atomic' => true, 'deep' => false), $options); - $validationErrors = array(); + $this->validationErrors = $validationErrors = array(); if (empty($data) && $options['validate'] !== false) { $result = $this->save($data, $options); @@ -2285,14 +2289,74 @@ class Model extends Object implements CakeEventListener { * - fieldList: Equivalent to the $fieldList parameter in Model::save() * - deep: If set to true, not only directly associated data , but deeper nested associated data is validated as well. * + * Warning: This method could potentially change the passed argument `$data`, + * If you do not want this to happen, make a copy of `$data` before passing it + * to this method + * * @param array $data Record data to validate. This should be an array indexed by association name. * @param array $options Options to use when validating record data (see above), See also $options of validates(). * @return array|boolean If atomic: True on success, or false on failure. * Otherwise: array similar to the $data array passed, but values are set to true/false * depending on whether each record validated successfully. */ - public function validateAssociated($data, $options = array()) { - return $this->validator()->validateAssociated($data, $options); + public function validateAssociated(&$data, $options = array()) { + $options = array_merge(array('atomic' => true, 'deep' => false), $options); + $this->validationErrors = $validationErrors = $return = array(); + if (!($this->create($data) && $this->validates($options))) { + $validationErrors[$this->alias] = $this->validationErrors; + $return[$this->alias] = false; + } else { + $return[$this->alias] = true; + } + + if (empty($options['deep'])) { + $data = $this->data; + } else { + $modelData = $this->data; + $recordData = $modelData[$this->alias]; + unset($modelData[$this->alias]); + $data = $modelData + array_merge($data, $recordData); + } + + $associations = $this->getAssociated(); + foreach ($data as $association => &$values) { + $validates = true; + if (isset($associations[$association])) { + if (in_array($associations[$association], array('belongsTo', 'hasOne'))) { + if ($options['deep']) { + $validates = $this->{$association}->validateAssociated($values, $options); + } else { + $validates = $this->{$association}->create($values) !== null && $this->{$association}->validates($options); + } + if (is_array($validates)) { + if (in_array(false, $validates, true)) { + $validates = false; + } else { + $validates = true; + } + } + $return[$association] = $validates; + } elseif ($associations[$association] === 'hasMany') { + $validates = $this->{$association}->validateMany($values, $options); + $return[$association] = $validates; + } + if (!$validates || (is_array($validates) && in_array(false, $validates, true))) { + $validationErrors[$association] = $this->{$association}->validationErrors; + } + } + } + + $this->validationErrors = $validationErrors; + if (isset($validationErrors[$this->alias])) { + $this->validationErrors = $validationErrors[$this->alias]; + } + if (!$options['atomic']) { + return $return; + } + if ($return[$this->alias] === false || !empty($this->validationErrors)) { + return false; + } + return true; } /** @@ -3239,7 +3303,7 @@ class Model extends Object implements CakeEventListener { * @param array $queryData Data used to execute this query, i.e. conditions, order, etc. * @return mixed true if the operation should continue, false if it should abort; or, modified * $queryData to continue with new $queryData - * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeFind-1049 + * @link http://book.cakephp.org/2.0/en/models/callback-methods.html#beforefind */ public function beforeFind($queryData) { return true; @@ -3252,7 +3316,7 @@ class Model extends Object implements CakeEventListener { * @param mixed $results The results of the find operation * @param boolean $primary Whether this model is being queried directly (vs. being queried as an association) * @return mixed Result of the find operation - * @link http://book.cakephp.org/view/1048/Callback-Methods#afterFind-1050 + * @link http://book.cakephp.org/2.0/en/models/callback-methods.html#afterfind */ public function afterFind($results, $primary = false) { return $results; @@ -3264,7 +3328,7 @@ class Model extends Object implements CakeEventListener { * * @param array $options * @return boolean True if the operation should continue, false if it should abort - * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeSave-1052 + * @link http://book.cakephp.org/2.0/en/models/callback-methods.html#beforesave */ public function beforeSave($options = array()) { return true; @@ -3275,7 +3339,7 @@ class Model extends Object implements CakeEventListener { * * @param boolean $created True if this save created a new record * @return void - * @link http://book.cakephp.org/view/1048/Callback-Methods#afterSave-1053 + * @link http://book.cakephp.org/2.0/en/models/callback-methods.html#aftersave */ public function afterSave($created) { } @@ -3285,7 +3349,7 @@ class Model extends Object implements CakeEventListener { * * @param boolean $cascade If true records that depend on this record will also be deleted * @return boolean True if the operation should continue, false if it should abort - * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeDelete-1054 + * @link http://book.cakephp.org/2.0/en/models/callback-methods.html#beforedelete */ public function beforeDelete($cascade = true) { return true; @@ -3295,7 +3359,7 @@ class Model extends Object implements CakeEventListener { * Called after every deletion operation. * * @return void - * @link http://book.cakephp.org/view/1048/Callback-Methods#afterDelete-1055 + * @link http://book.cakephp.org/2.0/en/models/callback-methods.html#afterdelete */ public function afterDelete() { } @@ -3306,7 +3370,7 @@ class Model extends Object implements CakeEventListener { * * @param array $options Options passed from model::save(), see $options of model::save(). * @return boolean True if validate operation should continue, false to abort - * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeValidate-1051 + * @link http://book.cakephp.org/2.0/en/models/callback-methods.html#beforevalidate */ public function beforeValidate($options = array()) { return true; @@ -3324,7 +3388,7 @@ class Model extends Object implements CakeEventListener { * Called when a DataSource-level error occurs. * * @return void - * @link http://book.cakephp.org/view/1048/Callback-Methods#onError-1056 + * @link http://book.cakephp.org/2.0/en/models/callback-methods.html#onerror */ public function onError() { } diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index 591ae6421..aa760aa65 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -80,6 +80,10 @@ class CakeResponse { * @var array */ protected $_mimeTypes = array( + 'html' => array('text/html', '*/*'), + 'json' => 'application/json', + 'xml' => array('application/xml', 'text/xml'), + 'rss' => 'application/rss+xml', 'ai' => 'application/postscript', 'bcpio' => 'application/x-bcpio', 'bin' => 'application/octet-stream', @@ -206,7 +210,6 @@ class CakeResponse { 'f90' => 'text/plain', 'h' => 'text/plain', 'hh' => 'text/plain', - 'html' => array('text/html', '*/*'), 'htm' => array('text/html', '*/*'), 'ics' => 'text/calendar', 'm' => 'text/plain', @@ -218,7 +221,6 @@ class CakeResponse { 'tpl' => 'text/template', 'txt' => 'text/plain', 'text' => 'text/plain', - 'xml' => array('application/xml', 'text/xml'), 'avi' => 'video/x-msvideo', 'fli' => 'video/x-fli', 'mov' => 'video/quicktime', @@ -261,12 +263,10 @@ class CakeResponse { 'pdb' => 'chemical/x-pdb', 'xyz' => 'chemical/x-pdb', 'javascript' => 'text/javascript', - 'json' => 'application/json', 'form' => 'application/x-www-form-urlencoded', 'file' => 'multipart/form-data', 'xhtml' => array('application/xhtml+xml', 'application/xhtml', 'text/xhtml'), 'xhtml-mobile' => 'application/vnd.wap.xhtml+xml', - 'rss' => 'application/rss+xml', 'atom' => 'application/atom+xml', 'amf' => 'application/x-amf', 'wap' => array('text/vnd.wap.wml', 'text/vnd.wap.wmlscript', 'image/vnd.wap.wbmp'), @@ -328,7 +328,7 @@ class CakeResponse { /** * Holds cookies to be sent to the client - * + * * @var array */ protected $_cookies = array(); @@ -384,7 +384,7 @@ class CakeResponse { * Sets the cookies that have been added via static method CakeResponse::addCookie() * before any other output is sent to the client. * Will set the cookies in the order they have been set. - * + * * @return void */ protected function _setCookies() { @@ -595,7 +595,7 @@ class CakeResponse { * Sets the response content type. It can be either a file extension * which will be mapped internally to a mime-type or a string representing a mime-type * if $contentType is null the current content type is returned - * if $contentType is an associative array, it will be stored as a content type definition + * if $contentType is an associative array, content type definitions will be stored/replaced * * ### Setting the content type * @@ -605,9 +605,9 @@ class CakeResponse { * * e.g `type();` * - * ### Storing a content type definition + * ### Storing content type definitions * - * e.g `type(array('keynote' => 'application/keynote'));` + * e.g `type(array('keynote' => 'application/keynote', 'bat' => 'application/bat'));` * * ### Replacing a content type definition * @@ -621,9 +621,9 @@ class CakeResponse { return $this->_contentType; } if (is_array($contentType)) { - $type = key($contentType); - $defitition = current($contentType); - $this->_mimeTypes[$type] = $defitition; + foreach ($contentType as $type => $definition) { + $this->_mimeTypes[$type] = $definition; + } return $this->_contentType; } if (isset($this->_mimeTypes[$contentType])) { @@ -800,12 +800,12 @@ class CakeResponse { /** * Sets the Cache-Control must-revalidate directive. - * must-revalidate indicates that the response should not be served - * stale by a cache under any cirumstance without first revalidating + * must-revalidate indicates that the response should not be served + * stale by a cache under any cirumstance without first revalidating * with the origin. * If called with no parameters, this function will return wheter must-revalidate is present. * - * @param int $seconds if null, the method will return the current + * @param int $seconds if null, the method will return the current * must-revalidate value * @return boolean */ @@ -886,8 +886,8 @@ class CakeResponse { } /** - * Sets the response as Not Modified by removing any body contents - * setting the status code to "304 Not Modified" and removing all + * Sets the response as Not Modified by removing any body contents + * setting the status code to "304 Not Modified" and removing all * conflicting headers * * @return void @@ -911,11 +911,11 @@ class CakeResponse { /** * Sets the Vary header for the response, if an array is passed, - * values will be imploded into a comma separated string. If no - * parameters are passed, then an array with the current Vary header + * values will be imploded into a comma separated string. If no + * parameters are passed, then an array with the current Vary header * value is returned * - * @param string|array $cacheVariances a single Vary string or a array + * @param string|array $cacheVariances a single Vary string or a array * containig the list for variances. * @return array **/ @@ -932,22 +932,22 @@ class CakeResponse { /** * Sets the response Etag, Etags are a strong indicative that a response - * can be cached by a HTTP client. A bad way of generaing Etags is - * creating a hash of the response output, instead generate a unique - * hash of the unique components that identifies a request, such as a - * modification time, a resource Id, and anything else you consider it + * can be cached by a HTTP client. A bad way of generaing Etags is + * creating a hash of the response output, instead generate a unique + * hash of the unique components that identifies a request, such as a + * modification time, a resource Id, and anything else you consider it * makes it unique. * - * Second parameter is used to instuct clients that the content has - * changed, but sematicallly, it can be used as the same thing. Think - * for instance of a page with a hit counter, two different page views - * are equivalent, but they differ by a few bytes. This leaves off to + * Second parameter is used to instuct clients that the content has + * changed, but sematicallly, it can be used as the same thing. Think + * for instance of a page with a hit counter, two different page views + * are equivalent, but they differ by a few bytes. This leaves off to * the Client the decision of using or not the cached page. * * If no parameters are passed, current Etag header is returned. * * @param string $hash the unique has that identifies this resposnse - * @param boolean $weak whether the response is semantically the same as + * @param boolean $weak whether the response is semantically the same as * other with th same hash or not * @return string **/ @@ -965,7 +965,7 @@ class CakeResponse { * Returns a DateTime object initialized at the $time param and using UTC * as timezone * - * @param string|int|DateTime $time + * @param string|int|DateTime $time * @return DateTime */ protected function _getUTCDate($time = null) { @@ -1043,16 +1043,16 @@ class CakeResponse { } /** - * Checks whether a response has not been modified according to the 'If-None-Match' - * (Etags) and 'If-Modified-Since' (last modification date) request - * headers headers. If the response is detected to be not modified, it + * Checks whether a response has not been modified according to the 'If-None-Match' + * (Etags) and 'If-Modified-Since' (last modification date) request + * headers headers. If the response is detected to be not modified, it * is marked as so accordingly so the client can be informed of that. * - * In order to mark a response as not modified, you need to set at least - * the Last-Modified response header or a response etag to be compared + * In order to mark a response as not modified, you need to set at least + * the Last-Modified response header or a response etag to be compared * with the request itself * - * @return boolean whether the response was marked as not modified or + * @return boolean whether the response was marked as not modified or * not **/ public function checkNotModified(CakeRequest $request) { @@ -1087,19 +1087,19 @@ class CakeResponse { /** * Getter/Setter for cookie configs - * + * * This method acts as a setter/getter depending on the type of the argument. * If the method is called with no arguments, it returns all configurations. - * + * * If the method is called with a string as argument, it returns either the * given configuration if it is set, or null, if it's not set. - * + * * If the method is called with an array as argument, it will set the cookie * configuration to the cookie container. - * + * * @param $options Either null to get all cookies, string for a specific cookie * or array to set cookie. - * + * * ### Options (when setting a configuration) * - name: The Cookie name * - value: Value of the cookie @@ -1108,21 +1108,21 @@ class CakeResponse { * - domain: Domain the cookie is for. * - secure: Is the cookie https? * - httpOnly: Is the cookie available in the client? - * + * * ## Examples - * + * * ### Getting all cookies - * + * * `$this->cookie()` - * + * * ### Getting a certain cookie configuration - * + * * `$this->cookie('MyCookie')` - * + * * ### Setting a cookie configuration - * + * * `$this->cookie((array) $options)` - * + * * @return mixed */ public function cookie($options = null) { diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php index 7f6257da5..acd212da1 100644 --- a/lib/Cake/Network/Email/CakeEmail.php +++ b/lib/Cake/Network/Email/CakeEmail.php @@ -1238,9 +1238,6 @@ class CakeEmail { $formatted[] = ''; continue; } - if ($line[0] === '.') { - $line = '.' . $line; - } if (!preg_match('/\<[a-z]/i', $line)) { $formatted = array_merge($formatted, explode("\n", wordwrap($line, self::LINE_LENGTH_SHOULD, "\n"))); continue; diff --git a/lib/Cake/Network/Email/SmtpTransport.php b/lib/Cake/Network/Email/SmtpTransport.php index e89b21557..636e5a31b 100644 --- a/lib/Cake/Network/Email/SmtpTransport.php +++ b/lib/Cake/Network/Email/SmtpTransport.php @@ -168,7 +168,16 @@ class SmtpTransport extends AbstractTransport { $headers = $this->_cakeEmail->getHeaders(array('from', 'sender', 'replyTo', 'readReceipt', 'returnPath', 'to', 'cc', 'subject')); $headers = $this->_headersToString($headers); - $message = implode("\r\n", $this->_cakeEmail->message()); + $lines = $this->_cakeEmail->message(); + $messages = array(); + foreach ($lines as $line) { + if ((!empty($line)) && ($line[0] === '.')) { + $messages[] = '.' . $line; + } else { + $messages[] = $line; + } + } + $message = implode("\r\n", $messages); $this->_smtpSend($headers . "\r\n\r\n" . $message . "\r\n\r\n\r\n."); $this->_content = array('headers' => $headers, 'message' => $message); } diff --git a/lib/Cake/Routing/Route/CakeRoute.php b/lib/Cake/Routing/Route/CakeRoute.php index 4744a3077..b3121de39 100644 --- a/lib/Cake/Routing/Route/CakeRoute.php +++ b/lib/Cake/Routing/Route/CakeRoute.php @@ -478,8 +478,11 @@ class CakeRoute { * @return string Composed route string. */ protected function _writeUrl($params) { - if (isset($params['prefix'], $params['action'])) { - $params['action'] = str_replace($params['prefix'] . '_', '', $params['action']); + if (isset($params['prefix'])) { + $prefixed = $params['prefix'] . '_'; + } + if (isset($prefixed, $params['action']) && strpos($params['action'], $prefixed) === 0) { + $params['action'] = substr($params['action'], strlen($prefixed) * -1); unset($params['prefix']); } diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index ee081adc2..9c2945d34 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -157,7 +157,7 @@ class Router { * * @var string */ - protected static $_routeClass = 'CakeRoute'; + protected static $_routeClass = 'CakeRoute'; /** * Set the default route class to use or return the current one @@ -893,8 +893,9 @@ class Router { list($args, $named) = array(Hash::filter($args), Hash::filter($named)); foreach (self::$_prefixes as $prefix) { - if (!empty($url[$prefix])) { - $url['action'] = str_replace($prefix . '_', '', $url['action']); + $prefixed = $prefix . '_'; + if (!empty($url[$prefix]) && strpos($url['action'], $prefixed) === 0) { + $url['action'] = substr($url['action'], strlen($prefixed) * -1); break; } } @@ -956,12 +957,19 @@ class Router { $out = ''; if (is_array($q)) { - $q = array_merge($extra, $q); + $q = array_merge($q, $extra); } else { $out = $q; $q = $extra; } - $out .= http_build_query($q, null, $join); + $addition = http_build_query($q, null, $join); + + if ($out && $addition && substr($out, strlen($join) * -1, strlen($join)) != $join) { + $out .= $join; + } + + $out .= $addition; + if (isset($out[0]) && $out[0] != '?') { $out = '?' . $out; } diff --git a/lib/Cake/Test/Case/BasicsTest.php b/lib/Cake/Test/Case/BasicsTest.php index e0280e0e9..cd00c1f43 100644 --- a/lib/Cake/Test/Case/BasicsTest.php +++ b/lib/Cake/Test/Case/BasicsTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Cache/CacheTest.php b/lib/Cake/Test/Case/Cache/CacheTest.php index 85e4ff62e..b4cb35820 100644 --- a/lib/Cake/Test/Case/Cache/CacheTest.php +++ b/lib/Cake/Test/Case/Cache/CacheTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Cache * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php index aa73ca6f3..d1e7605f3 100644 --- a/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Cache.Engine * @since CakePHP(tm) v 1.2.0.5434 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php index b3fd48d5f..a091fbd6e 100644 --- a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Cache.Engine * @since CakePHP(tm) v 1.2.0.5434 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php index 47a7f0d21..a1c2abd5b 100644 --- a/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Cache.Engine * @since CakePHP(tm) v 1.2.0.5434 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Cache/Engine/WincacheEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/WincacheEngineTest.php index ace401147..12eed5357 100644 --- a/lib/Cake/Test/Case/Cache/Engine/WincacheEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/WincacheEngineTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Cache.Engine * @since CakePHP(tm) v 1.2.0.5434 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Cache/Engine/XcacheEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/XcacheEngineTest.php index 3f4911a8e..985977e79 100644 --- a/lib/Cake/Test/Case/Cache/Engine/XcacheEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/XcacheEngineTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Cache.Engine * @since CakePHP(tm) v 1.2.0.5434 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Configure/IniReaderTest.php b/lib/Cake/Test/Case/Configure/IniReaderTest.php index 43ad3ce72..e4b463450 100644 --- a/lib/Cake/Test/Case/Configure/IniReaderTest.php +++ b/lib/Cake/Test/Case/Configure/IniReaderTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Configure * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -21,11 +21,24 @@ App::uses('IniReader', 'Configure'); class IniReaderTest extends CakeTestCase { /** - * The test file that will be read. + * Test data to serialize and unserialize. * - * @var string + * @var array */ - public $file; + public $testData = array( + 'One' => array( + 'two' => 'value', + 'three' => array( + 'four' => 'value four' + ), + 'is_null' => null, + 'bool_false' => false, + 'bool_true' => true, + ), + 'Asset' => array( + 'timestamp' => 'force' + ), + ); /** * setup @@ -92,6 +105,8 @@ class IniReaderTest extends CakeTestCase { $this->assertTrue(isset($config['database']['db']['username'])); $this->assertEquals('mark', $config['database']['db']['username']); $this->assertEquals(3, $config['nesting']['one']['two']['three']); + $this->assertFalse(isset($config['database.db.username'])); + $this->assertFalse(isset($config['database']['db.username'])); } /** @@ -125,4 +140,49 @@ class IniReaderTest extends CakeTestCase { $config = $reader->read('nested'); $this->assertTrue($config['bools']['test_on']); } + +/** + * test dump method. + * + * @return void + */ + public function testDump() { + $reader = new IniReader(TMP); + $result = $reader->dump('test.ini', $this->testData); + $this->assertTrue($result > 0); + + $expected = <<assertTextEquals($expected, $result); + } + +/** + * Test that dump() makes files read() can read. + * + * @return void + */ + public function testDumpRead() { + $reader = new IniReader(TMP); + $reader->dump('test.ini', $this->testData); + $result = $reader->read('test.ini'); + unlink(TMP . 'test.ini'); + + $expected = $this->testData; + $expected['One']['is_null'] = false; + + $this->assertEquals($expected, $result); + } + } diff --git a/lib/Cake/Test/Case/Configure/PhpReaderTest.php b/lib/Cake/Test/Case/Configure/PhpReaderTest.php index ea34d8b3e..08982cb4e 100644 --- a/lib/Cake/Test/Case/Configure/PhpReaderTest.php +++ b/lib/Cake/Test/Case/Configure/PhpReaderTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Configure * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -20,6 +20,26 @@ App::uses('PhpReader', 'Configure'); class PhpReaderTest extends CakeTestCase { +/** + * Test data to serialize and unserialize. + * + * @var array + */ + public $testData = array( + 'One' => array( + 'two' => 'value', + 'three' => array( + 'four' => 'value four' + ), + 'is_null' => null, + 'bool_false' => false, + 'bool_true' => true, + ), + 'Asset' => array( + 'timestamp' => 'force' + ), + ); + /** * setup * @@ -96,4 +116,55 @@ class PhpReaderTest extends CakeTestCase { $this->assertTrue(isset($result['plugin_load'])); CakePlugin::unload(); } + +/** + * Test dumping data to PHP format. + * + * @return void + */ + public function testDump() { + $reader = new PhpReader(TMP); + $result = $reader->dump('test.php', $this->testData); + $this->assertTrue($result > 0); + $expected = << + array ( + 'two' => 'value', + 'three' => + array ( + 'four' => 'value four', + ), + 'is_null' => NULL, + 'bool_false' => false, + 'bool_true' => true, + ), + 'Asset' => + array ( + 'timestamp' => 'force', + ), +); +PHP; + $file = TMP . 'test.php'; + $contents = file_get_contents($file); + + unlink($file); + $this->assertTextEquals($expected, $contents); + } + +/** + * Test that dump() makes files read() can read. + * + * @return void + */ + public function testDumpRead() { + $reader = new PhpReader(TMP); + $reader->dump('test.php', $this->testData); + $result = $reader->read('test.php'); + unlink(TMP . 'test.php'); + + $this->assertEquals($this->testData, $result); + } + } diff --git a/lib/Cake/Test/Case/Console/AllConsoleLibsTest.php b/lib/Cake/Test/Case/Console/AllConsoleLibsTest.php index 4d13c5df1..5a6846b9e 100644 --- a/lib/Cake/Test/Case/Console/AllConsoleLibsTest.php +++ b/lib/Cake/Test/Case/Console/AllConsoleLibsTest.php @@ -38,7 +38,10 @@ class AllConsoleLibsTest extends PHPUnit_Framework_TestSuite { if (!$file->isFile() || strpos($file, 'All') === 0) { continue; } - $suite->addTestFile($file->getRealPath()); + $fileName = $file->getRealPath(); + if (substr($fileName, -4) === '.php') { + $suite->addTestFile($file->getRealPath()); + } } return $suite; } diff --git a/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php index ad4589360..d2df394bb 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php @@ -107,15 +107,15 @@ class TemplateTaskTest extends CakeTestCase { $result = $this->Task->getThemePath(); $this->assertEquals($defaultTheme, $result); - $this->Task->templatePaths = array('default' => $defaultTheme, 'other' => '/some/path'); + $this->Task->templatePaths = array('other' => '/some/path', 'default' => $defaultTheme); $this->Task->params['theme'] = 'other'; $result = $this->Task->getThemePath(); $this->assertEquals('/some/path', $result); $this->Task->params = array(); $result = $this->Task->getThemePath(); - $this->assertEquals($defaultTheme, $result); - $this->assertEquals('default', $this->Task->params['theme']); + $this->assertEquals('/some/path', $result); + $this->assertEquals('other', $this->Task->params['theme']); } /** @@ -134,7 +134,7 @@ class TemplateTaskTest extends CakeTestCase { $result = $this->Task->generate('classes', 'test_object', array('test' => 'foo')); $expected = "I got rendered\nfoo"; - $this->assertEquals($expected, $result); + $this->assertTextEquals($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php index 37f854b2e..bc5877a49 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php @@ -487,21 +487,83 @@ class TestTaskTest extends CakeTestCase { $this->assertContains("'app.articles_tag'", $result); } +/** + * test baking component test files, + * + * @return void + */ + public function testBakeComponentTest() { + $this->Task->expects($this->once())->method('createFile')->will($this->returnValue(true)); + + $result = $this->Task->bake('Component', 'Example'); + + $this->assertContains("App::uses('ExampleComponent', 'Controller/Component')", $result); + $this->assertContains('class ExampleComponentTest extends CakeTestCase', $result); + + $this->assertContains('function setUp()', $result); + $this->assertContains("\$Collection = new ComponentCollection()", $result); + $this->assertContains("\$this->Example = new ExampleComponent(\$Collection)", $result); + + $this->assertContains('function tearDown()', $result); + $this->assertContains('unset($this->Example)', $result); + } + +/** + * test baking behavior test files, + * + * @return void + */ + public function testBakeBehaviorTest() { + $this->Task->expects($this->once())->method('createFile')->will($this->returnValue(true)); + + $result = $this->Task->bake('Behavior', 'Example'); + + $this->assertContains("App::uses('ExampleBehavior', 'Model/Behavior')", $result); + $this->assertContains('class ExampleBehaviorTest extends CakeTestCase', $result); + + $this->assertContains('function setUp()', $result); + $this->assertContains("\$this->Example = new ExampleBehavior()", $result); + + $this->assertContains('function tearDown()', $result); + $this->assertContains('unset($this->Example)', $result); + } + +/** + * test baking helper test files, + * + * @return void + */ + public function testBakeHelperTest() { + $this->Task->expects($this->once())->method('createFile')->will($this->returnValue(true)); + + $result = $this->Task->bake('Helper', 'Example'); + + $this->assertContains("App::uses('ExampleHelper', 'View/Helper')", $result); + $this->assertContains('class ExampleHelperTest extends CakeTestCase', $result); + + $this->assertContains('function setUp()', $result); + $this->assertContains("\$View = new View()", $result); + $this->assertContains("\$this->Example = new ExampleHelper(\$View)", $result); + + $this->assertContains('function tearDown()', $result); + $this->assertContains('unset($this->Example)', $result); + } + /** * test Constructor generation ensure that constructClasses is called for controllers * * @return void */ public function testGenerateConstructor() { - $result = $this->Task->generateConstructor('controller', 'PostsController'); + $result = $this->Task->generateConstructor('controller', 'PostsController', null); $expected = array('', "new TestPostsController();\n", "\$this->Posts->constructClasses();\n"); $this->assertEquals($expected, $result); - $result = $this->Task->generateConstructor('model', 'Post'); + $result = $this->Task->generateConstructor('model', 'Post', null); $expected = array('', "ClassRegistry::init('Post');\n", ''); $this->assertEquals($expected, $result); - $result = $this->Task->generateConstructor('helper', 'FormHelper'); + $result = $this->Task->generateConstructor('helper', 'FormHelper', null); $expected = array("\$View = new View();\n", "new FormHelper(\$View);\n", ''); $this->assertEquals($expected, $result); } diff --git a/lib/Cake/Test/Case/Console/ConsoleOptionParserTest.php b/lib/Cake/Test/Case/Console/ConsoleOptionParserTest.php index ba2310c42..0677b09c4 100644 --- a/lib/Cake/Test/Case/Console/ConsoleOptionParserTest.php +++ b/lib/Cake/Test/Case/Console/ConsoleOptionParserTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Console * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Console/ConsoleOutputTest.php b/lib/Cake/Test/Case/Console/ConsoleOutputTest.php index 6baef3dbd..a9cd0564c 100644 --- a/lib/Cake/Test/Case/Console/ConsoleOutputTest.php +++ b/lib/Cake/Test/Case/Console/ConsoleOutputTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Console * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Console/HelpFormatterTest.php b/lib/Cake/Test/Case/Console/HelpFormatterTest.php index 71fd6c468..7af5c1e83 100644 --- a/lib/Cake/Test/Case/Console/HelpFormatterTest.php +++ b/lib/Cake/Test/Case/Console/HelpFormatterTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Console * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php index 1b3adfabd..f7705c47a 100644 --- a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php +++ b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Console * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -437,7 +437,7 @@ class ShellDispatcherTest extends CakeTestCase { */ public function testDispatchShellWithMain() { $Dispatcher = new TestShellDispatcher(); - $Mock = $this->getMock('Shell', array(), array(&$Dispatcher), 'MockWithMainShell'); + $Mock = $this->getMock('Shell', array(), array(), 'MockWithMainShell'); $Mock->expects($this->once())->method('initialize'); $Mock->expects($this->once())->method('loadTasks'); @@ -460,9 +460,9 @@ class ShellDispatcherTest extends CakeTestCase { */ public function testDispatchShellWithoutMain() { $Dispatcher = new TestShellDispatcher(); - $Shell = $this->getMock('Shell', array(), array(&$Dispatcher), 'MockWithoutMainShell'); + $Shell = $this->getMock('Shell', array(), array(), 'MockWithoutMainShell'); - $Shell = new MockWithoutMainShell($Dispatcher); + $Shell = new MockWithoutMainShell(); $this->mockObjects[] = $Shell; $Shell->expects($this->once())->method('initialize'); diff --git a/lib/Cake/Test/Case/Console/TaskCollectionTest.php b/lib/Cake/Test/Case/Console/TaskCollectionTest.php index a681b490b..9317e7711 100644 --- a/lib/Cake/Test/Case/Console/TaskCollectionTest.php +++ b/lib/Cake/Test/Case/Console/TaskCollectionTest.php @@ -11,7 +11,7 @@ * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Console * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php index 4e0ca4171..44fd6e318 100644 --- a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php @@ -349,14 +349,14 @@ class DbAclTest extends CakeTestCase { * @return void */ public function testCheckMissingPermission() { - $this->Acl->check('users', 'NonExistant', 'read'); + $this->Acl->check('users', 'NonExistent', 'read'); } /** * testDbAclCascadingDeny function * * Setup the acl permissions such that Bobs inherits from admin. - * deny Admin delete access to a specific resource, check the permisssions are inherited. + * deny Admin delete access to a specific resource, check the permissions are inherited. * * @return void */ @@ -483,7 +483,7 @@ class DbAclTest extends CakeTestCase { /** * debug function - to help editing/creating test cases for the ACL component * - * To check the overal ACL status at any time call $this->__debug(); + * To check the overall ACL status at any time call $this->__debug(); * Generates a list of the current aro and aco structures and a grid dump of the permissions that are defined * Only designed to work with the db based ACL * diff --git a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php index 7261a8222..b16d7af71 100644 --- a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller.Component * @since CakePHP(tm) v 1.2.0.5435 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index e2d1fcb84..7fa504de0 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller.Component * @since CakePHP(tm) v 1.2.0.5347 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php index 87c5bd7d6..80065a7f4 100644 --- a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller.Component * @since CakePHP(tm) v 1.2.0.5435 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php index 80abc7fb0..4e8183315 100644 --- a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller.Component * @since CakePHP(tm) v 1.2.0.5347 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php index 1811a4c3b..2da48c869 100644 --- a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller.Component * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index 69931710c..fb6c431e6 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller.Component * @since CakePHP(tm) v 1.2.0.5435 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php b/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php index c97626df5..364bcb039 100644 --- a/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/SecurityComponentTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller.Component * @since CakePHP(tm) v 1.2.0.5435 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php b/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php index ffcf78a05..0920186c5 100644 --- a/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller.Component * @since CakePHP(tm) v 1.2.0.5436 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php b/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php index 87cc1d833..11f5e6acd 100644 --- a/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php +++ b/lib/Cake/Test/Case/Controller/ComponentCollectionTest.php @@ -11,7 +11,7 @@ * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/ComponentTest.php b/lib/Cake/Test/Case/Controller/ComponentTest.php index 3504013fe..499fe4ac2 100644 --- a/lib/Cake/Test/Case/Controller/ComponentTest.php +++ b/lib/Cake/Test/Case/Controller/ComponentTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller * @since CakePHP(tm) v 1.2.0.5436 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php b/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php index df96b2bee..93a5cecac 100644 --- a/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller * @since CakePHP(tm) v 1.2.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/ControllerTest.php b/lib/Cake/Test/Case/Controller/ControllerTest.php index 83b791ccb..33bc9678b 100644 --- a/lib/Cake/Test/Case/Controller/ControllerTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerTest.php @@ -728,7 +728,8 @@ class ControllerTest extends CakeTestCase { array(303, "See Other"), array(304, "Not Modified"), array(305, "Use Proxy"), - array(307, "Temporary Redirect") + array(307, "Temporary Redirect"), + array(403, "Forbidden"), ); } diff --git a/lib/Cake/Test/Case/Controller/PagesControllerTest.php b/lib/Cake/Test/Case/Controller/PagesControllerTest.php index 829a940d9..614edea91 100644 --- a/lib/Cake/Test/Case/Controller/PagesControllerTest.php +++ b/lib/Cake/Test/Case/Controller/PagesControllerTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller * @since CakePHP(tm) v 1.2.0.5436 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php index cd5ac89cb..14fe18264 100644 --- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php +++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller * @since CakePHP(tm) v 1.2.0.5436 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Core/ConfigureTest.php b/lib/Cake/Test/Case/Core/ConfigureTest.php index 2d222b311..7351f83f1 100644 --- a/lib/Cake/Test/Case/Core/ConfigureTest.php +++ b/lib/Cake/Test/Case/Core/ConfigureTest.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Core * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -362,4 +362,47 @@ class ConfigureTest extends CakeTestCase { $this->assertNull(Configure::read('debug')); $this->assertNull(Configure::read('test')); } + +/** + * @expectedException ConfigureException + */ + public function testDumpNoAdapter() { + Configure::dump(TMP . 'test.php', 'does_not_exist'); + } + +/** + * test dump integrated with the PhpReader. + * + * @return void + */ + public function testDump() { + Configure::config('test_reader', new PhpReader(TMP)); + + $result = Configure::dump('config_test.php', 'test_reader'); + $this->assertTrue($result > 0); + $result = file_get_contents(TMP . 'config_test.php'); + $this->assertContains('assertContains('$config = ', $result); + @unlink(TMP . 'config_test.php'); + } + +/** + * Test dumping only some of the data. + * + * @return + */ + public function testDumpPartial() { + Configure::config('test_reader', new PhpReader(TMP)); + + $result = Configure::dump('config_test.php', 'test_reader', array('Error')); + $this->assertTrue($result > 0); + $result = file_get_contents(TMP . 'config_test.php'); + $this->assertContains('assertContains('$config = ', $result); + $this->assertContains('Error', $result); + $this->assertNotContains('debug', $result); + + @unlink(TMP . 'config_test.php'); + } + } diff --git a/lib/Cake/Test/Case/Core/ObjectTest.php b/lib/Cake/Test/Case/Core/ObjectTest.php index e2e5d8cc2..222a231a7 100644 --- a/lib/Cake/Test/Case/Core/ObjectTest.php +++ b/lib/Cake/Test/Case/Core/ObjectTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Core * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Error/ErrorHandlerTest.php b/lib/Cake/Test/Case/Error/ErrorHandlerTest.php index 96c62d72b..9b4500e6d 100644 --- a/lib/Cake/Test/Case/Error/ErrorHandlerTest.php +++ b/lib/Cake/Test/Case/Error/ErrorHandlerTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Error * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php index 103b33322..4e236aefe 100644 --- a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php +++ b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Error * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -639,7 +639,7 @@ class ExceptionRendererTest extends CakeTestCase { ->with('missingHelper') ->will($this->throwException($exception)); - $ExceptionRenderer->controller->expects($this->at(4)) + $ExceptionRenderer->controller->expects($this->at(5)) ->method('render') ->with('error500') ->will($this->returnValue(true)); @@ -671,7 +671,7 @@ class ExceptionRendererTest extends CakeTestCase { ->with('error400') ->will($this->throwException($exception)); - $ExceptionRenderer->controller->expects($this->at(3)) + $ExceptionRenderer->controller->expects($this->at(4)) ->method('render') ->with('error500') ->will($this->returnValue(true)); diff --git a/lib/Cake/Test/Case/I18n/I18nTest.php b/lib/Cake/Test/Case/I18n/I18nTest.php index 3f6dff13d..e86628bb4 100644 --- a/lib/Cake/Test/Case/I18n/I18nTest.php +++ b/lib/Cake/Test/Case/I18n/I18nTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.I18n * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/I18n/L10nTest.php b/lib/Cake/Test/Case/I18n/L10nTest.php index c79ee2831..d52c3a60d 100644 --- a/lib/Cake/Test/Case/I18n/L10nTest.php +++ b/lib/Cake/Test/Case/I18n/L10nTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.I18n * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/I18n/MultibyteTest.php b/lib/Cake/Test/Case/I18n/MultibyteTest.php index d2bbe1664..927b84405 100644 --- a/lib/Cake/Test/Case/I18n/MultibyteTest.php +++ b/lib/Cake/Test/Case/I18n/MultibyteTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.I18n * @since CakePHP(tm) v 1.2.0.6833 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Log/CakeLogTest.php b/lib/Cake/Test/Case/Log/CakeLogTest.php index 89e3e3e86..a24731a01 100644 --- a/lib/Cake/Test/Case/Log/CakeLogTest.php +++ b/lib/Cake/Test/Case/Log/CakeLogTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Log * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Log/Engine/FileLogTest.php b/lib/Cake/Test/Case/Log/Engine/FileLogTest.php index 2dc3153bf..b4c13c8a8 100644 --- a/lib/Cake/Test/Case/Log/Engine/FileLogTest.php +++ b/lib/Cake/Test/Case/Log/Engine/FileLogTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Log.Engine * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/AclNodeTest.php b/lib/Cake/Test/Case/Model/AclNodeTest.php index 605e9a0c5..4e0fb4263 100644 --- a/lib/Cake/Test/Case/Model/AclNodeTest.php +++ b/lib/Cake/Test/Case/Model/AclNodeTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php index 360094fa8..8345c87d6 100644 --- a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Behavior * @since CakePHP(tm) v 1.2.0.5669 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php index d280f7fac..b4a8c4fa5 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php @@ -4,21 +4,18 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Behavior * @since CakePHP(tm) v 1.2.0.5669 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { - define('CAKEPHP_UNIT_TEST_EXECUTION', 1); -} App::uses('Model', 'Model'); App::uses('AppModel', 'Model'); @@ -110,7 +107,11 @@ class TranslateBehaviorTest extends CakeTestCase { $TestModel->locale = false; $result = $TestModel->read(null, 1); - $expected = array('TranslatedItem' => array('id' => 1, 'slug' => 'first_translated')); + $expected = array('TranslatedItem' => array( + 'id' => 1, + 'slug' => 'first_translated', + 'translated_article_id' => 1, + )); $this->assertEquals($expected, $result); $result = $TestModel->find('all', array('fields' => array('slug'))); @@ -138,7 +139,7 @@ class TranslateBehaviorTest extends CakeTestCase { $result = $TestModel->read(null, 1); $expected = array( - 'TranslatedItem' => array('id' => 1, 'slug' => 'first_translated'), + 'TranslatedItem' => array('id' => 1, 'slug' => 'first_translated', 'translated_article_id' => 1), 'Title' => array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title #1'), array('id' => 3, 'locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Titel #1'), @@ -194,7 +195,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ) ); $this->assertEquals($expected, $result); @@ -207,7 +209,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ) ), array( @@ -216,7 +219,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'second_translated', 'locale' => 'eng', 'title' => 'Title #2', - 'content' => 'Content #2' + 'content' => 'Content #2', + 'translated_article_id' => 1, ) ), array( @@ -225,7 +229,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'third_translated', 'locale' => 'eng', 'title' => 'Title #3', - 'content' => 'Content #3' + 'content' => 'Content #3', + 'translated_article_id' => 1, ) ) ); @@ -250,7 +255,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ) ) ); @@ -264,7 +270,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ) ) ); @@ -292,7 +299,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Title #1', - 'content' => 'Content #1' + 'content' => 'Content #1', + 'translated_article_id' => 1, ), 'Title' => array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title #1'), @@ -313,17 +321,35 @@ class TranslateBehaviorTest extends CakeTestCase { $result = $TestModel->find('all', array('fields' => array('TranslatedItem.title'))); $expected = array( array( - 'TranslatedItem' => array('id' => 1, 'locale' => 'eng', 'title' => 'Title #1', 'slug' => 'first_translated'), + 'TranslatedItem' => array( + 'id' => 1, + 'locale' => 'eng', + 'title' => 'Title #1', + 'slug' => 'first_translated', + 'translated_article_id' => 1, + ), 'Title' => array(array('foreign_key' => 1, 'content' => 'Title #1')), 'Content' => array(array('foreign_key' => 1, 'content' => 'Content #1')) ), array( - 'TranslatedItem' => array('id' => 2, 'locale' => 'eng', 'title' => 'Title #2', 'slug' => 'second_translated'), + 'TranslatedItem' => array( + 'id' => 2, + 'locale' => 'eng', + 'title' => 'Title #2', + 'slug' => 'second_translated', + 'translated_article_id' => 1, + ), 'Title' => array(array('foreign_key' => 2, 'content' => 'Title #2')), 'Content' => array(array('foreign_key' => 2, 'content' => 'Content #2')) ), array( - 'TranslatedItem' => array('id' => 3, 'locale' => 'eng', 'title' => 'Title #3','slug' => 'third_translated'), + 'TranslatedItem' => array( + 'id' => 3, + 'locale' => 'eng', + 'title' => 'Title #3', + 'slug' => 'third_translated', + 'translated_article_id' => 1, + ), 'Title' => array(array('foreign_key' => 3, 'content' => 'Title #3')), 'Content' => array(array('foreign_key' => 3, 'content' => 'Content #3')) ) @@ -349,7 +375,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'deu', 'title' => 'Titel #1', - 'content' => 'Inhalt #1' + 'content' => 'Inhalt #1', + 'translated_article_id' => 1, ) ); $this->assertEquals($expected, $result); @@ -361,7 +388,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'deu', 'content' => 'Inhalt #1', - 'title' => 'Titel #1' + 'title' => 'Titel #1', ) ), array( @@ -369,7 +396,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'second_translated', 'locale' => 'deu', 'title' => 'Titel #2', - 'content' => 'Inhalt #2' + 'content' => 'Inhalt #2', ) ), array( @@ -377,7 +404,7 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'third_translated', 'locale' => 'deu', 'title' => 'Titel #3', - 'content' => 'Inhalt #3' + 'content' => 'Inhalt #3', ) ) ); @@ -406,7 +433,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'rus', 'title' => '', - 'content' => '' + 'content' => '', + 'translated_article_id' => 1, ) ); $this->assertEquals($expected, $result); @@ -490,7 +518,12 @@ class TranslateBehaviorTest extends CakeTestCase { $TestModel = new TranslatedItem(); $TestModel->locale = 'spa'; - $data = array('slug' => 'fourth_translated', 'title' => 'Leyenda #4', 'content' => 'Contenido #4'); + $data = array( + 'slug' => 'fourth_translated', + 'title' => 'Leyenda #4', + 'content' => 'Contenido #4', + 'translated_article_id' => 1, + ); $TestModel->create($data); $TestModel->save(); $result = $TestModel->read(); @@ -508,7 +541,7 @@ class TranslateBehaviorTest extends CakeTestCase { $TestModel = new TranslatedItem(); $TestModel->locale = 'spa'; - $oldData = array('slug' => 'fourth_translated', 'title' => 'Leyenda #4'); + $oldData = array('slug' => 'fourth_translated', 'title' => 'Leyenda #4', 'translated_article_id' => 1); $TestModel->create($oldData); $TestModel->save(); $id = $TestModel->id; @@ -545,7 +578,14 @@ class TranslateBehaviorTest extends CakeTestCase { $result = $TestModel->read(); $expected = array( - 'TranslatedItem' => array('id' => 4, 'slug' => 'new_translated', 'locale' => 'eng', 'title' => 'New title', 'content' => 'New content'), + 'TranslatedItem' => array( + 'id' => 4, + 'slug' => 'new_translated', + 'locale' => 'eng', + 'title' => 'New title', + 'content' => 'New content', + 'translated_article_id' => null, + ), 'Title' => array( array('id' => 21, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 4, 'field' => 'title', 'content' => 'New title'), array('id' => 22, 'locale' => 'spa', 'model' => 'TranslatedItem', 'foreign_key' => 4, 'field' => 'title', 'content' => 'Nuevo leyenda') @@ -582,7 +622,14 @@ class TranslateBehaviorTest extends CakeTestCase { $TestModel->bindTranslation($translations, false); $result = $TestModel->read(null, 1); $expected = array( - 'TranslatedItem' => array('id' => '1', 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'New Title #1', 'content' => 'New Content #1'), + 'TranslatedItem' => array( + 'id' => '1', + 'slug' => 'first_translated', + 'locale' => 'eng', + 'title' => 'New Title #1', + 'content' => 'New Content #1', + 'translated_article_id' => 1, + ), 'Title' => array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'New Title #1'), array('id' => 3, 'locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Neue Titel #1'), @@ -625,7 +672,14 @@ class TranslateBehaviorTest extends CakeTestCase { $result['Title'] = Hash::sort($result['Title'], '{n}.id', 'asc'); $result['Content'] = Hash::sort($result['Content'], '{n}.id', 'asc'); $expected = array( - 'TranslatedItem' => array('id' => 1, 'slug' => 'first_translated', 'locale' => 'cze', 'title' => 'Titulek #1', 'content' => 'Upraveny obsah #1'), + 'TranslatedItem' => array( + 'id' => 1, + 'slug' => 'first_translated', + 'locale' => 'cze', + 'title' => 'Titulek #1', + 'content' => 'Upraveny obsah #1', + 'translated_article_id' => 1, + ), 'Title' => array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Updated Title #1'), array('id' => 3, 'locale' => 'deu', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Titel #1'), @@ -641,6 +695,49 @@ class TranslateBehaviorTest extends CakeTestCase { $this->assertEquals($expected, $result); } +/** + * Test that saveAll() works with hasMany associations that contain + * translations. + * + * @return void + */ + public function testSaveAllTranslatedAssociations() { + $this->loadFixtures('Translate', 'TranslateArticle', 'TranslatedItem', 'TranslatedArticle', 'User'); + $Model = new TranslatedArticle(); + $Model->locale = 'eng'; + + $data = array( + 'TranslatedArticle' => array( + 'id' => 4, + 'user_id' => 1, + 'published' => 'Y', + 'title' => 'Title (eng) #1', + 'body' => 'Body (eng) #1' + ), + 'TranslatedItem' => array( + array( + 'slug' => '', + 'title' => 'Nuevo leyenda #1', + 'content' => 'Upraveny obsah #1' + ), + array( + 'slug' => '', + 'title' => 'New Title #2', + 'content' => 'New Content #2' + ), + ) + ); + $result = $Model->saveAll($data); + $this->assertTrue($result); + + $result = $Model->TranslatedItem->find('all', array( + 'conditions' => array('translated_article_id' => $Model->id) + )); + $this->assertCount(2, $result); + $this->assertEquals($data['TranslatedItem'][0]['title'], $result[0]['TranslatedItem']['title']); + $this->assertEquals($data['TranslatedItem'][1]['title'], $result[1]['TranslatedItem']['title']); + } + /** * testValidation method * @@ -652,11 +749,13 @@ class TranslateBehaviorTest extends CakeTestCase { $TestModel = new TranslatedItem(); $TestModel->locale = 'eng'; $TestModel->validate['title'] = '/Only this title/'; - $data = array('TranslatedItem' => array( - 'id' => 1, - 'title' => array('eng' => 'New Title #1', 'deu' => 'Neue Titel #1', 'cze' => 'Novy Titulek #1'), - 'content' => array('eng' => 'New Content #1', 'deu' => 'Neue Inhalt #1', 'cze' => 'Novy Obsah #1') - )); + $data = array( + 'TranslatedItem' => array( + 'id' => 1, + 'title' => array('eng' => 'New Title #1', 'deu' => 'Neue Titel #1', 'cze' => 'Novy Titulek #1'), + 'content' => array('eng' => 'New Content #1', 'deu' => 'Neue Inhalt #1', 'cze' => 'Novy Obsah #1') + ) + ); $TestModel->create(); $this->assertFalse($TestModel->save($data)); $this->assertEquals(array('This field cannot be left blank'), $TestModel->validationErrors['title']); @@ -739,7 +838,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'eng', 'title' => 'Another Title #1', - 'content' => 'Another Content #1' + 'content' => 'Another Content #1', + 'translated_article_id' => 1, ) ); $this->assertEquals($expected, $result); @@ -751,7 +851,7 @@ class TranslateBehaviorTest extends CakeTestCase { * @return void */ public function testTranslateWithAssociations() { - $this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User', 'Comment', 'ArticlesTag', 'Tag'); + $this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'TranslatedItem', 'User', 'Comment', 'ArticlesTag', 'Tag'); $TestModel = new TranslatedArticle(); $TestModel->locale = 'eng'; @@ -775,6 +875,23 @@ class TranslateBehaviorTest extends CakeTestCase { 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31' + ), + 'TranslatedItem' => array( + array( + 'id' => 1, + 'translated_article_id' => 1, + 'slug' => 'first_translated' + ), + array( + 'id' => 2, + 'translated_article_id' => 1, + 'slug' => 'second_translated' + ), + array( + 'id' => 3, + 'translated_article_id' => 1, + 'slug' => 'third_translated' + ), ) ); $this->assertEquals($expected, $result); @@ -854,7 +971,8 @@ class TranslateBehaviorTest extends CakeTestCase { 'slug' => 'first_translated', 'locale' => 'eng', 'content' => 'Content #1', - 'title' => 'Title #1' + 'title' => 'Title #1', + 'translated_article_id' => 1, )); $this->assertEquals($expected, $result); } diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php index 86077a92c..4e8ae4c85 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Behavior * @since CakePHP(tm) v 1.2.0.5330 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php index ab78edf9e..17552f40d 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Behavior * @since CakePHP(tm) v 1.2.0.5330 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php index bb0d1704a..b9e829758 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Behavior * @since CakePHP(tm) v 1.2.0.5330 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php index 64d5c61cf..a69445ef9 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Behavior * @since CakePHP(tm) v 1.2.0.5330 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php index a6a640417..07265f5c5 100644 --- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php +++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php @@ -5,14 +5,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php index 3bb1bc0c3..a35d06b20 100644 --- a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php +++ b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php @@ -10,7 +10,7 @@ * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php index b31539fe3..70a180235 100644 --- a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Datasource * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/Datasource/DataSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DataSourceTest.php index b347e0032..3bb9bd0d7 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DataSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DataSourceTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Datasource * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index e0d4a1b93..7e8defc37 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -3586,10 +3586,10 @@ class MysqlTest extends CakeTestCase { * @return void */ public function testNestedTransaction() { - $nested = $this->Dbo->nestedTransaction; - $this->Dbo->nestedTransaction = true; - if ($this->Dbo->supportNestedTransaction() === false) { - $this->Dbo->nestedTransaction = $nested; + $nested = $this->Dbo->useNestedTransactions; + $this->Dbo->useNestedTransactions = true; + if ($this->Dbo->nestedTransactionSupported() === false) { + $this->Dbo->useNestedTransactions = $nested; $this->skipIf(true, 'The MySQL server do not support nested transaction'); } @@ -3617,7 +3617,7 @@ class MysqlTest extends CakeTestCase { $this->assertTrue($this->Dbo->rollback()); $this->assertNotEmpty($model->read(null, 1)); - $this->Dbo->nestedTransaction = $nested; + $this->Dbo->useNestedTransactions = $nested; } } diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index eb249e4d3..e7612614f 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -915,7 +915,7 @@ class PostgresTest extends CakeTestCase { * @return void */ public function testNestedTransaction() { - $this->skipIf($this->Dbo->supportNestedTransaction() === false, 'The Postgres server do not support nested transaction'); + $this->skipIf($this->Dbo->nestedTransactionSupported() === false, 'The Postgres server do not support nested transaction'); $this->loadFixtures('Article'); $model = new Article(); diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php index a5a82cae1..f590cc7a0 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php @@ -389,7 +389,7 @@ class SqliteTest extends CakeTestCase { * @return void */ public function testNestedTransaction() { - $this->skipIf($this->Dbo->supportNestedTransaction() === false, 'The Sqlite version do not support nested transaction'); + $this->skipIf($this->Dbo->nestedTransactionSupported() === false, 'The Sqlite version do not support nested transaction'); $this->loadFixtures('User'); $model = new User(); diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index 16952bb57..c74f037df 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Datasource * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -53,8 +53,8 @@ class DboTestSource extends DboSource { $this->_connection = $conn; } - public function supportNestedTransaction() { - return $this->nestedTransaction && $this->nestedSupport; + public function nestedTransactionSupported() { + return $this->useNestedTransactions && $this->nestedSupport; } } @@ -849,7 +849,7 @@ class DboSourceTest extends CakeTestCase { $conn = $this->getMock('MockPDO'); $db = new DboTestSource(); $db->setConnection($conn); - $db->nestedTransaction = true; + $db->useNestedTransactions = true; $db->nestedSupport = true; $conn->expects($this->at(0))->method('beginTransaction')->will($this->returnValue(true)); @@ -871,7 +871,7 @@ class DboSourceTest extends CakeTestCase { $conn = $this->getMock('MockPDO'); $db = new DboTestSource(); $db->setConnection($conn); - $db->nestedTransaction = true; + $db->useNestedTransactions = true; $db->nestedSupport = false; $conn->expects($this->once())->method('beginTransaction')->will($this->returnValue(true)); @@ -890,7 +890,7 @@ class DboSourceTest extends CakeTestCase { $conn = $this->getMock('MockPDO'); $db = new DboTestSource(); $db->setConnection($conn); - $db->nestedTransaction = false; + $db->useNestedTransactions = false; $db->nestedSupport = true; $conn->expects($this->once())->method('beginTransaction')->will($this->returnValue(true)); diff --git a/lib/Cake/Test/Case/Model/Datasource/Session/CacheSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/Session/CacheSessionTest.php index 5fa971230..d696d7cd8 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Session/CacheSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Session/CacheSessionTest.php @@ -4,7 +4,7 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License diff --git a/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php index b52dabe80..3276ae864 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php @@ -4,7 +4,7 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License diff --git a/lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php b/lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php index 0bf7ecd06..57f1bc3de 100644 --- a/lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php +++ b/lib/Cake/Test/Case/Model/ModelCrossSchemaHabtmTest.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 2.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/ModelDeleteTest.php b/lib/Cake/Test/Case/Model/ModelDeleteTest.php index 37e7c8695..329eef387 100644 --- a/lib/Cake/Test/Case/Model/ModelDeleteTest.php +++ b/lib/Cake/Test/Case/Model/ModelDeleteTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php index f574821a6..a7063c0fd 100644 --- a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php +++ b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/ModelReadTest.php b/lib/Cake/Test/Case/Model/ModelReadTest.php index 6d1ebf12a..5c9bf482e 100644 --- a/lib/Cake/Test/Case/Model/ModelReadTest.php +++ b/lib/Cake/Test/Case/Model/ModelReadTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/ModelTestBase.php b/lib/Cake/Test/Case/Model/ModelTestBase.php index 8e563c209..80be40954 100644 --- a/lib/Cake/Test/Case/Model/ModelTestBase.php +++ b/lib/Cake/Test/Case/Model/ModelTestBase.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Model/ModelValidationTest.php b/lib/Cake/Test/Case/Model/ModelValidationTest.php index 2fe7780f8..021efff8e 100644 --- a/lib/Cake/Test/Case/Model/ModelValidationTest.php +++ b/lib/Cake/Test/Case/Model/ModelValidationTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -316,12 +316,16 @@ class ModelValidationTest extends BaseModelTest { $data = array('TestValidate' => array('modified' => '')); $result = $TestModel->create($data); $this->assertEquals($data, $result); + $result = $TestModel->validates(); + $this->assertFalse($result); $data = array('TestValidate' => array( 'modified' => '2007-05-01' )); $result = $TestModel->create($data); $this->assertEquals($data, $result); + $result = $TestModel->validates(); + $this->assertTrue($result); $TestModel->validate['slug'] = array('allowEmpty' => false, 'rule' => array('maxLength', 45)); @@ -1895,4 +1899,84 @@ class ModelValidationTest extends BaseModelTest { $TestModel->validates(); } +/** + * Tests that altering data in a beforeValidate callback will lead to saving those + * values in database + * + * @return void + */ + public function testValidateFirstWithBeforeValidate() { + $this->loadFixtures('Article', 'User'); + $model = new CustomArticle(); + $model->validate = array( + 'title' => array( + 'notempty' => array( + 'rule' => 'notEmpty', + 'required' => true, + 'allowEmpty' => false + ) + ) + ); + $data = array( + 'CustomArticle' => array( + 'body' => 'foo0' + ) + ); + $result = $model->saveAll($data, array('validate' => 'first')); + $this->assertTrue($result); + + $title = $model->field('title', array('body' => 'foo0')); + $this->assertEquals('foo', $title); + + $data = array( + array('body' => 'foo1'), + array('body' => 'foo2'), + array('body' => 'foo3') + ); + + $result = $model->saveAll($data, array('validate' => 'first')); + $this->assertTrue($result); + + $this->assertEquals('foo', $model->field('title', array('body' => 'foo1'))); + $this->assertEquals('foo', $model->field('title', array('body' => 'foo2'))); + $this->assertEquals('foo', $model->field('title', array('body' => 'foo3'))); + } + +/** + * Tests that altering data in a beforeValidate callback will lead to saving those + * values in database + * + * @return void + */ + public function testValidateAssociatedWithBeforeValidate() { + $this->loadFixtures('Article', 'User'); + $model = new CustomArticle(); + $model->validate = array( + 'title' => array( + 'notempty' => array( + 'rule' => 'notEmpty', + 'required' => true + ) + ) + ); + $articles = array( + array('body' => 'foo1'), + array('body' => 'foo2'), + array('body' => 'foo3') + ); + $user = new User(); + $user->hasMany['CustomArticle'] = array('foreignKey' => 'user_id'); + $data = array( + 'User' => array('user' => 'foo', 'password' => 'bar'), + 'CustomArticle' => $articles + ); + $result = $user->saveAll($data, array('validate' => 'first')); + $this->assertTrue($result); + + $this->assertEquals('foo', $model->field('title', array('body' => 'foo1'))); + $this->assertEquals('foo', $model->field('title', array('body' => 'foo2'))); + $this->assertEquals('foo', $model->field('title', array('body' => 'foo3'))); + } + + } diff --git a/lib/Cake/Test/Case/Model/ModelWriteTest.php b/lib/Cake/Test/Case/Model/ModelWriteTest.php index 6caed12d0..a49f8d887 100644 --- a/lib/Cake/Test/Case/Model/ModelWriteTest.php +++ b/lib/Cake/Test/Case/Model/ModelWriteTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -3244,6 +3244,281 @@ class ModelWriteTest extends BaseModelTest { $result = $TestModel->saveAll($data, array('deep' => true)); $this->assertTrue($result); } +/** + * testSaveAllDeepValidateOnly + * tests the validate methods with deeper recursive data + * + * @return void + */ + public function testSaveAllDeepValidateOnly() { + $this->loadFixtures('Article', 'Comment', 'User', 'Attachment'); + $TestModel = new Article(); + $TestModel->hasMany['Comment']['order'] = array('Comment.created' => 'ASC'); + $TestModel->hasAndBelongsToMany = array(); + $TestModel->Comment->Attachment->validate['attachment'] = 'notEmpty'; + $TestModel->Comment->validate['comment'] = 'notEmpty'; + + $result = $TestModel->saveAll( + array( + 'Article' => array('id' => 2), + 'Comment' => array( + array('comment' => 'First new comment', 'published' => 'Y', 'User' => array('user' => 'newuser', 'password' => 'newuserpass')), + array('comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2) + ) + ), + array('validate' => 'only', 'deep' => true) + ); + $this->assertTrue($result); + + $result = $TestModel->saveAll( + array( + 'Article' => array('id' => 2), + 'Comment' => array( + array('comment' => 'First new comment', 'published' => 'Y', 'User' => array('user' => '', 'password' => 'newuserpass')), + array('comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2) + ) + ), + array('validate' => 'only', 'deep' => true) + ); + $this->assertFalse($result); + + $result = $TestModel->saveAll( + array( + 'Article' => array('id' => 2), + 'Comment' => array( + array('comment' => 'First new comment', 'published' => 'Y', 'User' => array('user' => 'newuser', 'password' => 'newuserpass')), + array('comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2) + ) + ), + array('validate' => 'only', 'atomic' => false, 'deep' => true) + ); + $expected = array( + 'Article' => true, + 'Comment' => array( + true, + true + ) + ); + $this->assertSame($expected, $result); + + $result = $TestModel->saveAll( + array( + 'Article' => array('id' => 2), + 'Comment' => array( + array('comment' => 'First new comment', 'published' => 'Y', 'User' => array('user' => '', 'password' => 'newuserpass')), + array('comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2) + ) + ), + array('validate' => 'only', 'atomic' => false, 'deep' => true) + ); + $expected = array( + 'Article' => true, + 'Comment' => array( + false, + true + ) + ); + $this->assertSame($expected, $result); + + $result = $TestModel->saveAll(array( + 'Article' => array('id' => 2), + 'Comment' => array( + array('comment' => 'Third new comment', 'published' => 'Y', 'user_id' => 5), + array('comment' => 'Fourth new comment', 'published' => 'Y', 'user_id' => 2, 'Attachment' => array('attachment' => 'deepsaved')) + ) + ), + array('validate' => 'only', 'deep' => true) + ); + $this->assertTrue($result); + + $result = $TestModel->saveAll(array( + 'Article' => array('id' => 2), + 'Comment' => array( + array('comment' => 'Third new comment', 'published' => 'Y', 'user_id' => 5), + array('comment' => 'Fourth new comment', 'published' => 'Y', 'user_id' => 2, 'Attachment' => array('attachment' => '')) + ) + ), + array('validate' => 'only', 'deep' => true) + ); + $this->assertFalse($result); + + $result = $TestModel->saveAll(array( + 'Article' => array('id' => 2), + 'Comment' => array( + array('comment' => 'Third new comment', 'published' => 'Y', 'user_id' => 5), + array('comment' => 'Fourth new comment', 'published' => 'Y', 'user_id' => 2, 'Attachment' => array('attachment' => 'deepsave')) + ) + ), + array('validate' => 'only', 'atomic' => false, 'deep' => true) + ); + $expected = array( + 'Article' => true, + 'Comment' => array( + true, + true + ) + ); + $this->assertSame($expected, $result); + + $result = $TestModel->saveAll(array( + 'Article' => array('id' => 2), + 'Comment' => array( + array('comment' => 'Third new comment', 'published' => 'Y', 'user_id' => 5), + array('comment' => 'Fourth new comment', 'published' => 'Y', 'user_id' => 2, 'Attachment' => array('attachment' => '')) + ) + ), + array('validate' => 'only', 'atomic' => false, 'deep' => true) + ); + $expected = array( + 'Article' => true, + 'Comment' => array( + true, + false + ) + ); + $this->assertSame($expected, $result); + + $expected = array( + 'Comment' => array( + 1 => array( + 'Attachment' => array( + 'attachment' => array('This field cannot be left blank') + ) + ) + ) + ); + $result = $TestModel->validationErrors; + $this->assertSame($expected, $result); + + $data = array( + 'Attachment' => array( + 'attachment' => 'deepsave insert', + ), + 'Comment' => array( + 'comment' => 'First comment deepsave insert', + 'published' => 'Y', + 'user_id' => 5, + 'Article' => array( + 'title' => 'First Article deepsave insert', + 'body' => 'First Article Body deepsave insert', + 'User' => array( + 'user' => 'deepsave', + 'password' => 'magic' + ), + ), + ) + ); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'deep' => true)); + $this->assertTrue($result); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => true)); + $expected = array( + 'Attachment' => true, + 'Comment' => true + ); + $this->assertSame($expected, $result); + + $data = array( + 'Attachment' => array( + 'attachment' => 'deepsave insert', + ), + 'Comment' => array( + 'comment' => 'First comment deepsave insert', + 'published' => 'Y', + 'user_id' => 5, + 'Article' => array( + 'title' => 'First Article deepsave insert', + 'body' => 'First Article Body deepsave insert', + 'User' => array( + 'user' => '', + 'password' => 'magic' + ), + ), + ) + ); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'deep' => true)); + $this->assertFalse($result); + + $result = $TestModel->Comment->Attachment->validationErrors; + $expected = array( + 'Comment' => array( + 'Article' => array( + 'User' => array( + 'user' => array('This field cannot be left blank') + ) + ) + ) + ); + $this->assertSame($expected, $result); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => true)); + $expected = array( + 'Attachment' => true, + 'Comment' => false + ); + $this->assertEquals($expected, $result); + + $data['Comment']['Article']['body'] = ''; + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'deep' => true)); + $this->assertFalse($result); + + $result = $TestModel->Comment->Attachment->validationErrors; + $expected = array( + 'Comment' => array( + 'Article' => array( + 'body' => array('This field cannot be left blank') + ) + ) + ); + $this->assertSame($expected, $result); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => true)); + $expected = array( + 'Attachment' => true, + 'Comment' => false + ); + $this->assertEquals($expected, $result); + + $data['Comment']['comment'] = ''; + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'deep' => true)); + $this->assertFalse($result); + + $result = $TestModel->Comment->Attachment->validationErrors; + $expected = array( + 'Comment' => array( + 'comment' => array('This field cannot be left blank') + ) + ); + $this->assertSame($expected, $result); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => true)); + $expected = array( + 'Attachment' => true, + 'Comment' => false + ); + $this->assertEquals($expected, $result); + + $data['Attachment']['attachment'] = ''; + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'deep' => true)); + $this->assertFalse($result); + + $result = $TestModel->Comment->Attachment->validationErrors; + $expected = array('attachment' => array('This field cannot be left blank')); + $this->assertSame($expected, $result); + + $result = $TestModel->Comment->validationErrors; + $expected = array('comment' => array('This field cannot be left blank')); + $this->assertSame($expected, $result); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => true)); + $expected = array( + 'Attachment' => false, + 'Comment' => false + ); + $this->assertEquals($expected, $result); + } /** * testSaveAllNotDeepAssociated method @@ -3391,6 +3666,148 @@ class ModelWriteTest extends BaseModelTest { $result = $TestModel->saveAll($data, array('deep' => false)); $this->assertTrue($result); } +/** + * testSaveAllNotDeepValidateOnly + * tests the validate methods to not validate deeper recursive data + * + * @return void + */ + public function testSaveAllNotDeepValidateOnly() { + $this->loadFixtures('Article', 'Comment', 'User', 'Attachment'); + $TestModel = new Article(); + $TestModel->hasMany['Comment']['order'] = array('Comment.created' => 'ASC'); + $TestModel->hasAndBelongsToMany = array(); + $TestModel->Comment->Attachment->validate['attachment'] = 'notEmpty'; + $TestModel->Comment->validate['comment'] = 'notEmpty'; + + $result = $TestModel->saveAll( + array( + 'Article' => array('id' => 2, 'body' => ''), + 'Comment' => array( + array('comment' => 'First new comment', 'published' => 'Y', 'User' => array('user' => '', 'password' => 'newuserpass')), + array('comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2) + ) + ), + array('validate' => 'only', 'deep' => false) + ); + $this->assertFalse($result); + + $expected = array('body' => array('This field cannot be left blank')); + $result = $TestModel->validationErrors; + $this->assertSame($expected, $result); + + $result = $TestModel->saveAll( + array( + 'Article' => array('id' => 2, 'body' => 'Ignore invalid user data'), + 'Comment' => array( + array('comment' => 'First new comment', 'published' => 'Y', 'User' => array('user' => '', 'password' => 'newuserpass')), + array('comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2) + ) + ), + array('validate' => 'only', 'deep' => false) + ); + $this->assertTrue($result); + + $result = $TestModel->saveAll( + array( + 'Article' => array('id' => 2, 'body' => 'Ignore invalid user data'), + 'Comment' => array( + array('comment' => 'First new comment', 'published' => 'Y', 'User' => array('user' => '', 'password' => 'newuserpass')), + array('comment' => 'Second new comment', 'published' => 'Y', 'user_id' => 2) + ) + ), + array('validate' => 'only', 'atomic' => false, 'deep' => false) + ); + $expected = array( + 'Article' => true, + 'Comment' => array( + true, + true + ) + ); + $this->assertSame($expected, $result); + + $result = $TestModel->saveAll(array( + 'Article' => array('id' => 2, 'body' => 'Ignore invalid attachment data'), + 'Comment' => array( + array('comment' => 'Third new comment', 'published' => 'Y', 'user_id' => 5), + array('comment' => 'Fourth new comment', 'published' => 'Y', 'user_id' => 2, 'Attachment' => array('attachment' => '')) + ) + ), + array('validate' => 'only', 'deep' => false) + ); + $this->assertTrue($result); + + $result = $TestModel->saveAll(array( + 'Article' => array('id' => 2, 'body' => 'Ignore invalid attachment data'), + 'Comment' => array( + array('comment' => 'Third new comment', 'published' => 'Y', 'user_id' => 5), + array('comment' => 'Fourth new comment', 'published' => 'Y', 'user_id' => 2, 'Attachment' => array('attachment' => '')) + ) + ), + array('validate' => 'only', 'atomic' => false, 'deep' => false) + ); + $expected = array( + 'Article' => true, + 'Comment' => array( + true, + true + ) + ); + $this->assertSame($expected, $result); + + $expected = array(); + $result = $TestModel->validationErrors; + $this->assertSame($expected, $result); + + $data = array( + 'Attachment' => array( + 'attachment' => 'deepsave insert', + ), + 'Comment' => array( + 'comment' => 'First comment deepsave insert', + 'published' => 'Y', + 'user_id' => 5, + 'Article' => array( + 'title' => 'First Article deepsave insert ignored', + 'body' => 'First Article Body deepsave insert', + 'User' => array( + 'user' => '', + 'password' => 'magic' + ), + ), + ) + ); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'deep' => false)); + $this->assertTrue($result); + + $result = $TestModel->Comment->Attachment->validationErrors; + $expected = array(); + $this->assertSame($expected, $result); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => false)); + $expected = array( + 'Attachment' => true, + 'Comment' => true + ); + $this->assertEquals($expected, $result); + + $data['Comment']['Article']['body'] = ''; + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'deep' => false)); + $this->assertTrue($result); + + $result = $TestModel->Comment->Attachment->validationErrors; + $expected = array(); + $this->assertSame($expected, $result); + + $result = $TestModel->Comment->Attachment->saveAll($data, array('validate' => 'only', 'atomic' => false, 'deep' => false)); + $expected = array( + 'Attachment' => true, + 'Comment' => true + ); + $this->assertEquals($expected, $result); + } /** * testSaveAllHasMany method @@ -3850,7 +4267,7 @@ class ModelWriteTest extends BaseModelTest { 'author_id' => '3', 'title' => 'Just update the title', 'body' => 'Second Post Body', - 'published' => 'Y', + 'published' => 'N', 'created' => '2007-03-18 10:41:23' )), array( @@ -3939,7 +4356,7 @@ class ModelWriteTest extends BaseModelTest { 'author_id' => '3', 'title' => 'Just update the title', 'body' => 'Second Post Body', - 'published' => 'Y', + 'published' => 'N', 'created' => '2007-03-18 10:41:23' ) ), @@ -3999,6 +4416,59 @@ class ModelWriteTest extends BaseModelTest { $this->assertEquals($errors, $TestModel->validationErrors); } +/** + * testSaveAllValidationOnly method + * + * @return void + */ + public function testSaveAllValidationOnly() { + $this->loadFixtures('Comment', 'Attachment'); + $TestModel = new Comment(); + $TestModel->Attachment->validate = array('attachment' => 'notEmpty'); + + $data = array( + 'Comment' => array( + 'comment' => 'This is the comment' + ), + 'Attachment' => array( + 'attachment' => '' + ) + ); + + $result = $TestModel->saveAll($data, array('validate' => 'only')); + $this->assertFalse($result); + + $TestModel = new Article(); + $TestModel->validate = array('title' => 'notEmpty'); + $result = $TestModel->saveAll( + array( + 0 => array('title' => ''), + 1 => array('title' => 'title 1'), + 2 => array('title' => 'title 2'), + ), + array('validate' => 'only') + ); + $this->assertFalse($result); + $expected = array( + 0 => array('title' => array('This field cannot be left blank')), + ); + $this->assertEquals($expected, $TestModel->validationErrors); + + $result = $TestModel->saveAll( + array( + 0 => array('title' => 'title 0'), + 1 => array('title' => ''), + 2 => array('title' => 'title 2'), + ), + array('validate' => 'only') + ); + $this->assertFalse($result); + $expected = array( + 1 => array('title' => array('This field cannot be left blank')), + ); + $this->assertEquals($expected, $TestModel->validationErrors); + } + /** * testSaveAllValidateFirst method * @@ -4071,8 +4541,8 @@ class ModelWriteTest extends BaseModelTest { $result = $model->find('all'); $this->assertEquals( - 'Post with Author saveAlled from comment', - $result[0]['Article']['title'] + $result[0]['Article']['title'], + 'Post with Author saveAlled from comment' ); $this->assertEquals('Only new comment', $result[0]['Comment'][0]['comment']); } @@ -4137,6 +4607,82 @@ class ModelWriteTest extends BaseModelTest { $this->assertEquals($expected, $result); } +/** + * testSaveAllHasManyValidationOnly method + * + * @return void + */ + public function testSaveAllHasManyValidationOnly() { + $this->loadFixtures('Article', 'Comment', 'Attachment'); + $TestModel = new Article(); + $TestModel->belongsTo = $TestModel->hasAndBelongsToMany = array(); + $TestModel->Comment->validate = array('comment' => 'notEmpty'); + + $result = $TestModel->saveAll( + array( + 'Article' => array('id' => 2), + 'Comment' => array( + array( + 'id' => 1, + 'comment' => '', + 'published' => 'Y', + 'user_id' => 1), + array( + 'id' => 2, + 'comment' => + 'comment', + 'published' => 'Y', + 'user_id' => 1 + ))), + array('validate' => 'only') + ); + $this->assertFalse($result); + + $result = $TestModel->saveAll( + array( + 'Article' => array('id' => 2), + 'Comment' => array( + array( + 'id' => 1, + 'comment' => '', + 'published' => 'Y', + 'user_id' => 1 + ), + array( + 'id' => 2, + 'comment' => 'comment', + 'published' => 'Y', + 'user_id' => 1 + ), + array( + 'id' => 3, + 'comment' => '', + 'published' => 'Y', + 'user_id' => 1 + ))), + array( + 'validate' => 'only', + 'atomic' => false + )); + $expected = array( + 'Article' => true, + 'Comment' => array(false, true, false) + ); + $this->assertSame($expected, $result); + + $expected = array('Comment' => array( + 0 => array('comment' => array('This field cannot be left blank')), + 2 => array('comment' => array('This field cannot be left blank')) + )); + $this->assertEquals($expected, $TestModel->validationErrors); + + $expected = array( + 0 => array('comment' => array('This field cannot be left blank')), + 2 => array('comment' => array('This field cannot be left blank')) + ); + $this->assertEquals($expected, $TestModel->Comment->validationErrors); + } + /** * test that saveAll behaves like plain save() when supplied empty data * @@ -5077,7 +5623,7 @@ class ModelWriteTest extends BaseModelTest { 'author_id' => '3', 'title' => 'Just update the title', 'body' => 'Second Post Body', - 'published' => 'Y', + 'published' => 'N', 'created' => '2007-03-18 10:41:23' ) ), @@ -5173,7 +5719,7 @@ class ModelWriteTest extends BaseModelTest { 'author_id' => '3', 'title' => 'Just update the title', 'body' => 'Second Post Body', - 'published' => 'Y', + 'published' => 'N', )), array( 'Post' => array( @@ -5217,6 +5763,39 @@ class ModelWriteTest extends BaseModelTest { $this->assertEquals($errors, $TestModel->validationErrors); } +/** + * testValidateMany method + * + * @return void + */ + public function testValidateMany() { + $TestModel = new Article(); + $TestModel->validate = array('title' => 'notEmpty'); + $data = array( + 0 => array('title' => ''), + 1 => array('title' => 'title 1'), + 2 => array('title' => 'title 2'), + ); + $result = $TestModel->validateMany($data); + $this->assertFalse($result); + $expected = array( + 0 => array('title' => array('This field cannot be left blank')), + ); + $this->assertEquals($expected, $TestModel->validationErrors); + + $data = array( + 0 => array('title' => 'title 0'), + 1 => array('title' => ''), + 2 => array('title' => 'title 2'), + ); + $result = $TestModel->validateMany($data); + $this->assertFalse($result); + $expected = array( + 1 => array('title' => array('This field cannot be left blank')), + ); + $this->assertEquals($expected, $TestModel->validationErrors); + } + /** * testSaveAssociatedValidateFirst method * @@ -5354,6 +5933,92 @@ class ModelWriteTest extends BaseModelTest { $this->assertEquals($expected, $result); } +/** + * testValidateAssociated method + * + * @return void + */ + public function testValidateAssociated() { + $TestModel = new Comment(); + $TestModel->Attachment->validate = array('attachment' => 'notEmpty'); + + $data = array( + 'Comment' => array( + 'comment' => 'This is the comment' + ), + 'Attachment' => array( + 'attachment' => '' + ) + ); + + $result = $TestModel->validateAssociated($data); + $this->assertFalse($result); + + $TestModel = new Article(); + $TestModel->belongsTo = $TestModel->hasAndBelongsToMany = array(); + $TestModel->Comment->validate = array('comment' => 'notEmpty'); + + $data = array( + 'Article' => array('id' => 2), + 'Comment' => array( + array( + 'id' => 1, + 'comment' => '', + 'published' => 'Y', + 'user_id' => 1), + array( + 'id' => 2, + 'comment' => + 'comment', + 'published' => 'Y', + 'user_id' => 1 + ))); + $result = $TestModel->validateAssociated($data); + $this->assertFalse($result); + + $data = array( + 'Article' => array('id' => 2), + 'Comment' => array( + array( + 'id' => 1, + 'comment' => '', + 'published' => 'Y', + 'user_id' => 1 + ), + array( + 'id' => 2, + 'comment' => 'comment', + 'published' => 'Y', + 'user_id' => 1 + ), + array( + 'id' => 3, + 'comment' => '', + 'published' => 'Y', + 'user_id' => 1 + ))); + $result = $TestModel->validateAssociated($data, array( + 'atomic' => false + )); + $expected = array( + 'Article' => true, + 'Comment' => array(false, true, false) + ); + $this->assertSame($expected, $result); + + $expected = array('Comment' => array( + 0 => array('comment' => array('This field cannot be left blank')), + 2 => array('comment' => array('This field cannot be left blank')) + )); + $this->assertEquals($expected, $TestModel->validationErrors); + + $expected = array( + 0 => array('comment' => array('This field cannot be left blank')), + 2 => array('comment' => array('This field cannot be left blank')) + ); + $this->assertEquals($expected, $TestModel->Comment->validationErrors); + } + /** * test that saveMany behaves like plain save() when suplied empty data * @@ -5802,6 +6467,42 @@ class ModelWriteTest extends BaseModelTest { $this->assertEquals('', $result[0]['Comment'][1]['comment']); } +/** + * testSaveAllFieldListHasOne method + * + * @return void + */ + public function testSaveAllFieldListHasOne() { + $this->loadFixtures('Attachment', 'Comment', 'Article', 'User'); + $TestModel = new Comment(); + + $TestModel->validate = array('comment' => 'notEmpty'); + $TestModel->Attachment->validate = array('attachment' => 'notEmpty'); + + $record = array( + 'Comment' => array( + 'user_id' => 1, + 'article_id' => 1, + 'comment' => '', + ), + 'Attachment' => array( + 'attachment' => '' + ) + ); + $result = $TestModel->saveAll($record, array('validate' => 'only')); + $this->assertFalse($result); + + $fieldList = array( + 'Comment' => array('id', 'article_id', 'user_id'), + 'Attachment' => array('comment_id') + ); + $result = $TestModel->saveAll($record, array( + 'fieldList' => $fieldList, 'validate' => 'only' + )); + $this->assertTrue($result); + $this->assertEmpty($TestModel->validationErrors); + } + /** * testSaveAllDeepFieldListValidateBelongsTo * diff --git a/lib/Cake/Test/Case/Model/models.php b/lib/Cake/Test/Case/Model/models.php index a206b0790..fe0db80a2 100644 --- a/lib/Cake/Test/Case/Model/models.php +++ b/lib/Cake/Test/Case/Model/models.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model * @since CakePHP(tm) v 1.2.0.6464 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -2537,15 +2537,15 @@ class NumberTree extends CakeTestModel { * @param mixed $currentLevel * @param mixed $parent_id * @param string $prefix - * @param bool $hierachial + * @param bool $hierarchal * @return void */ - public function initialize($levelLimit = 3, $childLimit = 3, $currentLevel = null, $parentId = null, $prefix = '1', $hierachial = true) { + public function initialize($levelLimit = 3, $childLimit = 3, $currentLevel = null, $parentId = null, $prefix = '1', $hierarchal = true) { if (!$parentId) { $db = ConnectionManager::getDataSource($this->useDbConfig); $db->truncate($this->table); $this->save(array($this->name => array('name' => '1. Root'))); - $this->initialize($levelLimit, $childLimit, 1, $this->id, '1', $hierachial); + $this->initialize($levelLimit, $childLimit, 1, $this->id, '1', $hierarchal); $this->create(array()); } @@ -2558,7 +2558,7 @@ class NumberTree extends CakeTestModel { $data = array($this->name => array('name' => $name)); $this->create($data); - if ($hierachial) { + if ($hierarchal) { if ($this->name == 'UnconventionalTree') { $data[$this->name]['join'] = $parentId; } else { @@ -2566,7 +2566,7 @@ class NumberTree extends CakeTestModel { } } $this->save($data); - $this->initialize($levelLimit, $childLimit, $currentLevel + 1, $this->id, $name, $hierachial); + $this->initialize($levelLimit, $childLimit, $currentLevel + 1, $this->id, $name, $hierarchal); } } @@ -3119,7 +3119,7 @@ class TranslatedItem2 extends CakeTestModel { /** * translateModel property * - * @var string 'TranslateTestModel' + * @var string */ public $translateModel = 'TranslateWithPrefix'; @@ -3163,7 +3163,7 @@ class TranslatedItemWithTable extends CakeTestModel { /** * translateModel property * - * @var string 'TranslateTestModel' + * @var string */ public $translateModel = 'TranslateTestModel'; @@ -3248,6 +3248,13 @@ class TranslatedArticle extends CakeTestModel { */ public $belongsTo = array('User'); +/** + * belongsTo property + * + * @var array + */ + public $hasMany = array('TranslatedItem'); + } class CounterCacheUser extends CakeTestModel { @@ -4941,6 +4948,13 @@ class CustomArticle extends AppModel { */ public $findMethods = array('unPublished' => true); +/** + * belongsTo property + * + * @var array + */ + public $belongsTo = array('User'); + /** * _findUnPublished custom find * @@ -4954,4 +4968,13 @@ class CustomArticle extends AppModel { return $results; } +/** + * Alters title data + * + * @return void + **/ + public function beforeValidate($options = array()) { + $this->data[$this->alias]['title'] = 'foo'; + } + } diff --git a/lib/Cake/Test/Case/Network/CakeRequestTest.php b/lib/Cake/Test/Case/Network/CakeRequestTest.php index 4ca06914c..aa1d22013 100644 --- a/lib/Cake/Test/Case/Network/CakeRequestTest.php +++ b/lib/Cake/Test/Case/Network/CakeRequestTest.php @@ -929,6 +929,22 @@ class CakeRequestTest extends CakeTestCase { $this->assertEquals($expected, $result); } +/** + * Test parsing accept with a confusing accept value. + * + * @return void + */ + public function testParseAcceptNoQValues() { + $_SERVER['HTTP_ACCEPT'] = 'application/json, text/plain, */*'; + + $request = new CakeRequest('/', false); + $result = $request->parseAccept(); + $expected = array( + '1.0' => array('application/json', 'text/plain', '*/*'), + ); + $this->assertEquals($expected, $result); + } + /** * testBaseUrlAndWebrootWithModRewrite method * diff --git a/lib/Cake/Test/Case/Network/CakeResponseTest.php b/lib/Cake/Test/Case/Network/CakeResponseTest.php index 91be19de8..9f601b1b4 100644 --- a/lib/Cake/Test/Case/Network/CakeResponseTest.php +++ b/lib/Cake/Test/Case/Network/CakeResponseTest.php @@ -118,8 +118,9 @@ class CakeResponseTest extends CakeTestCase { $this->assertEquals('application/vnd.wap.xhtml+xml', $response->type('xhtml-mobile')); $this->assertEquals('text/csv', $response->type('csv')); - $response->type(array('keynote' => 'application/keynote')); + $response->type(array('keynote' => 'application/keynote', 'bat' => 'application/bat')); $this->assertEquals('application/keynote', $response->type('keynote')); + $this->assertEquals('application/bat', $response->type('bat')); $this->assertFalse($response->type('wackytype')); } @@ -925,7 +926,7 @@ class CakeResponseTest extends CakeTestCase { /** * Test cookie setting - * + * * @return void */ public function testCookieSettings() { diff --git a/lib/Cake/Test/Case/Network/CakeSocketTest.php b/lib/Cake/Test/Case/Network/CakeSocketTest.php index 613e08d71..abe6fcadf 100644 --- a/lib/Cake/Test/Case/Network/CakeSocketTest.php +++ b/lib/Cake/Test/Case/Network/CakeSocketTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Network * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php index 6a21032ba..a087ab472 100644 --- a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php +++ b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Network.Email * @since CakePHP(tm) v 2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Network/Email/DebugTransportTest.php b/lib/Cake/Test/Case/Network/Email/DebugTransportTest.php index 72fe704c8..11512fd66 100644 --- a/lib/Cake/Test/Case/Network/Email/DebugTransportTest.php +++ b/lib/Cake/Test/Case/Network/Email/DebugTransportTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Network.Email * @since CakePHP(tm) v 2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -51,7 +51,7 @@ class DebugTransportTest extends CakeTestCase { $email->subject('Testing Message'); $date = date(DATE_RFC2822); $email->setHeaders(array('X-Mailer' => DebugCakeEmail::EMAIL_CLIENT, 'Date' => $date)); - $email->expects($this->any())->method('message')->will($this->returnValue(array('First Line', 'Second Line', ''))); + $email->expects($this->any())->method('message')->will($this->returnValue(array('First Line', 'Second Line', '.Third Line', ''))); $headers = "From: CakePHP Test \r\n"; $headers .= "To: CakePHP \r\n"; @@ -66,6 +66,7 @@ class DebugTransportTest extends CakeTestCase { $data = "First Line\r\n"; $data .= "Second Line\r\n"; + $data .= ".Third Line\r\n"; // Not use 'RFC5321 4.5.2.Transparency' in DebugTransport. $result = $this->DebugTransport->send($email); diff --git a/lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php b/lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php index 86591d5f8..0310e5320 100644 --- a/lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php +++ b/lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Network.Email * @since CakePHP(tm) v 2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -221,7 +221,7 @@ class SmtpTransportTest extends CakeTestCase { $email->subject('Testing SMTP'); $date = date(DATE_RFC2822); $email->setHeaders(array('X-Mailer' => SmtpCakeEmail::EMAIL_CLIENT, 'Date' => $date)); - $email->expects($this->any())->method('message')->will($this->returnValue(array('First Line', 'Second Line', ''))); + $email->expects($this->any())->method('message')->will($this->returnValue(array('First Line', 'Second Line', '.Third Line', ''))); $data = "From: CakePHP Test \r\n"; $data .= "Return-Path: CakePHP Return \r\n"; @@ -237,6 +237,7 @@ class SmtpTransportTest extends CakeTestCase { $data .= "\r\n"; $data .= "First Line\r\n"; $data .= "Second Line\r\n"; + $data .= "..Third Line\r\n"; // RFC5321 4.5.2.Transparency $data .= "\r\n"; $data .= "\r\n\r\n.\r\n"; diff --git a/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php b/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php index 25c1b5cac..6ea778919 100644 --- a/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php +++ b/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Network.Http * @since CakePHP(tm) v 2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php b/lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php index 13fb7d352..a03a536d9 100644 --- a/lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php +++ b/lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Network.Http * @since CakePHP(tm) v 2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Network/Http/HttpResponseTest.php b/lib/Cake/Test/Case/Network/Http/HttpResponseTest.php index 9a6e35345..0f6213e4c 100644 --- a/lib/Cake/Test/Case/Network/Http/HttpResponseTest.php +++ b/lib/Cake/Test/Case/Network/Http/HttpResponseTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Network.Http * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php b/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php index 52f447858..b80e8621d 100644 --- a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php +++ b/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Network.Http * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index d63af11c4..023c436f9 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Routing * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Routing/Filter/AssetDispatcherTest.php b/lib/Cake/Test/Case/Routing/Filter/AssetDispatcherTest.php index 998e561a4..28d44b49b 100644 --- a/lib/Cake/Test/Case/Routing/Filter/AssetDispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/Filter/AssetDispatcherTest.php @@ -93,7 +93,7 @@ class AssetDispatcherTest extends CakeTestCase { 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS) )); $time = filemtime(App::themePath('TestTheme') . 'webroot' . DS . 'img' . DS . 'cake.power.gif'); - $time = new DateTime(date('Y-m-d H:i:s', $time), new DateTimeZone('UTC')); + $time = new DateTime('@' . $time); $response = $this->getMock('CakeResponse', array('send', 'checkNotModified')); $request = new CakeRequest('theme/test_theme/img/cake.power.gif'); diff --git a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php index 58e0644c4..a60f04530 100644 --- a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php +++ b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php @@ -299,6 +299,16 @@ class CakeRouteTest extends CakeTestCase { $result = $route->match($url); $expected = '/admin/subscriptions/edit/1'; $this->assertEquals($expected, $result); + + $url = array( + 'controller' => 'subscribe', + 'admin' => true, + 'action' => 'edit_admin_e', + 1 + ); + $result = $route->match($url); + $expected = '/admin/subscriptions/edit_admin_e/1'; + $this->assertEquals($expected, $result); } /** diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index d45cafa17..dd7e6879a 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Routing * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -1582,6 +1582,10 @@ class RouterTest extends CakeTestCase { $expected = '/protected/images/add'; $this->assertEquals($expected, $result); + $result = Router::url(array('controller' => 'images', 'action' => 'add_protected_test', 'protected' => true)); + $expected = '/protected/images/add_protected_test'; + $this->assertEquals($expected, $result); + $result = Router::url(array('action' => 'edit', 1)); $expected = '/images/edit/1'; $this->assertEquals($expected, $result); @@ -2586,4 +2590,49 @@ class RouterTest extends CakeTestCase { Router::defaultRouteClass('NonExistentClass'); } +/** + * Tests generating well-formed querystrings + * + * @return void + */ + public function testQueryString() { + $result = Router::queryString(array('var' => 'foo bar')); + $expected = '?var=foo+bar'; + $this->assertEquals($expected, $result); + + $result = Router::queryString(false, array('some' => 'param', 'foo' => 'bar')); + $expected = '?some=param&foo=bar'; + $this->assertEquals($expected, $result); + + $existing = array('apple' => 'red', 'pear' => 'green'); + $result = Router::queryString($existing, array('some' => 'param', 'foo' => 'bar')); + $expected = '?apple=red&pear=green&some=param&foo=bar'; + $this->assertEquals($expected, $result); + + $existing = 'apple=red&pear=green'; + $result = Router::queryString($existing, array('some' => 'param', 'foo' => 'bar')); + $expected = '?apple=red&pear=green&some=param&foo=bar'; + $this->assertEquals($expected, $result); + + $existing = '?apple=red&pear=green'; + $result = Router::queryString($existing, array('some' => 'param', 'foo' => 'bar')); + $expected = '?apple=red&pear=green&some=param&foo=bar'; + $this->assertEquals($expected, $result); + + $result = Router::queryString('apple=red&pear=green'); + $expected = '?apple=red&pear=green'; + $this->assertEquals($expected, $result); + + $result = Router::queryString('foo=bar', array('php' => 'nut', 'jose' => 'zap'), true); + $expected = '?foo=bar&php=nut&jose=zap'; + $this->assertEquals($expected, $result); + + $result = Router::queryString('foo=bar&', array('php' => 'nut', 'jose' => 'zap'), true); + $expected = '?foo=bar&php=nut&jose=zap'; + $this->assertEquals($expected, $result); + + $result = Router::queryString('foo=bar&', array('php' => 'nut', 'jose' => 'zap')); + $expected = '?foo=bar&php=nut&jose=zap'; + $this->assertEquals($expected, $result); + } } diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php index e7e9db503..556554872 100644 --- a/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php +++ b/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.TestSuite * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index af124be1d..cf6bbb85a 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -542,4 +542,23 @@ class ControllerTestCaseTest extends CakeTestCase { $this->assertSame($this->Case->controller->request, $this->Case->controller->RequestHandler->request); } +/** + * Test that testAction() doesn't destroy data in GET & POST + * + * @return void + */ + public function testRestoreGetPost() { + $restored = array('new' => 'value'); + + $_GET = $restored; + $_POST = $restored; + + $this->Case->generate('TestsApps'); + $options = array('method' => 'get'); + $this->Case->testAction('/tests_apps/index', $options); + + $this->assertEquals($restored, $_GET); + $this->assertEquals($restored, $_POST); + } + } diff --git a/lib/Cake/Test/Case/Utility/CakeNumberTest.php b/lib/Cake/Test/Case/Utility/CakeNumberTest.php index 1895c4db2..7fb9d1590 100644 --- a/lib/Cake/Test/Case/Utility/CakeNumberTest.php +++ b/lib/Cake/Test/Case/Utility/CakeNumberTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Utility/CakeTimeTest.php b/lib/Cake/Test/Case/Utility/CakeTimeTest.php index 7193988dd..81e737c3f 100644 --- a/lib/Cake/Test/Case/Utility/CakeTimeTest.php +++ b/lib/Cake/Test/Case/Utility/CakeTimeTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -810,7 +810,7 @@ class CakeTimeTest extends CakeTestCase { $this->assertEquals($expected, $result); $result = $this->Time->i18nFormat($time, '%c'); - $expected = 'jue 14 ene 2010 13:59:28 ' . strftime('%Z', $time); + $expected = 'jue 14 ene 2010 13:59:28 ' . utf8_encode(strftime('%Z', $time)); $this->assertEquals($expected, $result); $result = $this->Time->i18nFormat($time, 'Time is %r, and date is %x'); @@ -824,7 +824,7 @@ class CakeTimeTest extends CakeTestCase { $this->assertEquals($expected, $result); $result = $this->Time->i18nFormat($time, '%c'); - $expected = 'mié 13 ene 2010 13:59:28 ' . strftime('%Z', $time); + $expected = 'mié 13 ene 2010 13:59:28 ' . utf8_encode(strftime('%Z', $time)); $this->assertEquals($expected, $result); $result = $this->Time->i18nFormat($time, 'Time is %r, and date is %x'); diff --git a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php index bca56f206..eb20fcead 100644 --- a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php +++ b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Utility/FileTest.php b/lib/Cake/Test/Case/Utility/FileTest.php index 22c1343ae..e63bcbd9f 100644 --- a/lib/Cake/Test/Case/Utility/FileTest.php +++ b/lib/Cake/Test/Case/Utility/FileTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Utility/FolderTest.php b/lib/Cake/Test/Case/Utility/FolderTest.php index 1cc2230a1..76ee08af4 100644 --- a/lib/Cake/Test/Case/Utility/FolderTest.php +++ b/lib/Cake/Test/Case/Utility/FolderTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Utility/InflectorTest.php b/lib/Cake/Test/Case/Utility/InflectorTest.php index d5683680a..cd1989248 100644 --- a/lib/Cake/Test/Case/Utility/InflectorTest.php +++ b/lib/Cake/Test/Case/Utility/InflectorTest.php @@ -13,7 +13,7 @@ * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing + * @link http://book.cakephp.org/2.0/en/development/testing.html * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.4206 * @license Open Group Test Suite License (http://www.opensource.org/licenses/opengroup.php) diff --git a/lib/Cake/Test/Case/Utility/ObjectCollectionTest.php b/lib/Cake/Test/Case/Utility/ObjectCollectionTest.php index 70a8e09d9..c8adc05ef 100644 --- a/lib/Cake/Test/Case/Utility/ObjectCollectionTest.php +++ b/lib/Cake/Test/Case/Utility/ObjectCollectionTest.php @@ -11,7 +11,7 @@ * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Utility/SanitizeTest.php b/lib/Cake/Test/Case/Utility/SanitizeTest.php index b731b5559..13ba63c53 100644 --- a/lib/Cake/Test/Case/Utility/SanitizeTest.php +++ b/lib/Cake/Test/Case/Utility/SanitizeTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.5428 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Utility/SecurityTest.php b/lib/Cake/Test/Case/Utility/SecurityTest.php index 67f104a0d..ca7fb6916 100644 --- a/lib/Cake/Test/Case/Utility/SecurityTest.php +++ b/lib/Cake/Test/Case/Utility/SecurityTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Utility/SetTest.php b/lib/Cake/Test/Case/Utility/SetTest.php index 41f781bdd..51778582f 100644 --- a/lib/Cake/Test/Case/Utility/SetTest.php +++ b/lib/Cake/Test/Case/Utility/SetTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Utility/StringTest.php b/lib/Cake/Test/Case/Utility/StringTest.php index b70456654..efa024b5b 100644 --- a/lib/Cake/Test/Case/Utility/StringTest.php +++ b/lib/Cake/Test/Case/Utility/StringTest.php @@ -11,7 +11,7 @@ * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php index 89be30134..9bd7af111 100644 --- a/lib/Cake/Test/Case/Utility/ValidationTest.php +++ b/lib/Cake/Test/Case/Utility/ValidationTest.php @@ -4,14 +4,14 @@ * * PHP Version 5.x * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -1822,6 +1822,8 @@ class ValidationTest extends CakeTestCase { $this->assertFalse(Validation::inList('three', array('one', 'two'))); $this->assertFalse(Validation::inList('1one', array(0, 1, 2, 3))); $this->assertFalse(Validation::inList('one', array(0, 1, 2, 3))); + $this->assertFalse(Validation::inList('2', array(1, 2, 3))); + $this->assertTrue(Validation::inList('2', array(1, 2, 3), false)); } /** @@ -1932,6 +1934,8 @@ class ValidationTest extends CakeTestCase { $this->assertFalse(Validation::multiple(array('foo', 'bar', 'baz', 'squirrel'), array('min' => 10))); $this->assertTrue(Validation::multiple(array(0, 5, 9), array('in' => range(0, 10), 'max' => 5))); + $this->assertFalse(Validation::multiple(array('0', '5', '9'), array('in' => range(0, 10), 'max' => 5))); + $this->assertTrue(Validation::multiple(array('0', '5', '9'), array('in' => range(0, 10), 'max' => 5), false)); $this->assertFalse(Validation::multiple(array(0, 5, 9, 8, 6, 2, 1), array('in' => range(0, 10), 'max' => 5))); $this->assertFalse(Validation::multiple(array(0, 5, 9, 8, 11), array('in' => range(0, 10), 'max' => 5))); diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php index 5118ce274..cd1fc87b4 100644 --- a/lib/Cake/Test/Case/Utility/XmlTest.php +++ b/lib/Cake/Test/Case/Utility/XmlTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Utility * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -141,8 +141,14 @@ class XmlTest extends CakeTestCase { $obj = Xml::build($xml, array('return' => 'domdocument')); $this->assertEquals('tags', $obj->firstChild->nodeName); - $this->assertEquals(Xml::build($xml, array('return' => 'domdocument')), Xml::build(file_get_contents($xml), array('return' => 'domdocument'))); - $this->assertEquals(Xml::build($xml, array('return' => 'simplexml')), Xml::build($xml, 'simplexml')); + $this->assertEquals( + Xml::build($xml, array('return' => 'domdocument')), + Xml::build(file_get_contents($xml), array('return' => 'domdocument')) + ); + $this->assertEquals( + Xml::build($xml, array('return' => 'simplexml')), + Xml::build($xml, 'simplexml') + ); $xml = array('tag' => 'value'); $obj = Xml::build($xml); @@ -234,15 +240,33 @@ class XmlTest extends CakeTestCase { $this->assertTrue($obj instanceof SimpleXMLElement); $this->assertEquals('tags', $obj->getName()); $this->assertEquals(2, count($obj)); - $xmlText = '<' . '?xml version="1.0" encoding="UTF-8"?>'; - $this->assertEquals(str_replace(array("\r", "\n"), '', $obj->asXML()), $xmlText); + $xmlText = << + + + + +XML; + $this->assertXmlStringEqualsXmlString($xmlText, $obj->asXML()); $obj = Xml::fromArray($xml); $this->assertTrue($obj instanceof SimpleXMLElement); $this->assertEquals('tags', $obj->getName()); $this->assertEquals(2, count($obj)); - $xmlText = '<' . '?xml version="1.0" encoding="UTF-8"?>1defect2enhancement'; - $this->assertEquals(str_replace(array("\r", "\n"), '', $obj->asXML()), $xmlText); + $xmlText = << + + + 1 + defect + + + 2 + enhancement + + +XML; + $this->assertXmlStringEqualsXmlString($xmlText, $obj->asXML()); $xml = array( 'tags' => array( @@ -286,8 +310,18 @@ class XmlTest extends CakeTestCase { ) ); $obj = Xml::fromArray($xml, 'tags'); - $xmlText = '<' . '?xml version="1.0" encoding="UTF-8"?>defectenhancement'; - $this->assertEquals(str_replace(array("\r", "\n"), '', $obj->asXML()), $xmlText); + $xmlText = << + + + defect + + + enhancement + + +XML; + $this->assertXmlStringEqualsXmlString($xmlText, $obj->asXML()); $xml = array( 'tags' => array( @@ -306,8 +340,11 @@ class XmlTest extends CakeTestCase { ) ); $obj = Xml::fromArray($xml, 'tags'); - $xmlText = '<' . '?xml version="1.0" encoding="UTF-8"?>All tagsTag 1defectenhancement'; - $this->assertEquals(str_replace(array("\r", "\n"), '', $obj->asXML()), $xmlText); + $xmlText = << +All tagsTag 1defectenhancement +XML; + $this->assertXmlStringEqualsXmlString($xmlText, $obj->asXML()); $xml = array( 'tags' => array( @@ -319,7 +356,44 @@ class XmlTest extends CakeTestCase { ); $obj = Xml::fromArray($xml, 'attributes'); $xmlText = '<' . '?xml version="1.0" encoding="UTF-8"?>defect'; - $this->assertEquals(str_replace(array("\r", "\n"), '', $obj->asXML()), $xmlText); + $this->assertXmlStringEqualsXmlString($xmlText, $obj->asXML()); + } + +/** + * Test non-sequential keys in list types. + * + * @return void + */ + public function testFromArrayNonSequentialKeys() { + $xmlArray = array( + 'Event' => array( + array( + 'id' => '235', + 'Attribute' => array( + 0 => array( + 'id' => '9646', + ), + 2 => array( + 'id' => '9647', + ) + ) + ) + ) + ); + $obj = Xml::fromArray($xmlArray); + $expected = << + + 235 + + 9646 + + + 9647 + + +XML; + $this->assertXmlStringEqualsXmlString($expected, $obj->asXML()); } /** @@ -477,9 +551,11 @@ class XmlTest extends CakeTestCase { $this->assertEquals($expected, Xml::toArray(Xml::fromArray($array, 'attributes'))); $this->assertEquals($expected, Xml::toArray(Xml::fromArray($array, array('format' => 'attributes', 'return' => 'domdocument')))); - $xml = ''; - $xml .= 'defect'; - $xml .= ''; + $xml = << +defect + +XML; $obj = Xml::build($xml); $expected = array( @@ -492,11 +568,13 @@ class XmlTest extends CakeTestCase { ); $this->assertEquals($expected, Xml::toArray($obj)); - $xml = ''; - $xml .= '
ApplesBananas
'; - $xml .= 'CakePHPMIT
'; - $xml .= 'The book is on the table.
'; - $xml .= '
'; + $xml = << +
ApplesBananas
+ CakePHPMIT
+ The book is on the table.
+ +XML; $obj = Xml::build($xml); $expected = array( @@ -510,10 +588,12 @@ class XmlTest extends CakeTestCase { ); $this->assertEquals($expected, Xml::toArray($obj)); - $xml = ''; - $xml .= 'defect'; - $xml .= '1'; - $xml .= ''; + $xml = << +defect +1 + +XML; $obj = Xml::build($xml); $expected = array( @@ -577,18 +657,27 @@ class XmlTest extends CakeTestCase { ) ); $rssAsSimpleXML = Xml::fromArray($rss); - $xmlText = '<' . '?xml version="1.0" encoding="UTF-8"?>'; - $xmlText .= ''; - $xmlText .= ''; - $xmlText .= ''; - $xmlText .= 'The Bakery: '; - $xmlText .= 'http://bakery.cakephp.org/'; - $xmlText .= 'Recent Articles at The Bakery.'; - $xmlText .= 'Sun, 12 Sep 2010 04:18:26 -0500'; - $xmlText .= 'CakePHP 1.3.4 releasedhttp://bakery.cakephp.org/articles/view/cakephp-1-3-4-released'; - $xmlText .= 'Wizard Component 1.2 Tutorialhttp://bakery.cakephp.org/articles/view/wizard-component-1-2-tutorial'; - $xmlText .= ''; - $this->assertEquals(str_replace(array("\r", "\n"), '', $rssAsSimpleXML->asXML()), $xmlText); + $xmlText = << + + + + The Bakery: + http://bakery.cakephp.org/ + Recent Articles at The Bakery. + Sun, 12 Sep 2010 04:18:26 -0500 + + CakePHP 1.3.4 released + http://bakery.cakephp.org/articles/view/cakephp-1-3-4-released + + + Wizard Component 1.2 Tutorial + http://bakery.cakephp.org/articles/view/wizard-component-1-2-tutorial + + + +XML; + $this->assertXmlStringEqualsXmlString($xmlText, $rssAsSimpleXML->asXML()); } /** @@ -630,7 +719,27 @@ class XmlTest extends CakeTestCase { ); $this->assertSame(Xml::toArray($xml), $expected); - $xmlText = '1testing'; + $xmlText = << + + + + + + + + 1 + + + testing + + + + + + + +XML; $xml = Xml::build($xmlText); $expected = array( 'methodResponse' => array( @@ -653,7 +762,7 @@ class XmlTest extends CakeTestCase { $this->assertSame(Xml::toArray($xml), $expected); $xml = Xml::fromArray($expected, 'tags'); - $this->assertEquals(str_replace(array("\r", "\n"), '', $xml->asXML()), $xmlText); + $this->assertXmlStringEqualsXmlString($xmlText, $xml->asXML()); } /** @@ -701,12 +810,15 @@ class XmlTest extends CakeTestCase { ) ); $xmlRequest = Xml::fromArray($xml, array('encoding' => null)); - $xmlText = '<' . '?xml version="1.0"?>'; - $xmlText .= ''; - $xmlText .= ''; - $xmlText .= 'IBM'; - $xmlText .= ''; - $this->assertEquals(str_replace(array("\r", "\n"), '', $xmlRequest->asXML()), $xmlText); + $xmlText = << + + + IBM + + +XML; + $this->assertXmlStringEqualsXmlString($xmlText, $xmlRequest->asXML()); } /** @@ -715,7 +827,16 @@ class XmlTest extends CakeTestCase { * @return void */ public function testNamespace() { - $xmlResponse = Xml::build('goodbadTag without ns'); + $xml = << + + good + bad + + Tag without ns + +XML; + $xmlResponse = Xml::build($xml); $expected = array( 'root' => array( 'ns:tag' => array( @@ -775,9 +896,17 @@ class XmlTest extends CakeTestCase { ) ) ); - $expected = '<' . '?xml version="1.0" encoding="UTF-8"?>item 1item 2'; + $expected = << + + + item 1 + item 2 + + +XML; $xmlResponse = Xml::fromArray($xml); - $this->assertEquals(str_replace(array("\r", "\n"), '', $xmlResponse->asXML()), $expected); + $this->assertXmlStringEqualsXmlString($expected, $xmlResponse->asXML()); $xml = array( 'root' => array( @@ -788,7 +917,7 @@ class XmlTest extends CakeTestCase { ); $expected = '<' . '?xml version="1.0" encoding="UTF-8"?>'; $xmlResponse = Xml::fromArray($xml); - $this->assertEquals(str_replace(array("\r", "\n"), '', $xmlResponse->asXML()), $expected); + $this->assertXmlStringEqualsXmlString($expected, $xmlResponse->asXML()); $xml = array( 'root' => array( @@ -797,7 +926,7 @@ class XmlTest extends CakeTestCase { ); $expected = '<' . '?xml version="1.0" encoding="UTF-8"?>'; $xmlResponse = Xml::fromArray($xml); - $this->assertEquals(str_replace(array("\r", "\n"), '', $xmlResponse->asXML()), $expected); + $this->assertXmlStringEqualsXmlString($expected, $xmlResponse->asXML()); $xml = array( 'root' => array( @@ -806,7 +935,7 @@ class XmlTest extends CakeTestCase { ); $expected = '<' . '?xml version="1.0" encoding="UTF-8"?>'; $xmlResponse = Xml::fromArray($xml); - $this->assertEquals(str_replace(array("\r", "\n"), '', $xmlResponse->asXML()), $expected); + $this->assertXmlStringEqualsXmlString($expected, $xmlResponse->asXML()); } /** @@ -856,34 +985,38 @@ class XmlTest extends CakeTestCase { $data = $user->read(null, 1); $obj = Xml::build(compact('data')); - $expected = '<' . '?xml version="1.0" encoding="UTF-8"?>'; - $expected .= '1mariano5f4dcc3b5aa765d61d8327deb882cf99'; - $expected .= '2007-03-17 01:16:232007-03-17 01:18:31'; - $expected .= '
11First ArticleFirst Article Body'; - $expected .= 'Y2007-03-18 10:39:232007-03-18 10:41:31
'; - $expected .= '
31Third ArticleThird Article Body'; - $expected .= 'Y2007-03-18 10:43:232007-03-18 10:45:31
'; - $expected .= '
'; - $this->assertEquals($expected, str_replace(array("\r", "\n"), '', $obj->asXML())); + $expected = << +1mariano5f4dcc3b5aa765d61d8327deb882cf99 +2007-03-17 01:16:232007-03-17 01:18:31 +
11First ArticleFirst Article Body +Y2007-03-18 10:39:232007-03-18 10:41:31
+
31Third ArticleThird Article Body +Y2007-03-18 10:43:232007-03-18 10:45:31
+
+XML; + $this->assertXmlStringEqualsXmlString($expected, $obj->asXML()); //multiple model results - without a records key it would fatal error $data = $user->find('all', array('limit' => 2)); $data = array('records' => $data); $obj = Xml::build(compact('data')); - $expected = '<' . '?xml version="1.0" encoding="UTF-8"?>'; - $expected .= ''; - $expected .= '1mariano5f4dcc3b5aa765d61d8327deb882cf99'; - $expected .= '2007-03-17 01:16:232007-03-17 01:18:31'; - $expected .= '
11First ArticleFirst Article Body'; - $expected .= 'Y2007-03-18 10:39:232007-03-18 10:41:31
'; - $expected .= '
31Third ArticleThird Article Body'; - $expected .= 'Y2007-03-18 10:43:232007-03-18 10:45:31
'; - $expected .= '
2nate5f4dcc3b5aa765d61d8327deb882cf99'; - $expected .= '2007-03-17 01:18:232007-03-17 01:20:31
'; - $expected .= ''; - $expected .= ''; + $expected = << + +1mariano5f4dcc3b5aa765d61d8327deb882cf99 +2007-03-17 01:16:232007-03-17 01:18:31 +
11First ArticleFirst Article Body +Y2007-03-18 10:39:232007-03-18 10:41:31
+
31Third ArticleThird Article Body +Y2007-03-18 10:43:232007-03-18 10:45:31
+
2nate5f4dcc3b5aa765d61d8327deb882cf99 +2007-03-17 01:18:232007-03-17 01:20:31
+ + +XML; $result = $obj->asXML(); - $this->assertEquals($expected, str_replace(array("\r", "\n"), '', $obj->asXML())); + $this->assertXmlStringEqualsXmlString($expected, $obj->asXML()); } /** @@ -901,4 +1034,5 @@ class XmlTest extends CakeTestCase { $result = $obj->asXml(); $this->assertContains('mark & mark', $result); } + } diff --git a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php index 768d7a5f5..cce3ca21b 100644 --- a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 02097c1ac..3835100cb 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index 5ad9a926b..4b7262016 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/Helper/JqueryEngineHelperTest.php b/lib/Cake/Test/Case/View/Helper/JqueryEngineHelperTest.php index e1b644d84..4823f1ec5 100644 --- a/lib/Cake/Test/Case/View/Helper/JqueryEngineHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/JqueryEngineHelperTest.php @@ -4,7 +4,7 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License diff --git a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php index c9da1ec37..8589850a8 100644 --- a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php b/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php index cf1ce7d3f..f75ffd9d1 100644 --- a/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php index e23c67832..6d06541b0 100644 --- a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php index d0831319f..bfffdf4fc 100644 --- a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php index 448865361..62fc004a3 100644 --- a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php index 954d56a55..7538f2094 100644 --- a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php index 899cac45c..ad03fe9eb 100644 --- a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/HelperCollectionTest.php b/lib/Cake/Test/Case/View/HelperCollectionTest.php index a7f222d50..eae0ce372 100644 --- a/lib/Cake/Test/Case/View/HelperCollectionTest.php +++ b/lib/Cake/Test/Case/View/HelperCollectionTest.php @@ -11,7 +11,7 @@ * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/HelperTest.php b/lib/Cake/Test/Case/View/HelperTest.php index 63f32b0b7..65d9d8eb5 100644 --- a/lib/Cake/Test/Case/View/HelperTest.php +++ b/lib/Cake/Test/Case/View/HelperTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/JsonViewTest.php b/lib/Cake/Test/Case/View/JsonViewTest.php index f384ee6ba..39a3e7a1d 100644 --- a/lib/Cake/Test/Case/View/JsonViewTest.php +++ b/lib/Cake/Test/Case/View/JsonViewTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View * @since CakePHP(tm) v 2.1.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/MediaViewTest.php b/lib/Cake/Test/Case/View/MediaViewTest.php index a9f6c3ade..3b723c0bf 100644 --- a/lib/Cake/Test/Case/View/MediaViewTest.php +++ b/lib/Cake/Test/Case/View/MediaViewTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/ScaffoldViewTest.php b/lib/Cake/Test/Case/View/ScaffoldViewTest.php index db5ce096a..bc1c1be9a 100644 --- a/lib/Cake/Test/Case/View/ScaffoldViewTest.php +++ b/lib/Cake/Test/Case/View/ScaffoldViewTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/ThemeViewTest.php b/lib/Cake/Test/Case/View/ThemeViewTest.php index db1265c96..07ddb2562 100644 --- a/lib/Cake/Test/Case/View/ThemeViewTest.php +++ b/lib/Cake/Test/Case/View/ThemeViewTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/ViewTest.php b/lib/Cake/Test/Case/View/ViewTest.php index ccc448b32..ce4e1252e 100644 --- a/lib/Cake/Test/Case/View/ViewTest.php +++ b/lib/Cake/Test/Case/View/ViewTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Case/View/XmlViewTest.php b/lib/Cake/Test/Case/View/XmlViewTest.php index 51243ccb1..9cf3b9ae0 100644 --- a/lib/Cake/Test/Case/View/XmlViewTest.php +++ b/lib/Cake/Test/Case/View/XmlViewTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.View * @since CakePHP(tm) v 2.1.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AccountFixture.php b/lib/Cake/Test/Fixture/AccountFixture.php index fd8614f56..f4619332d 100644 --- a/lib/Cake/Test/Fixture/AccountFixture.php +++ b/lib/Cake/Test/Fixture/AccountFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AcoActionFixture.php b/lib/Cake/Test/Fixture/AcoActionFixture.php index 56d802842..df1bd22a6 100644 --- a/lib/Cake/Test/Fixture/AcoActionFixture.php +++ b/lib/Cake/Test/Fixture/AcoActionFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AcoFixture.php b/lib/Cake/Test/Fixture/AcoFixture.php index 02021c952..d80d3dd08 100644 --- a/lib/Cake/Test/Fixture/AcoFixture.php +++ b/lib/Cake/Test/Fixture/AcoFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AcoTwoFixture.php b/lib/Cake/Test/Fixture/AcoTwoFixture.php index ef01fcde4..af399fa3a 100644 --- a/lib/Cake/Test/Fixture/AcoTwoFixture.php +++ b/lib/Cake/Test/Fixture/AcoTwoFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AdvertisementFixture.php b/lib/Cake/Test/Fixture/AdvertisementFixture.php index 2f4c58e68..3d4f7cb03 100644 --- a/lib/Cake/Test/Fixture/AdvertisementFixture.php +++ b/lib/Cake/Test/Fixture/AdvertisementFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AnotherArticleFixture.php b/lib/Cake/Test/Fixture/AnotherArticleFixture.php index 82ae3cbc1..f580b20a6 100644 --- a/lib/Cake/Test/Fixture/AnotherArticleFixture.php +++ b/lib/Cake/Test/Fixture/AnotherArticleFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AppleFixture.php b/lib/Cake/Test/Fixture/AppleFixture.php index 7f1f491db..a63da6bca 100644 --- a/lib/Cake/Test/Fixture/AppleFixture.php +++ b/lib/Cake/Test/Fixture/AppleFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ArmorFixture.php b/lib/Cake/Test/Fixture/ArmorFixture.php index 30576a50a..135087d2d 100644 --- a/lib/Cake/Test/Fixture/ArmorFixture.php +++ b/lib/Cake/Test/Fixture/ArmorFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 2.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ArmorsPlayerFixture.php b/lib/Cake/Test/Fixture/ArmorsPlayerFixture.php index 56ac88c09..bdd71c524 100644 --- a/lib/Cake/Test/Fixture/ArmorsPlayerFixture.php +++ b/lib/Cake/Test/Fixture/ArmorsPlayerFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 2.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AroFixture.php b/lib/Cake/Test/Fixture/AroFixture.php index 4e6b61a0a..6d63c4d65 100644 --- a/lib/Cake/Test/Fixture/AroFixture.php +++ b/lib/Cake/Test/Fixture/AroFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AroTwoFixture.php b/lib/Cake/Test/Fixture/AroTwoFixture.php index af82f1be0..306567a53 100644 --- a/lib/Cake/Test/Fixture/AroTwoFixture.php +++ b/lib/Cake/Test/Fixture/AroTwoFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ArosAcoFixture.php b/lib/Cake/Test/Fixture/ArosAcoFixture.php index cf3a720cb..0f2ec84f8 100644 --- a/lib/Cake/Test/Fixture/ArosAcoFixture.php +++ b/lib/Cake/Test/Fixture/ArosAcoFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php b/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php index 9bacb19da..e852287f1 100644 --- a/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php +++ b/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ArticleFeaturedFixture.php b/lib/Cake/Test/Fixture/ArticleFeaturedFixture.php index 181535076..52831f491 100644 --- a/lib/Cake/Test/Fixture/ArticleFeaturedFixture.php +++ b/lib/Cake/Test/Fixture/ArticleFeaturedFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ArticleFeaturedsTagsFixture.php b/lib/Cake/Test/Fixture/ArticleFeaturedsTagsFixture.php index 462413b22..3ae0acf1f 100644 --- a/lib/Cake/Test/Fixture/ArticleFeaturedsTagsFixture.php +++ b/lib/Cake/Test/Fixture/ArticleFeaturedsTagsFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ArticleFixture.php b/lib/Cake/Test/Fixture/ArticleFixture.php index 1b82033d0..617a3ad41 100644 --- a/lib/Cake/Test/Fixture/ArticleFixture.php +++ b/lib/Cake/Test/Fixture/ArticleFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ArticlesTagFixture.php b/lib/Cake/Test/Fixture/ArticlesTagFixture.php index bb63463bb..37908b50a 100644 --- a/lib/Cake/Test/Fixture/ArticlesTagFixture.php +++ b/lib/Cake/Test/Fixture/ArticlesTagFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AttachmentFixture.php b/lib/Cake/Test/Fixture/AttachmentFixture.php index 8e3143455..e322c1ac8 100644 --- a/lib/Cake/Test/Fixture/AttachmentFixture.php +++ b/lib/Cake/Test/Fixture/AttachmentFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AuthUserCustomFieldFixture.php b/lib/Cake/Test/Fixture/AuthUserCustomFieldFixture.php index 8b3e62fef..88ec58656 100644 --- a/lib/Cake/Test/Fixture/AuthUserCustomFieldFixture.php +++ b/lib/Cake/Test/Fixture/AuthUserCustomFieldFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.1.8013 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AuthUserFixture.php b/lib/Cake/Test/Fixture/AuthUserFixture.php index a205ff5eb..eab2a399f 100644 --- a/lib/Cake/Test/Fixture/AuthUserFixture.php +++ b/lib/Cake/Test/Fixture/AuthUserFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/AuthorFixture.php b/lib/Cake/Test/Fixture/AuthorFixture.php index a2ebe8ac9..02a191fb1 100644 --- a/lib/Cake/Test/Fixture/AuthorFixture.php +++ b/lib/Cake/Test/Fixture/AuthorFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BakeArticleFixture.php b/lib/Cake/Test/Fixture/BakeArticleFixture.php index c4eb9f78e..8b322fa90 100644 --- a/lib/Cake/Test/Fixture/BakeArticleFixture.php +++ b/lib/Cake/Test/Fixture/BakeArticleFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BakeArticlesBakeTagFixture.php b/lib/Cake/Test/Fixture/BakeArticlesBakeTagFixture.php index 893e4e437..b1351dffe 100644 --- a/lib/Cake/Test/Fixture/BakeArticlesBakeTagFixture.php +++ b/lib/Cake/Test/Fixture/BakeArticlesBakeTagFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BakeCommentFixture.php b/lib/Cake/Test/Fixture/BakeCommentFixture.php index d0a89e8c7..6224b1058 100644 --- a/lib/Cake/Test/Fixture/BakeCommentFixture.php +++ b/lib/Cake/Test/Fixture/BakeCommentFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BakeTagFixture.php b/lib/Cake/Test/Fixture/BakeTagFixture.php index 78d482d06..8b8287965 100644 --- a/lib/Cake/Test/Fixture/BakeTagFixture.php +++ b/lib/Cake/Test/Fixture/BakeTagFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BasketFixture.php b/lib/Cake/Test/Fixture/BasketFixture.php index 3025b0a83..c70986356 100644 --- a/lib/Cake/Test/Fixture/BasketFixture.php +++ b/lib/Cake/Test/Fixture/BasketFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BidFixture.php b/lib/Cake/Test/Fixture/BidFixture.php index 73ece4777..ef93dff79 100644 --- a/lib/Cake/Test/Fixture/BidFixture.php +++ b/lib/Cake/Test/Fixture/BidFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BiddingFixture.php b/lib/Cake/Test/Fixture/BiddingFixture.php index 3a6877fe7..12791a453 100644 --- a/lib/Cake/Test/Fixture/BiddingFixture.php +++ b/lib/Cake/Test/Fixture/BiddingFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.3.14 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BiddingMessageFixture.php b/lib/Cake/Test/Fixture/BiddingMessageFixture.php index 31ddcd646..d19502ad1 100644 --- a/lib/Cake/Test/Fixture/BiddingMessageFixture.php +++ b/lib/Cake/Test/Fixture/BiddingMessageFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.3.14 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BinaryTestFixture.php b/lib/Cake/Test/Fixture/BinaryTestFixture.php index 1605a35b5..df0ab66d9 100644 --- a/lib/Cake/Test/Fixture/BinaryTestFixture.php +++ b/lib/Cake/Test/Fixture/BinaryTestFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.6700 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/BookFixture.php b/lib/Cake/Test/Fixture/BookFixture.php index 23ca8cbd6..6cfaf5460 100644 --- a/lib/Cake/Test/Fixture/BookFixture.php +++ b/lib/Cake/Test/Fixture/BookFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.7198 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CacheTestModelFixture.php b/lib/Cake/Test/Fixture/CacheTestModelFixture.php index 21c7b5fdf..ae6fbb4a6 100644 --- a/lib/Cake/Test/Fixture/CacheTestModelFixture.php +++ b/lib/Cake/Test/Fixture/CacheTestModelFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CallbackFixture.php b/lib/Cake/Test/Fixture/CallbackFixture.php index 61733df7c..b53dd0af8 100644 --- a/lib/Cake/Test/Fixture/CallbackFixture.php +++ b/lib/Cake/Test/Fixture/CallbackFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CategoryFixture.php b/lib/Cake/Test/Fixture/CategoryFixture.php index d300e6b7e..664bcf9e6 100644 --- a/lib/Cake/Test/Fixture/CategoryFixture.php +++ b/lib/Cake/Test/Fixture/CategoryFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CategoryThreadFixture.php b/lib/Cake/Test/Fixture/CategoryThreadFixture.php index a938561ce..d1b2d1f72 100644 --- a/lib/Cake/Test/Fixture/CategoryThreadFixture.php +++ b/lib/Cake/Test/Fixture/CategoryThreadFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CdFixture.php b/lib/Cake/Test/Fixture/CdFixture.php index 94e8c7467..5f93c56fe 100644 --- a/lib/Cake/Test/Fixture/CdFixture.php +++ b/lib/Cake/Test/Fixture/CdFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.7198 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CommentFixture.php b/lib/Cake/Test/Fixture/CommentFixture.php index 69f584e89..71ae13e62 100644 --- a/lib/Cake/Test/Fixture/CommentFixture.php +++ b/lib/Cake/Test/Fixture/CommentFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ContentAccountFixture.php b/lib/Cake/Test/Fixture/ContentAccountFixture.php index 1bb945b54..aa6e374a0 100644 --- a/lib/Cake/Test/Fixture/ContentAccountFixture.php +++ b/lib/Cake/Test/Fixture/ContentAccountFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ContentFixture.php b/lib/Cake/Test/Fixture/ContentFixture.php index 68e178b75..2ea7d9210 100644 --- a/lib/Cake/Test/Fixture/ContentFixture.php +++ b/lib/Cake/Test/Fixture/ContentFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CounterCachePostFixture.php b/lib/Cake/Test/Fixture/CounterCachePostFixture.php index 62d15e4eb..0ba496b7f 100644 --- a/lib/Cake/Test/Fixture/CounterCachePostFixture.php +++ b/lib/Cake/Test/Fixture/CounterCachePostFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php b/lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php index 3f66c2d80..911187aa7 100644 --- a/lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php +++ b/lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CounterCacheUserFixture.php b/lib/Cake/Test/Fixture/CounterCacheUserFixture.php index 8c44e2097..fd5883487 100644 --- a/lib/Cake/Test/Fixture/CounterCacheUserFixture.php +++ b/lib/Cake/Test/Fixture/CounterCacheUserFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/CounterCacheUserNonstandardPrimaryKeyFixture.php b/lib/Cake/Test/Fixture/CounterCacheUserNonstandardPrimaryKeyFixture.php index b920450bd..74f07f7be 100644 --- a/lib/Cake/Test/Fixture/CounterCacheUserNonstandardPrimaryKeyFixture.php +++ b/lib/Cake/Test/Fixture/CounterCacheUserNonstandardPrimaryKeyFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/DataTestFixture.php b/lib/Cake/Test/Fixture/DataTestFixture.php index 8f2a6e78f..cb4937be6 100644 --- a/lib/Cake/Test/Fixture/DataTestFixture.php +++ b/lib/Cake/Test/Fixture/DataTestFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.6700 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/DeviceFixture.php b/lib/Cake/Test/Fixture/DeviceFixture.php index ef5c9f5e5..5eb07a171 100644 --- a/lib/Cake/Test/Fixture/DeviceFixture.php +++ b/lib/Cake/Test/Fixture/DeviceFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/DeviceTypeCategoryFixture.php b/lib/Cake/Test/Fixture/DeviceTypeCategoryFixture.php index f5573b265..fa56f5097 100644 --- a/lib/Cake/Test/Fixture/DeviceTypeCategoryFixture.php +++ b/lib/Cake/Test/Fixture/DeviceTypeCategoryFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/DeviceTypeFixture.php b/lib/Cake/Test/Fixture/DeviceTypeFixture.php index 0e1ad309f..a5271dd5e 100644 --- a/lib/Cake/Test/Fixture/DeviceTypeFixture.php +++ b/lib/Cake/Test/Fixture/DeviceTypeFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/DocumentDirectoryFixture.php b/lib/Cake/Test/Fixture/DocumentDirectoryFixture.php index 65e117ae5..29bc89cd2 100644 --- a/lib/Cake/Test/Fixture/DocumentDirectoryFixture.php +++ b/lib/Cake/Test/Fixture/DocumentDirectoryFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/DocumentFixture.php b/lib/Cake/Test/Fixture/DocumentFixture.php index 48a4461f1..94d39600f 100644 --- a/lib/Cake/Test/Fixture/DocumentFixture.php +++ b/lib/Cake/Test/Fixture/DocumentFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/DomainFixture.php b/lib/Cake/Test/Fixture/DomainFixture.php index 0dc66e85e..87dd35f48 100644 --- a/lib/Cake/Test/Fixture/DomainFixture.php +++ b/lib/Cake/Test/Fixture/DomainFixture.php @@ -4,14 +4,14 @@ * * PHP versions 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 2.1 diff --git a/lib/Cake/Test/Fixture/DomainsSiteFixture.php b/lib/Cake/Test/Fixture/DomainsSiteFixture.php index fa616d331..8ee1682a4 100644 --- a/lib/Cake/Test/Fixture/DomainsSiteFixture.php +++ b/lib/Cake/Test/Fixture/DomainsSiteFixture.php @@ -4,14 +4,14 @@ * * PHP versions 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 2.1 diff --git a/lib/Cake/Test/Fixture/ExteriorTypeCategoryFixture.php b/lib/Cake/Test/Fixture/ExteriorTypeCategoryFixture.php index d173b57af..8ab3bbcea 100644 --- a/lib/Cake/Test/Fixture/ExteriorTypeCategoryFixture.php +++ b/lib/Cake/Test/Fixture/ExteriorTypeCategoryFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/FeatureSetFixture.php b/lib/Cake/Test/Fixture/FeatureSetFixture.php index 7911f547e..589279979 100644 --- a/lib/Cake/Test/Fixture/FeatureSetFixture.php +++ b/lib/Cake/Test/Fixture/FeatureSetFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/FeaturedFixture.php b/lib/Cake/Test/Fixture/FeaturedFixture.php index 303f8d4e5..d13037372 100644 --- a/lib/Cake/Test/Fixture/FeaturedFixture.php +++ b/lib/Cake/Test/Fixture/FeaturedFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/FilmFileFixture.php b/lib/Cake/Test/Fixture/FilmFileFixture.php index 1a41a91d7..cc82fc6f4 100644 --- a/lib/Cake/Test/Fixture/FilmFileFixture.php +++ b/lib/Cake/Test/Fixture/FilmFileFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/FlagTreeFixture.php b/lib/Cake/Test/Fixture/FlagTreeFixture.php index 7293de562..e775e8fa7 100644 --- a/lib/Cake/Test/Fixture/FlagTreeFixture.php +++ b/lib/Cake/Test/Fixture/FlagTreeFixture.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.5331 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/FruitFixture.php b/lib/Cake/Test/Fixture/FruitFixture.php index 56dd77168..41ce73095 100644 --- a/lib/Cake/Test/Fixture/FruitFixture.php +++ b/lib/Cake/Test/Fixture/FruitFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.7953 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/FruitsUuidTagFixture.php b/lib/Cake/Test/Fixture/FruitsUuidTagFixture.php index 9b0454610..aebb4a75c 100644 --- a/lib/Cake/Test/Fixture/FruitsUuidTagFixture.php +++ b/lib/Cake/Test/Fixture/FruitsUuidTagFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.7953 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/GroupUpdateAllFixture.php b/lib/Cake/Test/Fixture/GroupUpdateAllFixture.php index 94a47b716..bcfc517ea 100644 --- a/lib/Cake/Test/Fixture/GroupUpdateAllFixture.php +++ b/lib/Cake/Test/Fixture/GroupUpdateAllFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/GuildFixture.php b/lib/Cake/Test/Fixture/GuildFixture.php index 5913a25ed..8f7d91267 100644 --- a/lib/Cake/Test/Fixture/GuildFixture.php +++ b/lib/Cake/Test/Fixture/GuildFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 2.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/GuildsPlayerFixture.php b/lib/Cake/Test/Fixture/GuildsPlayerFixture.php index bfe54aeba..c82d59a5a 100644 --- a/lib/Cake/Test/Fixture/GuildsPlayerFixture.php +++ b/lib/Cake/Test/Fixture/GuildsPlayerFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 2.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/HomeFixture.php b/lib/Cake/Test/Fixture/HomeFixture.php index 40406318b..8ed74c536 100644 --- a/lib/Cake/Test/Fixture/HomeFixture.php +++ b/lib/Cake/Test/Fixture/HomeFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ImageFixture.php b/lib/Cake/Test/Fixture/ImageFixture.php index a03c3a4a0..8a148475e 100644 --- a/lib/Cake/Test/Fixture/ImageFixture.php +++ b/lib/Cake/Test/Fixture/ImageFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ItemFixture.php b/lib/Cake/Test/Fixture/ItemFixture.php index c8efd14d5..b1293d3d8 100644 --- a/lib/Cake/Test/Fixture/ItemFixture.php +++ b/lib/Cake/Test/Fixture/ItemFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ItemsPortfolioFixture.php b/lib/Cake/Test/Fixture/ItemsPortfolioFixture.php index d782f161e..5c16e2ec0 100644 --- a/lib/Cake/Test/Fixture/ItemsPortfolioFixture.php +++ b/lib/Cake/Test/Fixture/ItemsPortfolioFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/JoinABFixture.php b/lib/Cake/Test/Fixture/JoinABFixture.php index b1d913eb9..641d36d28 100644 --- a/lib/Cake/Test/Fixture/JoinABFixture.php +++ b/lib/Cake/Test/Fixture/JoinABFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.6317 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/JoinACFixture.php b/lib/Cake/Test/Fixture/JoinACFixture.php index f4afd0788..d698c32af 100644 --- a/lib/Cake/Test/Fixture/JoinACFixture.php +++ b/lib/Cake/Test/Fixture/JoinACFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.6317 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/JoinAFixture.php b/lib/Cake/Test/Fixture/JoinAFixture.php index ce0daa543..97b69585e 100644 --- a/lib/Cake/Test/Fixture/JoinAFixture.php +++ b/lib/Cake/Test/Fixture/JoinAFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.6317 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/JoinBFixture.php b/lib/Cake/Test/Fixture/JoinBFixture.php index 2db80ead3..464b59339 100644 --- a/lib/Cake/Test/Fixture/JoinBFixture.php +++ b/lib/Cake/Test/Fixture/JoinBFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.6317 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/JoinCFixture.php b/lib/Cake/Test/Fixture/JoinCFixture.php index aea534276..100868cce 100644 --- a/lib/Cake/Test/Fixture/JoinCFixture.php +++ b/lib/Cake/Test/Fixture/JoinCFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.6317 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/JoinThingFixture.php b/lib/Cake/Test/Fixture/JoinThingFixture.php index 3f7c003f8..72186cb48 100644 --- a/lib/Cake/Test/Fixture/JoinThingFixture.php +++ b/lib/Cake/Test/Fixture/JoinThingFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/MessageFixture.php b/lib/Cake/Test/Fixture/MessageFixture.php index 1abd3b8ba..323726018 100644 --- a/lib/Cake/Test/Fixture/MessageFixture.php +++ b/lib/Cake/Test/Fixture/MessageFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/MyCategoriesMyProductsFixture.php b/lib/Cake/Test/Fixture/MyCategoriesMyProductsFixture.php index c5494cfc4..b83a0d2d2 100644 --- a/lib/Cake/Test/Fixture/MyCategoriesMyProductsFixture.php +++ b/lib/Cake/Test/Fixture/MyCategoriesMyProductsFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/MyCategoriesMyUsersFixture.php b/lib/Cake/Test/Fixture/MyCategoriesMyUsersFixture.php index 9db9f5b8e..81c1615c4 100644 --- a/lib/Cake/Test/Fixture/MyCategoriesMyUsersFixture.php +++ b/lib/Cake/Test/Fixture/MyCategoriesMyUsersFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/MyCategoryFixture.php b/lib/Cake/Test/Fixture/MyCategoryFixture.php index da4cdf027..ea66687a8 100644 --- a/lib/Cake/Test/Fixture/MyCategoryFixture.php +++ b/lib/Cake/Test/Fixture/MyCategoryFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/MyProductFixture.php b/lib/Cake/Test/Fixture/MyProductFixture.php index 6415afcc7..ed47e27d9 100644 --- a/lib/Cake/Test/Fixture/MyProductFixture.php +++ b/lib/Cake/Test/Fixture/MyProductFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/MyUserFixture.php b/lib/Cake/Test/Fixture/MyUserFixture.php index 64af1f058..8a13bdd0f 100644 --- a/lib/Cake/Test/Fixture/MyUserFixture.php +++ b/lib/Cake/Test/Fixture/MyUserFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/NumberTreeFixture.php b/lib/Cake/Test/Fixture/NumberTreeFixture.php index 0ed30682f..d831a7263 100644 --- a/lib/Cake/Test/Fixture/NumberTreeFixture.php +++ b/lib/Cake/Test/Fixture/NumberTreeFixture.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.5331 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/NumberTreeTwoFixture.php b/lib/Cake/Test/Fixture/NumberTreeTwoFixture.php index e0f7a6cee..0ab4bd54e 100644 --- a/lib/Cake/Test/Fixture/NumberTreeTwoFixture.php +++ b/lib/Cake/Test/Fixture/NumberTreeTwoFixture.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.5331 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/NumericArticleFixture.php b/lib/Cake/Test/Fixture/NumericArticleFixture.php index e72ab3ec7..49d759357 100644 --- a/lib/Cake/Test/Fixture/NumericArticleFixture.php +++ b/lib/Cake/Test/Fixture/NumericArticleFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/OverallFavoriteFixture.php b/lib/Cake/Test/Fixture/OverallFavoriteFixture.php index 6e9833823..1c8b83b45 100644 --- a/lib/Cake/Test/Fixture/OverallFavoriteFixture.php +++ b/lib/Cake/Test/Fixture/OverallFavoriteFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.7198 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/PersonFixture.php b/lib/Cake/Test/Fixture/PersonFixture.php index 367bf818d..a05575d45 100644 --- a/lib/Cake/Test/Fixture/PersonFixture.php +++ b/lib/Cake/Test/Fixture/PersonFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.6700 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/PlayerFixture.php b/lib/Cake/Test/Fixture/PlayerFixture.php index b334707c3..6e23eb024 100644 --- a/lib/Cake/Test/Fixture/PlayerFixture.php +++ b/lib/Cake/Test/Fixture/PlayerFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 2.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/PortfolioFixture.php b/lib/Cake/Test/Fixture/PortfolioFixture.php index 52c59fe52..3b43d8707 100644 --- a/lib/Cake/Test/Fixture/PortfolioFixture.php +++ b/lib/Cake/Test/Fixture/PortfolioFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/PostFixture.php b/lib/Cake/Test/Fixture/PostFixture.php index 5e4b3c44e..a3badd871 100644 --- a/lib/Cake/Test/Fixture/PostFixture.php +++ b/lib/Cake/Test/Fixture/PostFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/PostsTagFixture.php b/lib/Cake/Test/Fixture/PostsTagFixture.php index 98c743381..9d49f5882 100644 --- a/lib/Cake/Test/Fixture/PostsTagFixture.php +++ b/lib/Cake/Test/Fixture/PostsTagFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/PrefixTestFixture.php b/lib/Cake/Test/Fixture/PrefixTestFixture.php index b4c5d9e6a..37073dc67 100644 --- a/lib/Cake/Test/Fixture/PrefixTestFixture.php +++ b/lib/Cake/Test/Fixture/PrefixTestFixture.php @@ -4,14 +4,14 @@ * * PHP versions 4 and 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 1.2.0.4667 diff --git a/lib/Cake/Test/Fixture/PrimaryModelFixture.php b/lib/Cake/Test/Fixture/PrimaryModelFixture.php index 5524d52c2..b9f11662a 100644 --- a/lib/Cake/Test/Fixture/PrimaryModelFixture.php +++ b/lib/Cake/Test/Fixture/PrimaryModelFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ProductFixture.php b/lib/Cake/Test/Fixture/ProductFixture.php index 49d65dd21..8156bc773 100644 --- a/lib/Cake/Test/Fixture/ProductFixture.php +++ b/lib/Cake/Test/Fixture/ProductFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ProductUpdateAllFixture.php b/lib/Cake/Test/Fixture/ProductUpdateAllFixture.php index 1aa60b90d..243b2df59 100644 --- a/lib/Cake/Test/Fixture/ProductUpdateAllFixture.php +++ b/lib/Cake/Test/Fixture/ProductUpdateAllFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ProjectFixture.php b/lib/Cake/Test/Fixture/ProjectFixture.php index 8eec0b6c5..bbf98a405 100644 --- a/lib/Cake/Test/Fixture/ProjectFixture.php +++ b/lib/Cake/Test/Fixture/ProjectFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/SampleFixture.php b/lib/Cake/Test/Fixture/SampleFixture.php index 371a1c560..a25b03224 100644 --- a/lib/Cake/Test/Fixture/SampleFixture.php +++ b/lib/Cake/Test/Fixture/SampleFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/SecondaryModelFixture.php b/lib/Cake/Test/Fixture/SecondaryModelFixture.php index 0c8e77a70..8159c5bc3 100644 --- a/lib/Cake/Test/Fixture/SecondaryModelFixture.php +++ b/lib/Cake/Test/Fixture/SecondaryModelFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/SessionFixture.php b/lib/Cake/Test/Fixture/SessionFixture.php index fa4e4e0bf..20fb517e6 100644 --- a/lib/Cake/Test/Fixture/SessionFixture.php +++ b/lib/Cake/Test/Fixture/SessionFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/SiteFixture.php b/lib/Cake/Test/Fixture/SiteFixture.php index 9e0aa4865..00458e588 100644 --- a/lib/Cake/Test/Fixture/SiteFixture.php +++ b/lib/Cake/Test/Fixture/SiteFixture.php @@ -4,14 +4,14 @@ * * PHP versions 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The Open Group Test Suite License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package cake * @subpackage cake.tests.fixtures * @since CakePHP(tm) v 2.1 diff --git a/lib/Cake/Test/Fixture/SomethingElseFixture.php b/lib/Cake/Test/Fixture/SomethingElseFixture.php index 152160a1a..b76ddcda3 100644 --- a/lib/Cake/Test/Fixture/SomethingElseFixture.php +++ b/lib/Cake/Test/Fixture/SomethingElseFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/SomethingFixture.php b/lib/Cake/Test/Fixture/SomethingFixture.php index 146fb3f0b..156a11723 100644 --- a/lib/Cake/Test/Fixture/SomethingFixture.php +++ b/lib/Cake/Test/Fixture/SomethingFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/StoriesTagFixture.php b/lib/Cake/Test/Fixture/StoriesTagFixture.php index d533661c7..7c09d0f09 100644 --- a/lib/Cake/Test/Fixture/StoriesTagFixture.php +++ b/lib/Cake/Test/Fixture/StoriesTagFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/StoryFixture.php b/lib/Cake/Test/Fixture/StoryFixture.php index 5cd430478..13d6442c6 100644 --- a/lib/Cake/Test/Fixture/StoryFixture.php +++ b/lib/Cake/Test/Fixture/StoryFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/SyfileFixture.php b/lib/Cake/Test/Fixture/SyfileFixture.php index 012cbf088..8c18b3acb 100644 --- a/lib/Cake/Test/Fixture/SyfileFixture.php +++ b/lib/Cake/Test/Fixture/SyfileFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/TagFixture.php b/lib/Cake/Test/Fixture/TagFixture.php index d62411168..11d0acc3b 100644 --- a/lib/Cake/Test/Fixture/TagFixture.php +++ b/lib/Cake/Test/Fixture/TagFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/TestPluginArticleFixture.php b/lib/Cake/Test/Fixture/TestPluginArticleFixture.php index f0925e3ec..03d8872df 100644 --- a/lib/Cake/Test/Fixture/TestPluginArticleFixture.php +++ b/lib/Cake/Test/Fixture/TestPluginArticleFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 7660 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/TestPluginCommentFixture.php b/lib/Cake/Test/Fixture/TestPluginCommentFixture.php index 6eb01046a..ed36009e2 100644 --- a/lib/Cake/Test/Fixture/TestPluginCommentFixture.php +++ b/lib/Cake/Test/Fixture/TestPluginCommentFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 7660 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ThePaperMonkiesFixture.php b/lib/Cake/Test/Fixture/ThePaperMonkiesFixture.php index e920a08c5..6817bef26 100644 --- a/lib/Cake/Test/Fixture/ThePaperMonkiesFixture.php +++ b/lib/Cake/Test/Fixture/ThePaperMonkiesFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/ThreadFixture.php b/lib/Cake/Test/Fixture/ThreadFixture.php index 0dc1895cc..5049c8528 100644 --- a/lib/Cake/Test/Fixture/ThreadFixture.php +++ b/lib/Cake/Test/Fixture/ThreadFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/TranslateArticleFixture.php b/lib/Cake/Test/Fixture/TranslateArticleFixture.php index 380c516d4..2fcfd9672 100644 --- a/lib/Cake/Test/Fixture/TranslateArticleFixture.php +++ b/lib/Cake/Test/Fixture/TranslateArticleFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.5669 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -58,23 +58,23 @@ class TranslateArticleFixture extends CakeTestFixture { * @var array */ public $records = array( - array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title (eng) #1'), - array('id' => 2, 'locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'body', 'content' => 'Body (eng) #1'), - array('id' => 3, 'locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title (deu) #1'), - array('id' => 4, 'locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'body', 'content' => 'Body (deu) #1'), - array('id' => 5, 'locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title (cze) #1'), - array('id' => 6, 'locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'body', 'content' => 'Body (cze) #1'), - array('id' => 7, 'locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'title', 'content' => 'Title (eng) #2'), - array('id' => 8, 'locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'body', 'content' => 'Body (eng) #2'), - array('id' => 9, 'locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'title', 'content' => 'Title (deu) #2'), - array('id' => 10, 'locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'body', 'content' => 'Body (deu) #2'), - array('id' => 11, 'locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'title', 'content' => 'Title (cze) #2'), - array('id' => 12, 'locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'body', 'content' => 'Body (cze) #2'), - array('id' => 13, 'locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'title', 'content' => 'Title (eng) #3'), - array('id' => 14, 'locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'body', 'content' => 'Body (eng) #3'), - array('id' => 15, 'locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'title', 'content' => 'Title (deu) #3'), - array('id' => 16, 'locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'body', 'content' => 'Body (deu) #3'), - array('id' => 17, 'locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'title', 'content' => 'Title (cze) #3'), - array('id' => 18, 'locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'body', 'content' => 'Body (cze) #3') + array('locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title (eng) #1'), + array('locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'body', 'content' => 'Body (eng) #1'), + array('locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title (deu) #1'), + array('locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'body', 'content' => 'Body (deu) #1'), + array('locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title (cze) #1'), + array('locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'body', 'content' => 'Body (cze) #1'), + array('locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'title', 'content' => 'Title (eng) #2'), + array('locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'body', 'content' => 'Body (eng) #2'), + array('locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'title', 'content' => 'Title (deu) #2'), + array('locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'body', 'content' => 'Body (deu) #2'), + array('locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'title', 'content' => 'Title (cze) #2'), + array('locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 2, 'field' => 'body', 'content' => 'Body (cze) #2'), + array('locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'title', 'content' => 'Title (eng) #3'), + array('locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'body', 'content' => 'Body (eng) #3'), + array('locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'title', 'content' => 'Title (deu) #3'), + array('locale' => 'deu', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'body', 'content' => 'Body (deu) #3'), + array('locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'title', 'content' => 'Title (cze) #3'), + array('locale' => 'cze', 'model' => 'TranslatedArticle', 'foreign_key' => 3, 'field' => 'body', 'content' => 'Body (cze) #3') ); } diff --git a/lib/Cake/Test/Fixture/TranslateFixture.php b/lib/Cake/Test/Fixture/TranslateFixture.php index 90a8fedbb..ea3632c50 100644 --- a/lib/Cake/Test/Fixture/TranslateFixture.php +++ b/lib/Cake/Test/Fixture/TranslateFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.5669 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/TranslateTableFixture.php b/lib/Cake/Test/Fixture/TranslateTableFixture.php index 4860f76ce..c8f9a14b5 100644 --- a/lib/Cake/Test/Fixture/TranslateTableFixture.php +++ b/lib/Cake/Test/Fixture/TranslateTableFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.5669 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php b/lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php index 90dcf2f8b..2d5d30d19 100644 --- a/lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php +++ b/lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php @@ -6,14 +6,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.5669 * @version $Revision$ diff --git a/lib/Cake/Test/Fixture/TranslatedArticleFixture.php b/lib/Cake/Test/Fixture/TranslatedArticleFixture.php index aa827daca..7066486c4 100644 --- a/lib/Cake/Test/Fixture/TranslatedArticleFixture.php +++ b/lib/Cake/Test/Fixture/TranslatedArticleFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.5669 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/TranslatedItemFixture.php b/lib/Cake/Test/Fixture/TranslatedItemFixture.php index ffd688180..3d5490371 100644 --- a/lib/Cake/Test/Fixture/TranslatedItemFixture.php +++ b/lib/Cake/Test/Fixture/TranslatedItemFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.5669 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -38,6 +38,7 @@ class TranslatedItemFixture extends CakeTestFixture { */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), + 'translated_article_id' => array('type' => 'integer'), 'slug' => array('type' => 'string', 'null' => false) ); @@ -47,8 +48,8 @@ class TranslatedItemFixture extends CakeTestFixture { * @var array */ public $records = array( - array('slug' => 'first_translated'), - array('slug' => 'second_translated'), - array('slug' => 'third_translated') + array('translated_article_id' => 1, 'slug' => 'first_translated'), + array('translated_article_id' => 1, 'slug' => 'second_translated'), + array('translated_article_id' => 1, 'slug' => 'third_translated') ); } diff --git a/lib/Cake/Test/Fixture/UnconventionalTreeFixture.php b/lib/Cake/Test/Fixture/UnconventionalTreeFixture.php index b3b55d934..7eb96f834 100644 --- a/lib/Cake/Test/Fixture/UnconventionalTreeFixture.php +++ b/lib/Cake/Test/Fixture/UnconventionalTreeFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.7879 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/UnderscoreFieldFixture.php b/lib/Cake/Test/Fixture/UnderscoreFieldFixture.php index 7bb37554d..22bb31580 100644 --- a/lib/Cake/Test/Fixture/UnderscoreFieldFixture.php +++ b/lib/Cake/Test/Fixture/UnderscoreFieldFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/UserFixture.php b/lib/Cake/Test/Fixture/UserFixture.php index 9f43ac6a6..5a81876ad 100644 --- a/lib/Cake/Test/Fixture/UserFixture.php +++ b/lib/Cake/Test/Fixture/UserFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/UuidFixture.php b/lib/Cake/Test/Fixture/UuidFixture.php index 329159951..cf7cdc3c3 100644 --- a/lib/Cake/Test/Fixture/UuidFixture.php +++ b/lib/Cake/Test/Fixture/UuidFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.6700 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/UuidTagFixture.php b/lib/Cake/Test/Fixture/UuidTagFixture.php index 158ac8ea0..744f1179c 100644 --- a/lib/Cake/Test/Fixture/UuidTagFixture.php +++ b/lib/Cake/Test/Fixture/UuidTagFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.7953 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/UuidTreeFixture.php b/lib/Cake/Test/Fixture/UuidTreeFixture.php index fcb2f2dca..2431f5669 100644 --- a/lib/Cake/Test/Fixture/UuidTreeFixture.php +++ b/lib/Cake/Test/Fixture/UuidTreeFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.7984 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/UuiditemFixture.php b/lib/Cake/Test/Fixture/UuiditemFixture.php index 46ee1bd74..fb04e3e3f 100644 --- a/lib/Cake/Test/Fixture/UuiditemFixture.php +++ b/lib/Cake/Test/Fixture/UuiditemFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/UuiditemsUuidportfolioFixture.php b/lib/Cake/Test/Fixture/UuiditemsUuidportfolioFixture.php index a13e3eb3e..c2d85236d 100644 --- a/lib/Cake/Test/Fixture/UuiditemsUuidportfolioFixture.php +++ b/lib/Cake/Test/Fixture/UuiditemsUuidportfolioFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/UuiditemsUuidportfolioNumericidFixture.php b/lib/Cake/Test/Fixture/UuiditemsUuidportfolioNumericidFixture.php index bf47797ca..c3c7a2e6f 100644 --- a/lib/Cake/Test/Fixture/UuiditemsUuidportfolioNumericidFixture.php +++ b/lib/Cake/Test/Fixture/UuiditemsUuidportfolioNumericidFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/Fixture/UuidportfolioFixture.php b/lib/Cake/Test/Fixture/UuidportfolioFixture.php index 0aeaec61d..fbb4d9256 100644 --- a/lib/Cake/Test/Fixture/UuidportfolioFixture.php +++ b/lib/Cake/Test/Fixture/UuidportfolioFixture.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Console/Command/SampleShell.php b/lib/Cake/Test/test_app/Console/Command/SampleShell.php index 22cdac1da..6af95ce1b 100644 --- a/lib/Cake/Test/test_app/Console/Command/SampleShell.php +++ b/lib/Cake/Test/test_app/Console/Command/SampleShell.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Console.Command * @since CakePHP(tm) v 1.2.0.7871 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Controller/AppController.php b/lib/Cake/Test/test_app/Controller/AppController.php index 6e8386849..0414cee54 100644 --- a/lib/Cake/Test/test_app/Controller/AppController.php +++ b/lib/Cake/Test/test_app/Controller/AppController.php @@ -30,7 +30,7 @@ App::uses('Controller', 'Controller'); * will inherit them. * * @package Cake.Controller - * @link http://book.cakephp.org/view/957/The-App-Controller + * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller */ class AppController extends Controller { } diff --git a/lib/Cake/Test/test_app/Controller/TestsAppsController.php b/lib/Cake/Test/test_app/Controller/TestsAppsController.php index 75586372a..2e8243cca 100644 --- a/lib/Cake/Test/test_app/Controller/TestsAppsController.php +++ b/lib/Cake/Test/test_app/Controller/TestsAppsController.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Controller * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Controller/TestsAppsPostsController.php b/lib/Cake/Test/test_app/Controller/TestsAppsPostsController.php index 0a1bc116a..8ae0ae123 100644 --- a/lib/Cake/Test/test_app/Controller/TestsAppsPostsController.php +++ b/lib/Cake/Test/test_app/Controller/TestsAppsPostsController.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Controller * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Lib/Cache/Engine/TestAppCacheEngine.php b/lib/Cake/Test/test_app/Lib/Cache/Engine/TestAppCacheEngine.php index 36d86b8cb..1eb4908a1 100644 --- a/lib/Cake/Test/test_app/Lib/Cache/Engine/TestAppCacheEngine.php +++ b/lib/Cake/Test/test_app/Lib/Cache/Engine/TestAppCacheEngine.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Lib.Cache.Engine * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Lib/Library.php b/lib/Cake/Test/test_app/Lib/Library.php index 629197482..261825923 100644 --- a/lib/Cake/Test/test_app/Lib/Library.php +++ b/lib/Cake/Test/test_app/Lib/Library.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Lib * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Lib/Log/Engine/TestAppLog.php b/lib/Cake/Test/test_app/Lib/Log/Engine/TestAppLog.php index e17823d35..0acb792a1 100644 --- a/lib/Cake/Test/test_app/Lib/Log/Engine/TestAppLog.php +++ b/lib/Cake/Test/test_app/Lib/Log/Engine/TestAppLog.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Lib.Log.Engine * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Lib/Utility/TestUtilityClass.php b/lib/Cake/Test/test_app/Lib/Utility/TestUtilityClass.php index 78cb018e2..d2b3d2dc2 100644 --- a/lib/Cake/Test/test_app/Lib/Utility/TestUtilityClass.php +++ b/lib/Cake/Test/test_app/Lib/Utility/TestUtilityClass.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Lib.Utility * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Config/load.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Config/load.php index ef6274c22..efe50c241 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Config/load.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Config/load.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Config * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Config/more.load.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Config/more.load.php index d7925d685..14853535e 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Config/more.load.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Config/more.load.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Config * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/ExampleShell.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/ExampleShell.php index 31debdd26..67c602172 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/ExampleShell.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/ExampleShell.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Console.Command * @since CakePHP(tm) v 1.2.0.7871 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/Task/OtherTaskTask.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/Task/OtherTaskTask.php index 4a79d28d7..26b502523 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/Task/OtherTaskTask.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/Task/OtherTaskTask.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Console.Command.Task * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/OtherComponent.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/OtherComponent.php index 128c367bd..69d93b226 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/OtherComponent.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/OtherComponent.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Controller.Component * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/PluginsComponent.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/PluginsComponent.php index b4c2244fb..ffd5cf7a3 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/PluginsComponent.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/PluginsComponent.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Controller.Component * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/TestPluginComponent.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/TestPluginComponent.php index 39c4e5dd3..1c7bc3659 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/TestPluginComponent.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/TestPluginComponent.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Controller.Component * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/TestPluginOtherComponent.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/TestPluginOtherComponent.php index 24cca4763..2fb4a3b20 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/TestPluginOtherComponent.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/Component/TestPluginOtherComponent.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Controller.Component * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestPluginAppController.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestPluginAppController.php index 990d8141e..93a498147 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestPluginAppController.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestPluginAppController.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Controller * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestPluginController.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestPluginController.php index a1f280d45..097caca3b 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestPluginController.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestPluginController.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Controller * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestsController.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestsController.php index 640258722..0d2519601 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestsController.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Controller/TestsController.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Controller * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Cache/Engine/TestPluginCacheEngine.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Cache/Engine/TestPluginCacheEngine.php index 3b91fcbb1..76cac1377 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Cache/Engine/TestPluginCacheEngine.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Cache/Engine/TestPluginCacheEngine.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Lib.Cache.Engine * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Custom/Package/CustomLibClass.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Custom/Package/CustomLibClass.php index faf24431d..a33982552 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Custom/Package/CustomLibClass.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Custom/Package/CustomLibClass.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Lib.Custom.Package * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Log/Engine/TestPluginLog.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Log/Engine/TestPluginLog.php index d673e3679..d9ce333d7 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Log/Engine/TestPluginLog.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/Log/Engine/TestPluginLog.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Lib.Log.Engine * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/TestPluginLibrary.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/TestPluginLibrary.php index 0d6764b13..3111e64cd 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/TestPluginLibrary.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/TestPluginLibrary.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Lib * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/TestPluginOtherLibrary.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/TestPluginOtherLibrary.php index 95085341c..1fa6b84a5 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/TestPluginOtherLibrary.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Lib/TestPluginOtherLibrary.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Lib * @since CakePHP(tm) v 2.0.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Model/TestPluginAppModel.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Model/TestPluginAppModel.php index 903e58c8b..057da3700 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Model/TestPluginAppModel.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Model/TestPluginAppModel.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Model * @since CakePHP(tm) v 1.2.0.5432 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Vendor/sample/sample_plugin.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Vendor/sample/sample_plugin.php index f053ef5bb..cd4c9cf04 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Vendor/sample/sample_plugin.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Vendor/sample/sample_plugin.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Vendor.sample * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Vendor/welcome.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Vendor/welcome.php index a265179c7..998ed4924 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Vendor/welcome.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Vendor/welcome.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.Vendor * @since CakePHP(tm) v 1.2.0.7629 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/OtherHelperHelper.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/OtherHelperHelper.php index 543b108cd..abee3dd36 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/OtherHelperHelper.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/OtherHelperHelper.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/PluggedHelperHelper.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/PluggedHelperHelper.php index cd71b3f05..53f17f6af 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/PluggedHelperHelper.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/View/Helper/PluggedHelperHelper.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPlugin.View.Helper * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/ExampleShell.php b/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/ExampleShell.php index 192d967a6..066b5be94 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/ExampleShell.php +++ b/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/ExampleShell.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPluginTwo.Console.Command * @since CakePHP(tm) v 1.2.0.7871 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/WelcomeShell.php b/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/WelcomeShell.php index 23a44f020..dd38dca7f 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/WelcomeShell.php +++ b/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/WelcomeShell.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Plugin.TestPluginTwo.Console.Command * @since CakePHP(tm) v 1.2.0.7871 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Vendor/Test/MyTest.php b/lib/Cake/Test/test_app/Vendor/Test/MyTest.php index 237dd6897..d65342e9d 100644 --- a/lib/Cake/Test/test_app/Vendor/Test/MyTest.php +++ b/lib/Cake/Test/test_app/Vendor/Test/MyTest.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Vendor.Test * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Vendor/Test/hello.php b/lib/Cake/Test/test_app/Vendor/Test/hello.php index 10228c011..5e835e9bc 100644 --- a/lib/Cake/Test/test_app/Vendor/Test/hello.php +++ b/lib/Cake/Test/test_app/Vendor/Test/hello.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Vendor.Test * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Vendor/sample/configure_test_vendor_sample.php b/lib/Cake/Test/test_app/Vendor/sample/configure_test_vendor_sample.php index 6030ef020..634027d9d 100644 --- a/lib/Cake/Test/test_app/Vendor/sample/configure_test_vendor_sample.php +++ b/lib/Cake/Test/test_app/Vendor/sample/configure_test_vendor_sample.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Vendor.sample * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Vendor/somename/some.name.php b/lib/Cake/Test/test_app/Vendor/somename/some.name.php index a1cf5489c..6e795464f 100644 --- a/lib/Cake/Test/test_app/Vendor/somename/some.name.php +++ b/lib/Cake/Test/test_app/Vendor/somename/some.name.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Vendor.somename * @since CakePHP(tm) v 1.2.0.4206 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Test/test_app/Vendor/welcome.php b/lib/Cake/Test/test_app/Vendor/welcome.php index 0d050dab0..91b019ac5 100644 --- a/lib/Cake/Test/test_app/Vendor/welcome.php +++ b/lib/Cake/Test/test_app/Vendor/welcome.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.test_app.Vendor * @since CakePHP(tm) v 1.2.0.7629 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/TestSuite/CakeTestCase.php b/lib/Cake/TestSuite/CakeTestCase.php index 181fd740d..350924389 100644 --- a/lib/Cake/TestSuite/CakeTestCase.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index 31267b573..41778b357 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -4,7 +4,7 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License diff --git a/lib/Cake/TestSuite/ControllerTestCase.php b/lib/Cake/TestSuite/ControllerTestCase.php index 301e58386..d6002f07a 100644 --- a/lib/Cake/TestSuite/ControllerTestCase.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -218,6 +218,8 @@ abstract class ControllerTestCase extends CakeTestCase { 'return' => 'result' ), $options); + $restore = array('get' => $_GET, 'post' => $_POST); + $_SERVER['REQUEST_METHOD'] = strtoupper($options['method']); if (is_array($options['data'])) { if (strtoupper($options['method']) == 'GET') { @@ -273,6 +275,10 @@ abstract class ControllerTestCase extends CakeTestCase { } $this->__dirtyController = true; $this->headers = $Dispatch->response->header(); + + $_GET = $restore['get']; + $_POST = $restore['post']; + return $this->{$options['return']}; } diff --git a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php index 50e96a738..13a8f3018 100644 --- a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php +++ b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php @@ -158,7 +158,7 @@ class CakeFixtureManager { protected function _setupTable($fixture, $db = null, $drop = true) { if (!$db) { if (!empty($fixture->useDbConfig)) { - $db = ClassRegistry::getDataSource($fixture->useDbConfig); + $db = ConnectionManager::getDataSource($fixture->useDbConfig); } else { $db = $this->_db; } @@ -193,8 +193,8 @@ class CakeFixtureManager { return; } - $nested = $test->db->nestedTransaction; - $test->db->nestedTransaction = false; + $nested = $test->db->useNestedTransactions; + $test->db->useNestedTransactions = false; $test->db->begin(); foreach ($fixtures as $f) { if (!empty($this->_loaded[$f])) { @@ -205,7 +205,7 @@ class CakeFixtureManager { } } $test->db->commit(); - $test->db->nestedTransaction = $nested; + $test->db->useNestedTransactions = $nested; } /** diff --git a/lib/Cake/TestSuite/Fixture/CakeTestFixture.php b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php index 4a16be679..359d57f6f 100644 --- a/lib/Cake/TestSuite/Fixture/CakeTestFixture.php +++ b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php @@ -1,13 +1,13 @@ + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) @@ -241,10 +241,10 @@ class CakeTestFixture { $fields = array_keys($record); $values[] = array_values(array_merge($default, $record)); } - $nested = $db->nestedTransaction; - $db->nestedTransaction = false; + $nested = $db->useNestedTransactions; + $db->useNestedTransactions = false; $result = $db->insertMulti($this->table, $fields, $values); - $db->nestedTransaction = $nested; + $db->useNestedTransactions = $nested; return $result; } return true; diff --git a/lib/Cake/TestSuite/Fixture/CakeTestModel.php b/lib/Cake/TestSuite/Fixture/CakeTestModel.php index b2a833570..bba231a2f 100644 --- a/lib/Cake/TestSuite/Fixture/CakeTestModel.php +++ b/lib/Cake/TestSuite/Fixture/CakeTestModel.php @@ -1,13 +1,13 @@ + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite.Fixture * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php index d60f54905..6ac39c079 100644 --- a/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php @@ -4,7 +4,7 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License diff --git a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php index 31c2a17ef..27599a64a 100644 --- a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php @@ -4,7 +4,7 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License diff --git a/lib/Cake/TestSuite/Reporter/CakeTextReporter.php b/lib/Cake/TestSuite/Reporter/CakeTextReporter.php index 5425a7b50..1c8c20142 100644 --- a/lib/Cake/TestSuite/Reporter/CakeTextReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeTextReporter.php @@ -4,7 +4,7 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License diff --git a/lib/Cake/TestSuite/templates/footer.php b/lib/Cake/TestSuite/templates/footer.php index 137f070cf..06af88ef7 100644 --- a/lib/Cake/TestSuite/templates/footer.php +++ b/lib/Cake/TestSuite/templates/footer.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite.templates * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/TestSuite/templates/header.php b/lib/Cake/TestSuite/templates/header.php index 10692bc57..4d41719f2 100644 --- a/lib/Cake/TestSuite/templates/header.php +++ b/lib/Cake/TestSuite/templates/header.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite.templates * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/TestSuite/templates/menu.php b/lib/Cake/TestSuite/templates/menu.php index d60457e40..a775a8ce9 100644 --- a/lib/Cake/TestSuite/templates/menu.php +++ b/lib/Cake/TestSuite/templates/menu.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite.templates * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/TestSuite/templates/missing_connection.php b/lib/Cake/TestSuite/templates/missing_connection.php index cadf335db..fc9e3ca40 100644 --- a/lib/Cake/TestSuite/templates/missing_connection.php +++ b/lib/Cake/TestSuite/templates/missing_connection.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite.templates * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/TestSuite/templates/phpunit.php b/lib/Cake/TestSuite/templates/phpunit.php index 6c45c3c20..2a3dc6e7f 100644 --- a/lib/Cake/TestSuite/templates/phpunit.php +++ b/lib/Cake/TestSuite/templates/phpunit.php @@ -5,14 +5,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite.templates * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/TestSuite/templates/xdebug.php b/lib/Cake/TestSuite/templates/xdebug.php index d3deb338c..ecf24cb84 100644 --- a/lib/Cake/TestSuite/templates/xdebug.php +++ b/lib/Cake/TestSuite/templates/xdebug.php @@ -4,14 +4,14 @@ * * PHP 5 * - * CakePHP(tm) Tests + * CakePHP(tm) Tests * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests + * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.TestSuite.templates * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index 29fecadfc..66300448e 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -527,9 +527,10 @@ class Validation { * * @param mixed $check Value to check * @param mixed $options Options for the check. + * @param boolean $strict Defaults to true, set to false to disable strict type check * @return boolean Success */ - public static function multiple($check, $options = array()) { + public static function multiple($check, $options = array(), $strict = true) { $defaults = array('in' => null, 'max' => null, 'min' => null); $options = array_merge($defaults, $options); $check = array_filter((array)$check); @@ -544,7 +545,7 @@ class Validation { } if ($options['in'] && is_array($options['in'])) { foreach ($check as $val) { - if (!in_array($val, $options['in'], true)) { + if (!in_array($val, $options['in'], $strict)) { return false; } } @@ -716,10 +717,11 @@ class Validation { * * @param string $check Value to check * @param array $list List to check against + * @param boolean $strict Defaults to true, set to false to disable strict type check * @return boolean Success */ - public static function inList($check, $list) { - return in_array($check, $list, true); + public static function inList($check, $list, $strict = true) { + return in_array($check, $list, $strict); } /** diff --git a/lib/Cake/Utility/Xml.php b/lib/Cake/Utility/Xml.php index 70044471e..1f9f69caf 100644 --- a/lib/Cake/Utility/Xml.php +++ b/lib/Cake/Utility/Xml.php @@ -230,7 +230,7 @@ class Xml { if ($key[0] === '@') { throw new XmlException(__d('cake_dev', 'Invalid array')); } - if (array_keys($value) === range(0, count($value) - 1)) { // List + if (is_numeric(implode('', array_keys($value)))) { // List foreach ($value as $item) { $itemData = compact('dom', 'node', 'key', 'format'); $itemData['value'] = $item; diff --git a/lib/Cake/VERSION.txt b/lib/Cake/VERSION.txt index 970cf7e07..97b2db322 100644 --- a/lib/Cake/VERSION.txt +++ b/lib/Cake/VERSION.txt @@ -17,4 +17,4 @@ // @license MIT License (http://www.opensource.org/licenses/mit-license.php) // +--------------------------------------------------------------------------------------------+ // //////////////////////////////////////////////////////////////////////////////////////////////////// -2.2.0-dev +2.2.0-beta