mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch 'master' into 2.4
Conflicts: lib/Cake/VERSION.txt
This commit is contained in:
commit
cd3c54bb9d
36 changed files with 140 additions and 141 deletions
|
@ -178,7 +178,7 @@ class ControllerTask extends BakeTask {
|
|||
$components = $this->doComponents();
|
||||
|
||||
$wannaUseSession = $this->in(
|
||||
__d('cake_console', "Would you like to use Session flash messages?"), array('y','n'), 'y'
|
||||
__d('cake_console', "Would you like to use Session flash messages?"), array('y', 'n'), 'y'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
@ -196,7 +196,7 @@ class ControllerTask extends BakeTask {
|
|||
$baked = false;
|
||||
if ($this->interactive === true) {
|
||||
$this->confirmController($controllerName, $useDynamicScaffold, $helpers, $components);
|
||||
$looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y','n'), 'y');
|
||||
$looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y', 'n'), 'y');
|
||||
|
||||
if (strtolower($looksGood) === 'y') {
|
||||
$baked = $this->bake($controllerName, $actions, $helpers, $components);
|
||||
|
@ -263,11 +263,11 @@ class ControllerTask extends BakeTask {
|
|||
protected function _askAboutMethods() {
|
||||
$wannaBakeCrud = $this->in(
|
||||
__d('cake_console', "Would you like to create some basic class methods \n(index(), add(), view(), edit())?"),
|
||||
array('y','n'), 'n'
|
||||
array('y', 'n'), 'n'
|
||||
);
|
||||
$wannaBakeAdminCrud = $this->in(
|
||||
__d('cake_console', "Would you like to create the basic class methods for admin routing?"),
|
||||
array('y','n'), 'n'
|
||||
array('y', 'n'), 'n'
|
||||
);
|
||||
return array($wannaBakeCrud, $wannaBakeAdminCrud);
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ class ControllerTask extends BakeTask {
|
|||
* @return array Array of values for property.
|
||||
*/
|
||||
protected function _doPropertyChoices($prompt, $example) {
|
||||
$proceed = $this->in($prompt, array('y','n'), 'n');
|
||||
$proceed = $this->in($prompt, array('y', 'n'), 'n');
|
||||
$property = array();
|
||||
if (strtolower($proceed) === 'y') {
|
||||
$propertyList = $this->in($example);
|
||||
|
|
|
@ -234,13 +234,13 @@ class ModelTask extends BakeTask {
|
|||
}
|
||||
|
||||
$prompt = __d('cake_console', "Would you like to supply validation criteria \nfor the fields in your model?");
|
||||
$wannaDoValidation = $this->in($prompt, array('y','n'), 'y');
|
||||
$wannaDoValidation = $this->in($prompt, array('y', 'n'), 'y');
|
||||
if (array_search($useTable, $this->_tables) !== false && strtolower($wannaDoValidation) === 'y') {
|
||||
$validate = $this->doValidation($tempModel);
|
||||
}
|
||||
|
||||
$prompt = __d('cake_console', "Would you like to define model associations\n(hasMany, hasOne, belongsTo, etc.)?");
|
||||
$wannaDoAssoc = $this->in($prompt, array('y','n'), 'y');
|
||||
$wannaDoAssoc = $this->in($prompt, array('y', 'n'), 'y');
|
||||
if (strtolower($wannaDoAssoc) === 'y') {
|
||||
$associations = $this->doAssociations($tempModel);
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ if (isset($filePresent)):
|
|||
<?php
|
||||
if ($connected && $connected->isConnected()):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'Cake is able to connect to the database.');
|
||||
echo __d('cake_dev', 'Cake is able to connect to the database.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
|
|
|
@ -99,11 +99,11 @@ class PhpAcl extends Object implements AclInterface {
|
|||
*/
|
||||
public function build(array $config) {
|
||||
if (empty($config['roles'])) {
|
||||
throw new AclException(__d('cake_dev','"roles" section not found in configuration.'));
|
||||
throw new AclException(__d('cake_dev', '"roles" section not found in configuration.'));
|
||||
}
|
||||
|
||||
if (empty($config['rules']['allow']) && empty($config['rules']['deny'])) {
|
||||
throw new AclException(__d('cake_dev','Neither "allow" nor "deny" rules were provided in configuration.'));
|
||||
throw new AclException(__d('cake_dev', 'Neither "allow" nor "deny" rules were provided in configuration.'));
|
||||
}
|
||||
|
||||
$rules['allow'] = !empty($config['rules']['allow']) ? $config['rules']['allow'] : array();
|
||||
|
|
|
@ -590,7 +590,7 @@ class App {
|
|||
* an single array to $type,
|
||||
* @param string $name Name of the Class or a unique name for the file
|
||||
* @param boolean|array $parent boolean true if Class Parent should be searched, accepts key => value
|
||||
* array('parent' => $parent ,'file' => $file, 'search' => $search, 'ext' => '$ext');
|
||||
* array('parent' => $parent, 'file' => $file, 'search' => $search, 'ext' => '$ext');
|
||||
* $ext allows setting the extension of the file name
|
||||
* based on Inflector::underscore($name) . ".$ext";
|
||||
* @param array $search paths to search for files, array('path 1', 'path 2', 'path 3');
|
||||
|
|
|
@ -373,7 +373,7 @@ class I18n {
|
|||
$head = $this->_domains[$domain][$this->_lang][$this->category][""];
|
||||
|
||||
foreach (explode("\n", $head) as $line) {
|
||||
$header = strtok($line,":");
|
||||
$header = strtok($line, ':');
|
||||
$line = trim(strtok("\n"));
|
||||
$this->_domains[$domain][$this->_lang][$this->category]["%po-header"][strtolower($header)] = $line;
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ class I18n {
|
|||
if ($data = file_get_contents($filename)) {
|
||||
$translations = array();
|
||||
$header = substr($data, 0, 20);
|
||||
$header = unpack("L1magic/L1version/L1count/L1o_msg/L1o_trn", $header);
|
||||
$header = unpack('L1magic/L1version/L1count/L1o_msg/L1o_trn', $header);
|
||||
extract($header);
|
||||
|
||||
if ((dechex($magic) === '950412de' || dechex($magic) === 'ffffffff950412de') && !$version) {
|
||||
|
@ -445,19 +445,19 @@ class I18n {
|
|||
* @return mixed Array of translations on success or false on failure
|
||||
*/
|
||||
public static function loadPo($filename) {
|
||||
if (!$file = fopen($filename, "r")) {
|
||||
if (!$file = fopen($filename, 'r')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$type = 0;
|
||||
$translations = array();
|
||||
$translationKey = "";
|
||||
$translationKey = '';
|
||||
$plural = 0;
|
||||
$header = "";
|
||||
$header = '';
|
||||
|
||||
do {
|
||||
$line = trim(fgets($file));
|
||||
if ($line === "" || $line[0] === "#") {
|
||||
if ($line === '' || $line[0] === '#') {
|
||||
continue;
|
||||
}
|
||||
if (preg_match("/msgid[[:space:]]+\"(.+)\"$/i", $line, $regs)) {
|
||||
|
@ -465,7 +465,7 @@ class I18n {
|
|||
$translationKey = stripcslashes($regs[1]);
|
||||
} elseif (preg_match("/msgid[[:space:]]+\"\"$/i", $line, $regs)) {
|
||||
$type = 2;
|
||||
$translationKey = "";
|
||||
$translationKey = '';
|
||||
} elseif (preg_match("/^\"(.*)\"$/i", $line, $regs) && ($type == 1 || $type == 2 || $type == 3)) {
|
||||
$type = 3;
|
||||
$translationKey .= stripcslashes($regs[1]);
|
||||
|
@ -474,7 +474,7 @@ class I18n {
|
|||
$type = 4;
|
||||
} elseif (preg_match("/msgstr[[:space:]]+\"\"$/i", $line, $regs) && ($type == 1 || $type == 3) && $translationKey) {
|
||||
$type = 4;
|
||||
$translations[$translationKey] = "";
|
||||
$translations[$translationKey] = '';
|
||||
} elseif (preg_match("/^\"(.*)\"$/i", $line, $regs) && $type == 4 && $translationKey) {
|
||||
$translations[$translationKey] .= stripcslashes($regs[1]);
|
||||
} elseif (preg_match("/msgid_plural[[:space:]]+\".*\"$/i", $line, $regs)) {
|
||||
|
@ -487,7 +487,7 @@ class I18n {
|
|||
$type = 7;
|
||||
} elseif (preg_match("/msgstr\[(\d+)\][[:space:]]+\"\"$/i", $line, $regs) && ($type == 6 || $type == 7) && $translationKey) {
|
||||
$plural = $regs[1];
|
||||
$translations[$translationKey][$plural] = "";
|
||||
$translations[$translationKey][$plural] = '';
|
||||
$type = 7;
|
||||
} elseif (preg_match("/^\"(.*)\"$/i", $line, $regs) && $type == 7 && $translationKey) {
|
||||
$translations[$translationKey][$plural] .= stripcslashes($regs[1]);
|
||||
|
@ -495,20 +495,20 @@ class I18n {
|
|||
$header .= stripcslashes($regs[1]);
|
||||
$type = 5;
|
||||
} elseif (preg_match("/msgstr[[:space:]]+\"\"$/i", $line, $regs) && !$translationKey) {
|
||||
$header = "";
|
||||
$header = '';
|
||||
$type = 5;
|
||||
} elseif (preg_match("/^\"(.*)\"$/i", $line, $regs) && $type == 5) {
|
||||
$header .= stripcslashes($regs[1]);
|
||||
} else {
|
||||
unset($translations[$translationKey]);
|
||||
$type = 0;
|
||||
$translationKey = "";
|
||||
$translationKey = '';
|
||||
$plural = 0;
|
||||
}
|
||||
} while (!feof($file));
|
||||
fclose($file);
|
||||
|
||||
$merge[""] = $header;
|
||||
$merge[''] = $header;
|
||||
return array_merge($merge, $translations);
|
||||
}
|
||||
|
||||
|
@ -519,7 +519,7 @@ class I18n {
|
|||
* @return mixed Array of definitions on success or false on failure
|
||||
*/
|
||||
public static function loadLocaleDefinition($filename) {
|
||||
if (!$file = fopen($filename, "r")) {
|
||||
if (!$file = fopen($filename, 'r')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1327,7 +1327,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* A more efficient way to fetch associations. Woohoo!
|
||||
* A more efficient way to fetch associations.
|
||||
*
|
||||
* @param Model $model Primary model object
|
||||
* @param string $query Association query
|
||||
|
@ -1343,8 +1343,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* mergeHasMany - Merge the results of hasMany relations.
|
||||
*
|
||||
* Merge the results of hasMany relations.
|
||||
*
|
||||
* @param array $resultSet Data to merge into
|
||||
* @param array $merge Data to merge
|
||||
|
@ -1670,7 +1669,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Builds and generates a JOIN statement from an array. Handles final clean-up before conversion.
|
||||
* Builds and generates a JOIN statement from an array. Handles final clean-up before conversion.
|
||||
*
|
||||
* @param array $join An array defining a JOIN statement in a query
|
||||
* @return string An SQL JOIN statement to be used in a query
|
||||
|
@ -1698,7 +1697,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Builds and generates an SQL statement from an array. Handles final clean-up before conversion.
|
||||
* Builds and generates an SQL statement from an array. Handles final clean-up before conversion.
|
||||
*
|
||||
* @param array $query An array defining an SQL query
|
||||
* @param Model $model The model object which initiated the query
|
||||
|
@ -1916,7 +1915,7 @@ class DboSource extends DataSource {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets a list of record IDs for the given conditions. Used for multi-record updates and deletes
|
||||
* Gets a list of record IDs for the given conditions. Used for multi-record updates and deletes
|
||||
* in databases that do not support aliases in UPDATE/DELETE queries.
|
||||
*
|
||||
* @param Model $model
|
||||
|
|
|
@ -1268,7 +1268,7 @@ class CakeEmail {
|
|||
$message = str_replace(array("\r\n", "\r"), "\n", $message);
|
||||
$lines = explode("\n", $message);
|
||||
$formatted = array();
|
||||
$cut = ($wrapLength == CakeEmail::LINE_LENGTH_MUST) ? true : false;
|
||||
$cut = ($wrapLength == CakeEmail::LINE_LENGTH_MUST);
|
||||
|
||||
foreach ($lines as $line) {
|
||||
if (empty($line)) {
|
||||
|
|
|
@ -136,12 +136,12 @@ class Router {
|
|||
* @var array
|
||||
*/
|
||||
protected static $_resourceMap = array(
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'edit', 'method' => 'POST', 'id' => true)
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'edit', 'method' => 'POST', 'id' => true)
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -154,7 +154,7 @@ class ShellDispatcherTest extends CakeTestCase {
|
|||
'app' => 'new',
|
||||
'webroot' => 'webroot',
|
||||
'working' => str_replace('/', DS, '/var/www/htdocs/new'),
|
||||
'root' => str_replace('/', DS,'/var/www/htdocs')
|
||||
'root' => str_replace('/', DS, '/var/www/htdocs')
|
||||
);
|
||||
$Dispatcher->parseParams($params);
|
||||
$this->assertEquals($expected, $Dispatcher->params);
|
||||
|
@ -380,7 +380,7 @@ class ShellDispatcherTest extends CakeTestCase {
|
|||
'app' => 'old',
|
||||
'webroot' => 'webroot',
|
||||
'working' => str_replace('/', DS, '/var/www/htdocs/old'),
|
||||
'root' => str_replace('/', DS,'/var/www/htdocs')
|
||||
'root' => str_replace('/', DS, '/var/www/htdocs')
|
||||
);
|
||||
$Dispatcher->parseParams($params);
|
||||
$this->assertEquals($expected, $Dispatcher->params);
|
||||
|
|
|
@ -283,7 +283,7 @@ class DbAclTest extends CakeTestCase {
|
|||
$this->assertTrue($this->Acl->check('Samir', 'view', 'read'));
|
||||
$this->assertTrue($this->Acl->check('root/users/Samir', 'ROOT/tpsReports/view', 'update'));
|
||||
|
||||
$this->assertFalse($this->Acl->check('root/users/Samir', 'ROOT/tpsReports/update','*'));
|
||||
$this->assertFalse($this->Acl->check('root/users/Samir', 'ROOT/tpsReports/update', '*'));
|
||||
$this->assertTrue($this->Acl->allow('root/users/Samir', 'ROOT/tpsReports/update', '*'));
|
||||
$this->assertTrue($this->Acl->check('Samir', 'update', 'read'));
|
||||
$this->assertTrue($this->Acl->check('root/users/Samir', 'ROOT/tpsReports/update', 'update'));
|
||||
|
|
|
@ -1009,7 +1009,7 @@ class AuthComponentTest extends CakeTestCase {
|
|||
App::build(array(
|
||||
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
|
||||
));
|
||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest";
|
||||
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
|
||||
|
||||
App::uses('Dispatcher', 'Routing');
|
||||
|
||||
|
|
|
@ -857,7 +857,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
|
||||
$controller = $this->getMock('Controller', array('header'));
|
||||
$RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
|
||||
$RequestHandler->response = $this->getMock('CakeResponse', array('_sendHeader','statusCode'));
|
||||
$RequestHandler->response = $this->getMock('CakeResponse', array('_sendHeader', 'statusCode'));
|
||||
$RequestHandler->request = $this->getMock('CakeRequest');
|
||||
$RequestHandler->request->expects($this->once())->method('is')
|
||||
->with('ajax')
|
||||
|
|
|
@ -130,7 +130,7 @@ class TestAppSchema extends CakeSchema {
|
|||
* @var array
|
||||
*/
|
||||
public $comments = array(
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => 0,'key' => 'primary'),
|
||||
'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'),
|
||||
'article_id' => array('type' => 'integer', 'null' => false),
|
||||
'user_id' => array('type' => 'integer', 'null' => false),
|
||||
'comment' => array('type' => 'text', 'null' => true, 'default' => null),
|
||||
|
|
|
@ -260,7 +260,7 @@ class CakeSessionTest extends CakeTestCase {
|
|||
$result = TestCakeSession::read('testing');
|
||||
$this->assertEquals('1,2,3', $result);
|
||||
|
||||
TestCakeSession::write('testing', array('1' => 'one', '2' => 'two','3' => 'three'));
|
||||
TestCakeSession::write('testing', array('1' => 'one', '2' => 'two', '3' => 'three'));
|
||||
$result = TestCakeSession::read('testing.1');
|
||||
$this->assertEquals('one', $result);
|
||||
|
||||
|
|
|
@ -741,11 +741,11 @@ class DboSourceTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testGetLogParams() {
|
||||
$this->testDb->logQuery('Query 1', array(1,2,'abc'));
|
||||
$this->testDb->logQuery('Query 1', array(1, 2, 'abc'));
|
||||
$this->testDb->logQuery('Query 2', array('field1' => 1, 'field2' => 'abc'));
|
||||
|
||||
$log = $this->testDb->getLog();
|
||||
$expected = array('query' => 'Query 1', 'params' => array(1,2,'abc'), 'affected' => '', 'numRows' => '', 'took' => '');
|
||||
$expected = array('query' => 'Query 1', 'params' => array(1, 2, 'abc'), 'affected' => '', 'numRows' => '', 'took' => '');
|
||||
$this->assertEquals($expected, $log['log'][0]);
|
||||
$expected = array('query' => 'Query 2', 'params' => array('field1' => 1, 'field2' => 'abc'), 'affected' => '', 'numRows' => '', 'took' => '');
|
||||
$this->assertEquals($expected, $log['log'][1]);
|
||||
|
|
|
@ -151,7 +151,7 @@ class ModelDeleteTest extends BaseModelTest {
|
|||
* @return void
|
||||
*/
|
||||
public function testDeleteDependentWithConditions() {
|
||||
$this->loadFixtures('Cd','Book','OverallFavorite');
|
||||
$this->loadFixtures('Cd', 'Book', 'OverallFavorite');
|
||||
|
||||
$Cd = new Cd();
|
||||
$Book = new Book();
|
||||
|
|
|
@ -3042,7 +3042,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
$Apple = new Apple();
|
||||
$result = $Apple->find('threaded');
|
||||
$result = Hash::extract($result, '{n}.children');
|
||||
$expected = array(array(), array(), array(), array(), array(), array(), array());
|
||||
$expected = array(array(), array(), array(), array(), array(), array(), array());
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
|
@ -3057,7 +3057,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
$Model->recursive = -1;
|
||||
$result = $Model->find('threaded');
|
||||
$result = Hash::extract($result, '{n}.children');
|
||||
$expected = array(array(), array(), array(), array(), array(), array(), array());
|
||||
$expected = array(array(), array(), array(), array(), array(), array(), array());
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = $Model->find('threaded', array('parent' => 'mother_id'));
|
||||
|
|
|
@ -2091,7 +2091,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
$Comment = new Comment();
|
||||
|
||||
$articles = $Article->find('all', array(
|
||||
'fields' => array('id','title'),
|
||||
'fields' => array('id', 'title'),
|
||||
'recursive' => -1,
|
||||
'order' => array('Article.id' => 'ASC')
|
||||
));
|
||||
|
@ -2111,7 +2111,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
$this->assertEquals($expected, $articles);
|
||||
|
||||
$comments = $Comment->find('all', array(
|
||||
'fields' => array('id','article_id','user_id','comment','published'),
|
||||
'fields' => array('id', 'article_id', 'user_id', 'comment', 'published'),
|
||||
'recursive' => -1,
|
||||
'order' => array('Comment.id' => 'ASC')
|
||||
));
|
||||
|
@ -2178,7 +2178,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
$this->assertFalse(empty($result));
|
||||
|
||||
$articles = $Article->find('all', array(
|
||||
'fields' => array('id','title'),
|
||||
'fields' => array('id', 'title'),
|
||||
'recursive' => -1,
|
||||
'order' => array('Article.id' => 'ASC')
|
||||
));
|
||||
|
@ -2198,7 +2198,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
$this->assertEquals($expected, $articles);
|
||||
|
||||
$comments = $Comment->find('all', array(
|
||||
'fields' => array('id','article_id','user_id','comment','published'),
|
||||
'fields' => array('id', 'article_id', 'user_id', 'comment', 'published'),
|
||||
'recursive' => -1,
|
||||
'order' => array('Comment.id' => 'ASC')
|
||||
));
|
||||
|
@ -2289,7 +2289,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
$this->assertEquals('First Article', $result);
|
||||
|
||||
$articles = $Article->find('all', array(
|
||||
'fields' => array('id','title'),
|
||||
'fields' => array('id', 'title'),
|
||||
'recursive' => -1,
|
||||
'order' => array('Article.id' => 'ASC')
|
||||
));
|
||||
|
@ -4280,7 +4280,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
|
||||
$result = $TestModel->find('all', array(
|
||||
'recursive' => -1,
|
||||
'fields' => array('author_id', 'title','body','published'),
|
||||
'fields' => array('author_id', 'title', 'body', 'published'),
|
||||
'order' => array('Post.created' => 'ASC')
|
||||
));
|
||||
|
||||
|
@ -5712,7 +5712,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
|
||||
$result = $TestModel->find('all', array(
|
||||
'recursive' => -1,
|
||||
'fields' => array('author_id', 'title','body','published'),
|
||||
'fields' => array('author_id', 'title', 'body', 'published'),
|
||||
'order' => array('Post.created' => 'ASC')
|
||||
));
|
||||
|
||||
|
|
|
@ -870,7 +870,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
$_POST = array();
|
||||
$Dispatcher = new TestDispatcher();
|
||||
Configure::write('Routing.prefixes', array('admin'));
|
||||
Configure::write('App.baseUrl','/cake/repo/branches/1.2.x.x/index.php');
|
||||
Configure::write('App.baseUrl', '/cake/repo/branches/1.2.x.x/index.php');
|
||||
$url = new CakeRequest('admin/test_dispatch_pages/index/param:value/param2:value2');
|
||||
$response = $this->getMock('CakeResponse');
|
||||
|
||||
|
|
|
@ -870,7 +870,7 @@ class CakeRouteTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function testParseTrailingUTF8() {
|
||||
$route = new CakeRoute('/category/**', array('controller' => 'categories','action' => 'index'));
|
||||
$route = new CakeRoute('/category/**', array('controller' => 'categories', 'action' => 'index'));
|
||||
$result = $route->parse('/category/%D9%85%D9%88%D8%A8%D8%A7%DB%8C%D9%84');
|
||||
$expected = array(
|
||||
'controller' => 'categories',
|
||||
|
|
|
@ -1565,7 +1565,7 @@ class RouterTest extends CakeTestCase {
|
|||
Router::setRequestInfo(
|
||||
$request->addParams(array(
|
||||
'plugin' => null, 'controller' => 'images', 'action' => 'index',
|
||||
'prefix' => null, 'admin' => false,'url' => array('url' => 'images/index')
|
||||
'prefix' => null, 'admin' => false, 'url' => array('url' => 'images/index')
|
||||
))->addPaths(array(
|
||||
'base' => '',
|
||||
'here' => '/images/index',
|
||||
|
@ -2604,22 +2604,22 @@ class RouterTest extends CakeTestCase {
|
|||
public function testResourceMap() {
|
||||
$default = Router::resourceMap();
|
||||
$expected = array(
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'edit', 'method' => 'POST', 'id' => true)
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'edit', 'method' => 'POST', 'id' => true)
|
||||
);
|
||||
$this->assertEquals($default, $expected);
|
||||
|
||||
$custom = array(
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'update', 'method' => 'POST', 'id' => true)
|
||||
array('action' => 'index', 'method' => 'GET', 'id' => false),
|
||||
array('action' => 'view', 'method' => 'GET', 'id' => true),
|
||||
array('action' => 'add', 'method' => 'POST', 'id' => false),
|
||||
array('action' => 'edit', 'method' => 'PUT', 'id' => true),
|
||||
array('action' => 'delete', 'method' => 'DELETE', 'id' => true),
|
||||
array('action' => 'update', 'method' => 'POST', 'id' => true)
|
||||
);
|
||||
Router::resourceMap($custom);
|
||||
$this->assertEquals(Router::resourceMap(), $custom);
|
||||
|
|
|
@ -271,12 +271,12 @@ class SanitizeTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
$string = "x' AND 1=(SELECT COUNT(*) FROM users); --";
|
||||
$expected = "xAND1SELECTCOUNTFROMusers";
|
||||
$expected = 'xAND1SELECTCOUNTFROMusers';
|
||||
$result = Sanitize::paranoid($string);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$string = "x'; DROP TABLE members; --";
|
||||
$expected = "xDROPTABLEmembers";
|
||||
$expected = 'xDROPTABLEmembers';
|
||||
$result = Sanitize::paranoid($string);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
|
|
@ -232,10 +232,10 @@ class SetTest extends CakeTestCase {
|
|||
|
||||
$a = array(
|
||||
0 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))),
|
||||
1 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay')))
|
||||
1 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay')))
|
||||
);
|
||||
$b = array(
|
||||
0 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))),
|
||||
0 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay'))),
|
||||
1 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate')))
|
||||
|
||||
);
|
||||
|
@ -244,10 +244,10 @@ class SetTest extends CakeTestCase {
|
|||
|
||||
$b = array(
|
||||
0 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))),
|
||||
1 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay')))
|
||||
1 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay')))
|
||||
);
|
||||
$a = array(
|
||||
0 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))),
|
||||
0 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay'))),
|
||||
1 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate')))
|
||||
|
||||
);
|
||||
|
@ -257,12 +257,12 @@ class SetTest extends CakeTestCase {
|
|||
$a = array(
|
||||
0 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))),
|
||||
1 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))),
|
||||
2 => array('Person' => array('name' => 'Adam'),'Friend' => array(array('name' => 'Bob')))
|
||||
2 => array('Person' => array('name' => 'Adam'), 'Friend' => array(array('name' => 'Bob')))
|
||||
);
|
||||
$b = array(
|
||||
0 => array('Person' => array('name' => 'Adam'),'Friend' => array(array('name' => 'Bob'))),
|
||||
0 => array('Person' => array('name' => 'Adam'), 'Friend' => array(array('name' => 'Bob'))),
|
||||
1 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))),
|
||||
2 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay')))
|
||||
2 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay')))
|
||||
);
|
||||
$a = Set::sort($a, '{n}.Person.name', 'asc');
|
||||
$this->assertEquals($a, $b);
|
||||
|
@ -880,11 +880,11 @@ class SetTest extends CakeTestCase {
|
|||
)
|
||||
)
|
||||
);
|
||||
$expected = array(array('name' => 'zipfile2.zip','type' => 'application/x-zip-compressed','tmp_name' => '/tmp/php179.tmp','error' => 0,'size' => '354784'));
|
||||
$expected = array(array('name' => 'zipfile2.zip', 'type' => 'application/x-zip-compressed', 'tmp_name' => '/tmp/php179.tmp', 'error' => 0, 'size' => '354784'));
|
||||
$r = Set::extract('/file/.[type=application/x-zip-compressed]', $f);
|
||||
$this->assertEquals($expected, $r);
|
||||
|
||||
$expected = array(array('name' => 'zipfile.zip','type' => 'application/zip','tmp_name' => '/tmp/php178.tmp','error' => 0,'size' => '564647'));
|
||||
$expected = array(array('name' => 'zipfile.zip', 'type' => 'application/zip','tmp_name' => '/tmp/php178.tmp', 'error' => 0, 'size' => '564647'));
|
||||
$r = Set::extract('/file/.[type=application/zip]', $f);
|
||||
$this->assertEquals($expected, $r);
|
||||
|
||||
|
@ -917,13 +917,13 @@ class SetTest extends CakeTestCase {
|
|||
)
|
||||
)
|
||||
);
|
||||
$expected = array(array('name' => 'zipfile2.zip','type' => 'application/x zip compressed','tmp_name' => '/tmp/php179.tmp','error' => 0,'size' => '354784'));
|
||||
$expected = array(array('name' => 'zipfile2.zip', 'type' => 'application/x zip compressed', 'tmp_name' => '/tmp/php179.tmp', 'error' => 0, 'size' => '354784'));
|
||||
$r = Set::extract('/file/.[type=application/x zip compressed]', $f);
|
||||
$this->assertEquals($expected, $r);
|
||||
|
||||
$expected = array(
|
||||
array('name' => 'zipfile.zip','type' => 'application/zip','tmp_name' => '/tmp/php178.tmp','error' => 0,'size' => '564647'),
|
||||
array('name' => 'zipfile2.zip','type' => 'application/x zip compressed','tmp_name' => '/tmp/php179.tmp','error' => 0,'size' => '354784')
|
||||
array('name' => 'zipfile.zip','type' => 'application/zip', 'tmp_name' => '/tmp/php178.tmp', 'error' => 0, 'size' => '564647'),
|
||||
array('name' => 'zipfile2.zip','type' => 'application/x zip compressed', 'tmp_name' => '/tmp/php179.tmp', 'error' => 0, 'size' => '354784')
|
||||
);
|
||||
$r = Set::extract('/file/.[tmp_name=/tmp\/php17/]', $f);
|
||||
$this->assertEquals($expected, $r);
|
||||
|
@ -1560,7 +1560,7 @@ class SetTest extends CakeTestCase {
|
|||
0 => array('name' => 'zero')
|
||||
);
|
||||
$result = Set::extract($a, '{s}.name');
|
||||
$expected = array('page','fruit');
|
||||
$expected = array('page', 'fruit');
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$a = array(
|
||||
|
@ -1860,7 +1860,7 @@ class SetTest extends CakeTestCase {
|
|||
array('User' => array('id' => 14, 'group_id' => 2,
|
||||
'Data' => array('user' => 'phpnut', 'name' => 'Larry E. Masters'))),
|
||||
array('User' => array('id' => 25, 'group_id' => 1,
|
||||
'Data' => array('user' => 'gwoo','name' => 'The Gwoo'))));
|
||||
'Data' => array('user' => 'gwoo', 'name' => 'The Gwoo'))));
|
||||
$result = Set::combine($a, '{n}.User.id');
|
||||
$expected = array(2 => null, 14 => null, 25 => null);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
@ -1871,9 +1871,9 @@ class SetTest extends CakeTestCase {
|
|||
|
||||
$result = Set::combine($a, '{n}.User.id', '{n}.User.Data');
|
||||
$expected = array(
|
||||
2 => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'),
|
||||
14 => array('user' => 'phpnut', 'name' => 'Larry E. Masters'),
|
||||
25 => array('user' => 'gwoo', 'name' => 'The Gwoo'));
|
||||
2 => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'),
|
||||
14 => array('user' => 'phpnut', 'name' => 'Larry E. Masters'),
|
||||
25 => array('user' => 'gwoo', 'name' => 'The Gwoo'));
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = Set::combine($a, '{n}.User.id', '{n}.User.Data.name');
|
||||
|
@ -1961,11 +1961,11 @@ class SetTest extends CakeTestCase {
|
|||
$b = new stdClass();
|
||||
$b->users = array(
|
||||
array('User' => array('id' => 2, 'group_id' => 1,
|
||||
'Data' => array('user' => 'mariano.iglesias','name' => 'Mariano Iglesias'))),
|
||||
'Data' => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'))),
|
||||
array('User' => array('id' => 14, 'group_id' => 2,
|
||||
'Data' => array('user' => 'phpnut', 'name' => 'Larry E. Masters'))),
|
||||
array('User' => array('id' => 25, 'group_id' => 1,
|
||||
'Data' => array('user' => 'gwoo','name' => 'The Gwoo'))));
|
||||
'Data' => array('user' => 'gwoo', 'name' => 'The Gwoo'))));
|
||||
$result = Set::combine($b, 'users.{n}.User.id');
|
||||
$expected = array(2 => null, 14 => null, 25 => null);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
@ -2032,7 +2032,7 @@ class SetTest extends CakeTestCase {
|
|||
|
||||
$expected = array(
|
||||
'Array1' => array(
|
||||
'Array1Data1' => 'Array1Data1 value 1', 'Array1Data2' => 'Array1Data2 value 2', 'Array1Data3' => 'Array1Data3 value 3','Array1Data4' => 'Array1Data4 value 4',
|
||||
'Array1Data1' => 'Array1Data1 value 1', 'Array1Data2' => 'Array1Data2 value 2', 'Array1Data3' => 'Array1Data3 value 3', 'Array1Data4' => 'Array1Data4 value 4',
|
||||
'Array1Data5' => 'Array1Data5 value 5', 'Array1Data6' => 'Array1Data6 value 6', 'Array1Data7' => 'Array1Data7 value 7', 'Array1Data8' => 'Array1Data8 value 8'),
|
||||
'string' => 1,
|
||||
'another' => 'string',
|
||||
|
@ -2055,7 +2055,7 @@ class SetTest extends CakeTestCase {
|
|||
|
||||
$expected = array(
|
||||
'Array1' => array(
|
||||
'Array1Data1' => 'Array1Data1 value 1', 'Array1Data2' => 'Array1Data2 value 2', 'Array1Data3' => 'Array1Data3 value 3','Array1Data4' => 'Array1Data4 value 4',
|
||||
'Array1Data1' => 'Array1Data1 value 1', 'Array1Data2' => 'Array1Data2 value 2', 'Array1Data3' => 'Array1Data3 value 3', 'Array1Data4' => 'Array1Data4 value 4',
|
||||
'Array1Data5' => 'Array1Data5 value 5', 'Array1Data6' => 'Array1Data6 value 6', 'Array1Data7' => 'Array1Data7 value 7', 'Array1Data8' => 'Array1Data8 value 8'),
|
||||
'string' => 1,
|
||||
'another' => 'string',
|
||||
|
@ -2357,7 +2357,7 @@ class SetTest extends CakeTestCase {
|
|||
'Content-Length' => "50210",
|
||||
),
|
||||
'meta' => array(
|
||||
'keywords' => array('testing','tests'),
|
||||
'keywords' => array('testing', 'tests'),
|
||||
'description' => 'describe me',
|
||||
),
|
||||
'get_vars' => '',
|
||||
|
@ -2384,7 +2384,7 @@ class SetTest extends CakeTestCase {
|
|||
'Content-Length' => "50210",
|
||||
),
|
||||
'meta' => array(
|
||||
'keywords' => array('testing','tests'),
|
||||
'keywords' => array('testing', 'tests'),
|
||||
'description' => 'describe me',
|
||||
),
|
||||
'get_vars' => '',
|
||||
|
@ -2443,8 +2443,8 @@ class SetTest extends CakeTestCase {
|
|||
$expected->hash = '68a9f053b19526d08e36c6a9ad150737933816a5';
|
||||
$expected->get_vars = '';
|
||||
$expected->redirect = '';
|
||||
$expected->created = "1195055503";
|
||||
$expected->updated = "1195055503";
|
||||
$expected->created = '1195055503';
|
||||
$expected->updated = '1195055503';
|
||||
// @codingStandardsIgnoreEnd
|
||||
$this->assertEquals($expected, $mapped[1]);
|
||||
|
||||
|
@ -2492,9 +2492,9 @@ class SetTest extends CakeTestCase {
|
|||
$expected->Author->id = '1';
|
||||
$expected->Author->user = 'mariano';
|
||||
$expected->Author->password = '5f4dcc3b5aa765d61d8327deb882cf99';
|
||||
$expected->Author->created = "2007-03-17 01:16:23";
|
||||
$expected->Author->updated = "2007-03-17 01:18:31";
|
||||
$expected->Author->test = "working";
|
||||
$expected->Author->created = '2007-03-17 01:16:23';
|
||||
$expected->Author->updated = '2007-03-17 01:18:31';
|
||||
$expected->Author->test = 'working';
|
||||
$expected->Author->_name_ = 'Author';
|
||||
|
||||
$expected2 = new stdClass;
|
||||
|
@ -2511,9 +2511,9 @@ class SetTest extends CakeTestCase {
|
|||
$expected2->Author->id = '3';
|
||||
$expected2->Author->user = 'larry';
|
||||
$expected2->Author->password = '5f4dcc3b5aa765d61d8327deb882cf99';
|
||||
$expected2->Author->created = "2007-03-17 01:20:23";
|
||||
$expected2->Author->updated = "2007-03-17 01:22:31";
|
||||
$expected2->Author->test = "working";
|
||||
$expected2->Author->created = '2007-03-17 01:20:23';
|
||||
$expected2->Author->updated = '2007-03-17 01:22:31';
|
||||
$expected2->Author->test = 'working';
|
||||
$expected2->Author->_name_ = 'Author';
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
|
@ -2546,7 +2546,7 @@ class SetTest extends CakeTestCase {
|
|||
$expected->Author->password = '5f4dcc3b5aa765d61d8327deb882cf99';
|
||||
$expected->Author->created = "2007-03-17 01:16:23";
|
||||
$expected->Author->updated = "2007-03-17 01:18:31";
|
||||
$expected->Author->test = "working";
|
||||
$expected->Author->test = 'working';
|
||||
$expected->Author->_name_ = 'Author';
|
||||
// @codingStandardsIgnoreEnd
|
||||
$this->assertEquals($expected, $result);
|
||||
|
|
|
@ -945,7 +945,7 @@ class ValidationTest extends CakeTestCase {
|
|||
$this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => '<', 'check2' => 7)));
|
||||
$this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'greater or equal', 'check2' => 7)));
|
||||
$this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => '>=', 'check2' => 7)));
|
||||
$this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'greater or equal','check2' => 6)));
|
||||
$this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'greater or equal', 'check2' => 6)));
|
||||
$this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => '>=', 'check2' => 6)));
|
||||
$this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => 'less or equal', 'check2' => 7)));
|
||||
$this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => '<=', 'check2' => 7)));
|
||||
|
@ -964,7 +964,7 @@ class ValidationTest extends CakeTestCase {
|
|||
$this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'less or equal', 'check2' => 6)));
|
||||
$this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '<=', 'check2' => 6)));
|
||||
$this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'equal to', 'check2' => 6)));
|
||||
$this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '==','check2' => 6)));
|
||||
$this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '==', 'check2' => 6)));
|
||||
$this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'not equal', 'check2' => 7)));
|
||||
$this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '!=', 'check2' => 7)));
|
||||
}
|
||||
|
|
|
@ -1668,7 +1668,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
$result = $this->Form->create('ValidateUser', array('type' => 'post', 'action' => 'add'));
|
||||
$encoding = strtolower(Configure::read('App.encoding'));
|
||||
$expected = array(
|
||||
'form' => array('method' => 'post', 'action' => '/validate_users/add', 'id','accept-charset' => $encoding),
|
||||
'form' => array('method' => 'post', 'action' => '/validate_users/add', 'id', 'accept-charset' => $encoding),
|
||||
'div' => array('style' => 'display:none;'),
|
||||
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
|
||||
'/div'
|
||||
|
@ -2270,7 +2270,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
|
||||
$result = $this->Form->input('prueba', array(
|
||||
'type' => 'time', 'timeFormat' => 24 , 'dateFormat' => 'DMY' , 'minYear' => 2008,
|
||||
'maxYear' => date('Y') + 1 ,'interval' => 15
|
||||
'maxYear' => date('Y') + 1 , 'interval' => 15
|
||||
));
|
||||
$result = explode(':', $result);
|
||||
$this->assertNotRegExp('#<option value="12"[^>]*>12</option>#', $result[1]);
|
||||
|
@ -7282,7 +7282,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
$expected = array(
|
||||
'form' => array(
|
||||
'id' => 'ContactNonStandardPkEditForm', 'method' => 'post',
|
||||
'action' => '/contact_non_standard_pks/edit/1','accept-charset' => $encoding
|
||||
'action' => '/contact_non_standard_pks/edit/1', 'accept-charset' => $encoding
|
||||
),
|
||||
'div' => array('style' => 'display:none;'),
|
||||
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'PUT'),
|
||||
|
@ -7527,7 +7527,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
*/
|
||||
public function testCreateWithAcceptCharset() {
|
||||
$result = $this->Form->create('UserForm', array(
|
||||
'type' => 'post', 'action' => 'login','encoding' => 'iso-8859-1'
|
||||
'type' => 'post', 'action' => 'login', 'encoding' => 'iso-8859-1'
|
||||
)
|
||||
);
|
||||
$expected = array(
|
||||
|
|
|
@ -53,15 +53,15 @@ class AcoTwoFixture extends CakeTestFixture {
|
|||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 20),
|
||||
array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'tpsReports','lft' => 2, 'rght' => 9),
|
||||
array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'view', 'lft' => 3, 'rght' => 6),
|
||||
array('parent_id' => 3, 'model' => null, 'foreign_key' => null, 'alias' => 'current', 'lft' => 4, 'rght' => 5),
|
||||
array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'update', 'lft' => 7, 'rght' => 8),
|
||||
array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'printers', 'lft' => 10, 'rght' => 19),
|
||||
array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'print', 'lft' => 11, 'rght' => 14),
|
||||
array('parent_id' => 7, 'model' => null, 'foreign_key' => null, 'alias' => 'lettersize','lft' => 12, 'rght' => 13),
|
||||
array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'refill', 'lft' => 15, 'rght' => 16),
|
||||
array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'smash', 'lft' => 17, 'rght' => 18),
|
||||
array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 20),
|
||||
array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'tpsReports','lft' => 2, 'rght' => 9),
|
||||
array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'view', 'lft' => 3, 'rght' => 6),
|
||||
array('parent_id' => 3, 'model' => null, 'foreign_key' => null, 'alias' => 'current', 'lft' => 4, 'rght' => 5),
|
||||
array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'update', 'lft' => 7, 'rght' => 8),
|
||||
array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'printers', 'lft' => 10, 'rght' => 19),
|
||||
array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'print', 'lft' => 11, 'rght' => 14),
|
||||
array('parent_id' => 7, 'model' => null, 'foreign_key' => null, 'alias' => 'lettersize','lft' => 12, 'rght' => 13),
|
||||
array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'refill', 'lft' => 15, 'rght' => 16),
|
||||
array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'smash', 'lft' => 17, 'rght' => 18),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -53,15 +53,15 @@ class AroTwoFixture extends CakeTestFixture {
|
|||
* @var array
|
||||
*/
|
||||
public $records = array(
|
||||
array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'root', 'lft' => '1', 'rght' => '20'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '1', 'alias' => 'admin', 'lft' => '2', 'rght' => '5'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '2', 'alias' => 'managers', 'lft' => '6', 'rght' => '9'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '3', 'alias' => 'users', 'lft' => '10', 'rght' => '19'),
|
||||
array('parent_id' => 2, 'model' => 'User', 'foreign_key' => '1', 'alias' => 'Bobs', 'lft' => '3', 'rght' => '4'),
|
||||
array('parent_id' => 3, 'model' => 'User', 'foreign_key' => '2', 'alias' => 'Lumbergh', 'lft' => '7' , 'rght' => '8'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '3', 'alias' => 'Samir', 'lft' => '11' , 'rght' => '12'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '4', 'alias' => 'Micheal', 'lft' => '13', 'rght' => '14'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '5', 'alias' => 'Peter', 'lft' => '15', 'rght' => '16'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '6', 'alias' => 'Milton', 'lft' => '17', 'rght' => '18'),
|
||||
array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'root', 'lft' => '1', 'rght' => '20'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '1', 'alias' => 'admin', 'lft' => '2', 'rght' => '5'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '2', 'alias' => 'managers', 'lft' => '6', 'rght' => '9'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '3', 'alias' => 'users', 'lft' => '10', 'rght' => '19'),
|
||||
array('parent_id' => 2, 'model' => 'User', 'foreign_key' => '1', 'alias' => 'Bobs', 'lft' => '3', 'rght' => '4'),
|
||||
array('parent_id' => 3, 'model' => 'User', 'foreign_key' => '2', 'alias' => 'Lumbergh', 'lft' => '7' , 'rght' => '8'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '3', 'alias' => 'Samir', 'lft' => '11' , 'rght' => '12'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '4', 'alias' => 'Micheal', 'lft' => '13', 'rght' => '14'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '5', 'alias' => 'Peter', 'lft' => '15', 'rght' => '16'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '6', 'alias' => 'Milton', 'lft' => '17', 'rght' => '18'),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class CakeSessionFixture extends CakeTestFixture {
|
|||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'string', 'length' => 128, 'key' => 'primary'),
|
||||
'data' => array('type' => 'text','null' => true),
|
||||
'data' => array('type' => 'text', 'null' => true),
|
||||
'expires' => array('type' => 'integer', 'length' => 11, 'null' => true)
|
||||
);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class SessionFixture extends CakeTestFixture {
|
|||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'string', 'length' => 128, 'key' => 'primary'),
|
||||
'data' => array('type' => 'text','null' => true),
|
||||
'data' => array('type' => 'text', 'null' => true),
|
||||
'expires' => array('type' => 'integer', 'length' => 11, 'null' => true)
|
||||
);
|
||||
|
||||
|
|
|
@ -40,9 +40,9 @@ class UuidTreeFixture extends CakeTestFixture {
|
|||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'),
|
||||
'name' => array('type' => 'string','null' => false),
|
||||
'name' => array('type' => 'string', 'null' => false),
|
||||
'parent_id' => array('type' => 'string', 'length' => 36, 'null' => true),
|
||||
'lft' => array('type' => 'integer','null' => false),
|
||||
'rght' => array('type' => 'integer','null' => false)
|
||||
'lft' => array('type' => 'integer', 'null' => false),
|
||||
'rght' => array('type' => 'integer', 'null' => false)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
<!--nocache--><?php $x++; ?><!--/nocache-->
|
||||
<!--nocache--><?php $x++; ?><!--/nocache-->
|
||||
<?php echo $content_for_layout; ?>
|
||||
<?php echo $content_for_layout; ?>
|
||||
<!--nocache--><?php echo 'cached count is: ' . $x; ?><!--/nocache-->
|
||||
</body>
|
||||
</html>
|
|
@ -60,7 +60,7 @@ if (isset($filePresent)):
|
|||
<?php
|
||||
if ($connected && $connected->isConnected()):
|
||||
echo '<span class="notice success">';
|
||||
echo __d('cake_dev', 'Cake is able to connect to the database.');
|
||||
echo __d('cake_dev', 'Cake is able to connect to the database.');
|
||||
echo '</span>';
|
||||
else:
|
||||
echo '<span class="notice">';
|
||||
|
|
|
@ -67,7 +67,7 @@ if (!empty($filePresent)):
|
|||
<span class="notice">
|
||||
<?php echo __d('cake', 'Cake');
|
||||
if ($connected->isConnected()):
|
||||
__d('cake', ' is able to ');
|
||||
__d('cake', ' is able to ');
|
||||
else:
|
||||
__d('cake', ' is NOT able to ');
|
||||
endif;
|
||||
|
|
|
@ -162,7 +162,7 @@ class CakeTextReporter extends CakeBaseReporter {
|
|||
}
|
||||
|
||||
if (1 > count($testCases)) {
|
||||
$buffer .= "EMPTY";
|
||||
$buffer .= 'EMPTY';
|
||||
echo $buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -550,7 +550,7 @@ class Debugger {
|
|||
// Sniff for globals as !== explodes in < 5.4
|
||||
if ($key === 'GLOBALS' && is_array($val) && isset($val['GLOBALS'])) {
|
||||
$val = '[recursion]';
|
||||
} else if ($val !== $var) {
|
||||
} elseif ($val !== $var) {
|
||||
$val = self::_export($val, $depth, $indent);
|
||||
}
|
||||
$vars[] = $break . self::exportVar($key) .
|
||||
|
|
Loading…
Reference in a new issue