From eadc3a75e564ac0d12e29e0d5d3c86193f986266 Mon Sep 17 00:00:00 2001 From: Ceeram Date: Wed, 21 Nov 2012 15:39:03 +0100 Subject: [PATCH] fix coding standards --- lib/Cake/Console/Command/AclShell.php | 2 +- lib/Cake/Console/Command/ApiShell.php | 2 +- lib/Cake/Console/Command/Task/ExtractTask.php | 2 +- lib/Cake/Console/Command/Task/ViewTask.php | 2 +- lib/Cake/Controller/Component/Acl/PhpAcl.php | 4 +- .../Controller/Component/EmailComponent.php | 2 +- lib/Cake/Controller/Controller.php | 2 +- lib/Cake/Event/CakeEventListener.php | 2 +- .../Model/Datasource/Database/Postgres.php | 2 +- .../Model/Datasource/Database/Sqlserver.php | 2 +- lib/Cake/Network/Http/HttpSocketResponse.php | 2 +- lib/Cake/Routing/Router.php | 4 +- .../Test/Case/Console/ShellDispatcherTest.php | 2 +- .../Component/EmailComponentTest.php | 6 +-- lib/Cake/Test/Case/Core/AppTest.php | 2 +- lib/Cake/Test/Case/I18n/MultibyteTest.php | 8 ++-- .../Model/Datasource/Database/MysqlTest.php | 2 +- .../Test/Case/Model/ModelIntegrationTest.php | 2 +- lib/Cake/Test/Case/Model/ModelReadTest.php | 14 +++---- lib/Cake/Test/Case/Model/ModelWriteTest.php | 30 +++++++------- .../Model/Validator/CakeValidationSetTest.php | 2 +- .../Test/Case/Network/CakeRequestTest.php | 2 +- .../Test/Case/Network/Email/CakeEmailTest.php | 18 ++++----- .../Test/Case/Network/Http/HttpSocketTest.php | 2 +- .../Routing/Route/PluginShortRouteTest.php | 2 +- .../Case/Routing/Route/RedirectRouteTest.php | 2 +- lib/Cake/Test/Case/Routing/RouterTest.php | 8 ++-- .../Test/Case/TestSuite/CakeTestCaseTest.php | 2 - .../Case/TestSuite/CakeTestFixtureTest.php | 4 +- lib/Cake/Test/Case/Utility/DebuggerTest.php | 10 ++--- lib/Cake/Test/Case/Utility/SetTest.php | 22 +++++----- .../Test/Case/View/Helper/FormHelperTest.php | 2 +- .../Test/Case/View/Helper/HtmlHelperTest.php | 12 +++--- .../Case/View/Helper/PaginatorHelperTest.php | 2 +- .../Test/Case/View/Helper/RssHelperTest.php | 2 +- lib/Cake/Test/Fixture/AcoFixture.php | 10 ++--- lib/Cake/Test/Fixture/AcoTwoFixture.php | 10 ++--- lib/Cake/Test/Fixture/AdFixture.php | 10 ++--- lib/Cake/Test/Fixture/AfterTreeFixture.php | 8 ++-- lib/Cake/Test/Fixture/AroTwoFixture.php | 12 +++--- lib/Cake/Test/Fixture/ArosAcoTwoFixture.php | 40 +++++++++---------- lib/Cake/Test/Fixture/AttachmentFixture.php | 2 +- .../Test/Fixture/CounterCachePostFixture.php | 6 +-- ...rCachePostNonstandardPrimaryKeyFixture.php | 6 +-- lib/Cake/Test/test_app/Config/acl.php | 28 ++++++------- lib/Cake/TestSuite/CakeTestCase.php | 4 +- lib/Cake/TestSuite/CakeTestSuiteCommand.php | 2 +- 47 files changed, 161 insertions(+), 163 deletions(-) diff --git a/lib/Cake/Console/Command/AclShell.php b/lib/Cake/Console/Command/AclShell.php index a65737ebf..fa04118f1 100644 --- a/lib/Cake/Console/Command/AclShell.php +++ b/lib/Cake/Console/Command/AclShell.php @@ -324,7 +324,7 @@ class AclShell extends AppShell { $this->hr(); $stack = array(); - $last = null; + $last = null; foreach ($nodes as $n) { $stack[] = $n; diff --git a/lib/Cake/Console/Command/ApiShell.php b/lib/Cake/Console/Command/ApiShell.php index 7a7b664e8..23971ed7f 100644 --- a/lib/Cake/Console/Command/ApiShell.php +++ b/lib/Cake/Console/Command/ApiShell.php @@ -161,7 +161,7 @@ class ApiShell extends AppShell { * @return void */ public function help() { - $head = "Usage: cake api [] [-m ]\n"; + $head = "Usage: cake api [] [-m ]\n"; $head .= "-----------------------------------------------\n"; $head .= "Parameters:\n\n"; diff --git a/lib/Cake/Console/Command/Task/ExtractTask.php b/lib/Cake/Console/Command/Task/ExtractTask.php index db86198ac..c8c6377ad 100644 --- a/lib/Cake/Console/Command/Task/ExtractTask.php +++ b/lib/Cake/Console/Command/Task/ExtractTask.php @@ -611,7 +611,7 @@ class ExtractTask extends AppShell { * @return string Translation template header */ protected function _writeHeader() { - $output = "# LANGUAGE translation of CakePHP Application\n"; + $output = "# LANGUAGE translation of CakePHP Application\n"; $output .= "# Copyright YEAR NAME \n"; $output .= "#\n"; $output .= "#, fuzzy\n"; diff --git a/lib/Cake/Console/Command/Task/ViewTask.php b/lib/Cake/Console/Command/Task/ViewTask.php index 2854c4aa8..b50c99a6a 100644 --- a/lib/Cake/Console/Command/Task/ViewTask.php +++ b/lib/Cake/Console/Command/Task/ViewTask.php @@ -207,7 +207,7 @@ class ViewTask extends BakeTask { $this->Controller->connection = $this->connection; $this->controllerName = $this->Controller->getName(); - $prompt = __d('cake_console', "Would you like bake to build your views interactively?\nWarning: Choosing no will overwrite %s views if it exist.", $this->controllerName); + $prompt = __d('cake_console', "Would you like bake to build your views interactively?\nWarning: Choosing no will overwrite %s views if it exist.", $this->controllerName); $interactive = $this->in($prompt, array('y', 'n'), 'n'); if (strtolower($interactive) == 'n') { diff --git a/lib/Cake/Controller/Component/Acl/PhpAcl.php b/lib/Cake/Controller/Component/Acl/PhpAcl.php index 468ea1267..c3bdeb53b 100644 --- a/lib/Cake/Controller/Component/Acl/PhpAcl.php +++ b/lib/Cake/Controller/Component/Acl/PhpAcl.php @@ -273,7 +273,7 @@ class PhpAco { foreach ($aco as $i => $node) { if (!isset($tree[$node])) { - $tree[$node] = array( + $tree[$node] = array( 'children' => array(), ); } @@ -519,7 +519,7 @@ class PhpAro { * @param array $alias alias from => to (e.g. Role/13 -> Role/editor) * @return void */ - public function addAlias(array $alias) { + public function addAlias(array $alias) { $this->aliases = array_merge($this->aliases, $alias); } diff --git a/lib/Cake/Controller/Component/EmailComponent.php b/lib/Cake/Controller/Component/EmailComponent.php index 18c25baa8..63145cba5 100644 --- a/lib/Cake/Controller/Component/EmailComponent.php +++ b/lib/Cake/Controller/Component/EmailComponent.php @@ -448,7 +448,7 @@ class EmailComponent extends Component { * @return string Stripped value */ protected function _strip($value, $message = false) { - $search = '%0a|%0d|Content-(?:Type|Transfer-Encoding)\:'; + $search = '%0a|%0d|Content-(?:Type|Transfer-Encoding)\:'; $search .= '|charset\=|mime-version\:|multipart/mixed|(?:[^a-z]to|b?cc)\:.*'; if ($message !== true) { diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index b393baffb..a54cfde5e 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -507,7 +507,7 @@ class Controller extends Object implements CakeEventListener { $privateAction = ( $method->name[0] === '_' || !$method->isPublic() || - !in_array($method->name, $this->methods) + !in_array($method->name, $this->methods) ); $prefixes = Router::prefixes(); diff --git a/lib/Cake/Event/CakeEventListener.php b/lib/Cake/Event/CakeEventListener.php index d1dd7de81..d39dadd3f 100644 --- a/lib/Cake/Event/CakeEventListener.php +++ b/lib/Cake/Event/CakeEventListener.php @@ -22,7 +22,7 @@ * * @package Cake.Event */ -interface CakeEventListener { +interface CakeEventListener { /** * Returns a list of events this object is implementing. When the class is registered diff --git a/lib/Cake/Model/Datasource/Database/Postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php index d7b1fa916..bbab17e3e 100644 --- a/lib/Cake/Model/Datasource/Database/Postgres.php +++ b/lib/Cake/Model/Datasource/Database/Postgres.php @@ -407,7 +407,7 @@ class Postgres extends DboSource { $fields[$i] = $prepend . $this->name($build[0]) . '.' . $this->name($build[1]) . ' AS ' . $this->name($build[0] . '__' . $build[1]); } } else { - $fields[$i] = preg_replace_callback('/\(([\s\.\w]+)\)/', array(&$this, '_quoteFunctionField'), $fields[$i]); + $fields[$i] = preg_replace_callback('/\(([\s\.\w]+)\)/', array(&$this, '_quoteFunctionField'), $fields[$i]); } $result[] = $fields[$i]; } diff --git a/lib/Cake/Model/Datasource/Database/Sqlserver.php b/lib/Cake/Model/Datasource/Database/Sqlserver.php index 6771a1ab6..8bd9d7bac 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlserver.php +++ b/lib/Cake/Model/Datasource/Database/Sqlserver.php @@ -283,7 +283,7 @@ class Sqlserver extends DboSource { if (strpos($fields[$i], '.') === false) { $this->_fieldMappings[$alias . '__' . $fields[$i]] = $alias . '.' . $fields[$i]; - $fieldName = $this->name($alias . '.' . $fields[$i]); + $fieldName = $this->name($alias . '.' . $fields[$i]); $fieldAlias = $this->name($alias . '__' . $fields[$i]); } else { $build = explode('.', $fields[$i]); diff --git a/lib/Cake/Network/Http/HttpSocketResponse.php b/lib/Cake/Network/Http/HttpSocketResponse.php index 9812894a7..45ce53f11 100644 --- a/lib/Cake/Network/Http/HttpSocketResponse.php +++ b/lib/Cake/Network/Http/HttpSocketResponse.php @@ -245,7 +245,7 @@ class HttpSocketResponse implements ArrayAccess { $chunkLength = hexdec($hexLength); $chunk = substr($body, 0, $chunkLength); if (!empty($chunkExtensionName)) { - // @todo See if there are popular chunk extensions we should implement + // @todo See if there are popular chunk extensions we should implement } $decodedBody .= $chunk; if ($chunkLength !== 0) { diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 33b098dc5..23b7f2d0e 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -130,9 +130,9 @@ class Router { 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' => 'edit', 'method' => 'PUT', 'id' => true), array('action' => 'delete', 'method' => 'DELETE', 'id' => true), - array('action' => 'edit', 'method' => 'POST', 'id' => true) + array('action' => 'edit', 'method' => 'POST', 'id' => true) ); /** diff --git a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php index c115b9df3..52b5015c5 100644 --- a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php +++ b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php @@ -564,7 +564,7 @@ class ShellDispatcherTest extends CakeTestCase { $this->assertEquals('a', $Dispatcher->shiftArgs()); $this->assertSame($Dispatcher->args, array('b' => 'c', 'd')); - $Dispatcher->args = array(0 => 'a', 2 => 'b', 30 => 'c'); + $Dispatcher->args = array(0 => 'a', 2 => 'b', 30 => 'c'); $this->assertEquals('a', $Dispatcher->shiftArgs()); $this->assertSame($Dispatcher->args, array(0 => 'b', 1 => 'c')); diff --git a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php index 4e8183315..9cfc8d6c6 100644 --- a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php @@ -596,13 +596,13 @@ HTMLBLOC; $this->assertEquals($expected, $result); $content = '

Some HTML content with an email link'; - $result = $this->Controller->EmailTest->strip($content, true); + $result = $this->Controller->EmailTest->strip($content, true); $expected = $content; $this->assertEquals($expected, $result); - $content = '

Some HTML content with an '; + $content = '

Some HTML content with an '; $content .= 'email link'; - $result = $this->Controller->EmailTest->strip($content, true); + $result = $this->Controller->EmailTest->strip($content, true); $expected = $content; $this->assertEquals($expected, $result); } diff --git a/lib/Cake/Test/Case/Core/AppTest.php b/lib/Cake/Test/Case/Core/AppTest.php index 3ca29b3a1..2b56aa405 100644 --- a/lib/Cake/Test/Case/Core/AppTest.php +++ b/lib/Cake/Test/Case/Core/AppTest.php @@ -302,7 +302,7 @@ class AppTest extends CakeTestCase { * @return void */ public function testListObjects() { - $result = App::objects('class', CAKE . 'Routing', false); + $result = App::objects('class', CAKE . 'Routing', false); $this->assertTrue(in_array('Dispatcher', $result)); $this->assertTrue(in_array('Router', $result)); diff --git a/lib/Cake/Test/Case/I18n/MultibyteTest.php b/lib/Cake/Test/Case/I18n/MultibyteTest.php index 927b84405..64dd936b5 100644 --- a/lib/Cake/Test/Case/I18n/MultibyteTest.php +++ b/lib/Cake/Test/Case/I18n/MultibyteTest.php @@ -260,9 +260,9 @@ class MultibyteTest extends CakeTestCase { 7716, 7718, 7720, 7722, 7724, 7726, 7728, 7730, 7732, 7734, 7736, 7738, 7740, 7742, 7744, 7746, 7748, 7750, 7752, 7754, 7756, 7758, 7760, 7762, 7764, 7766, 7768, 7770, 7772, 7774, 7776, 7778, 7780, 7782, 7784, 7786, 7788, 7790, 7792, 7794, 7796, 7798, 7800, 7802, 7804, 7806, 7808, 7810, 7812, 7814, 7816, 7818, 7820, 7822, - 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, + 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, 7858, 7860, 7862, 7864, 7866, 7868, 7870, 7872, 7874, 7876, 7878, 7880, 7882, 7884, 7886, 7888, 7890, 7892, - 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); + 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); $this->assertEquals($expected, $result); $string = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ'; @@ -579,9 +579,9 @@ class MultibyteTest extends CakeTestCase { 7716, 7718, 7720, 7722, 7724, 7726, 7728, 7730, 7732, 7734, 7736, 7738, 7740, 7742, 7744, 7746, 7748, 7750, 7752, 7754, 7756, 7758, 7760, 7762, 7764, 7766, 7768, 7770, 7772, 7774, 7776, 7778, 7780, 7782, 7784, 7786, 7788, 7790, 7792, 7794, 7796, 7798, 7800, 7802, 7804, 7806, 7808, 7810, 7812, 7814, 7816, 7818, 7820, 7822, - 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, + 7824, 7826, 7828, 7830, 7831, 7832, 7833, 7834, 7840, 7842, 7844, 7846, 7848, 7850, 7852, 7854, 7856, 7858, 7860, 7862, 7864, 7866, 7868, 7870, 7872, 7874, 7876, 7878, 7880, 7882, 7884, 7886, 7888, 7890, 7892, - 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); + 7894, 7896, 7898, 7900, 7902, 7904, 7906, 7908, 7910, 7912, 7914, 7916, 7918, 7920, 7922, 7924, 7926, 7928); $result = Multibyte::ascii($input); $expected = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ'; $this->assertEquals($expected, $result); diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index aefcbe52d..4d51c3bb6 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -3028,7 +3028,7 @@ class MysqlTest extends CakeTestCase { 'type' => 'timestamp', 'default' => 'current_timestamp', 'null' => false, - ); + ); $result = $this->Dbo->buildColumn($data); $expected = '`created` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL'; $this->assertEquals($expected, $result); diff --git a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php index 4eec3151f..a6c257b63 100644 --- a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php +++ b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php @@ -1427,7 +1427,7 @@ class ModelIntegrationTest extends BaseModelTest { $assocTypes = array('hasMany', 'hasOne', 'belongsTo', 'hasAndBelongsToMany'); foreach ($assocTypes as $type) { - $this->assertEquals($Article->getAssociated($type), array_keys($Article->{$type})); + $this->assertEquals($Article->getAssociated($type), array_keys($Article->{$type})); } $Article->bindModel(array('hasMany' => array('Category'))); diff --git a/lib/Cake/Test/Case/Model/ModelReadTest.php b/lib/Cake/Test/Case/Model/ModelReadTest.php index abbbd13a6..0f0f860f4 100644 --- a/lib/Cake/Test/Case/Model/ModelReadTest.php +++ b/lib/Cake/Test/Case/Model/ModelReadTest.php @@ -254,7 +254,7 @@ class ModelReadTest extends BaseModelTest { $this->loadFixtures('Article', 'User', 'Tag', 'ArticlesTag', 'Comment', 'Attachment'); $Article = new Article(); - $query = 'SELECT title FROM '; + $query = 'SELECT title FROM '; $query .= $this->db->fullTableName('articles'); $query .= ' WHERE ' . $this->db->fullTableName('articles') . '.id IN (1,2)'; @@ -262,7 +262,7 @@ class ModelReadTest extends BaseModelTest { $this->assertTrue(is_array($results)); $this->assertEquals(2, count($results)); - $query = 'SELECT title, body FROM '; + $query = 'SELECT title, body FROM '; $query .= $this->db->fullTableName('articles'); $query .= ' WHERE ' . $this->db->fullTableName('articles') . '.id = 1'; @@ -270,7 +270,7 @@ class ModelReadTest extends BaseModelTest { $this->assertFalse($this->db->getQueryCache($query)); $this->assertTrue(is_array($results)); - $query = 'SELECT title, id FROM '; + $query = 'SELECT title, id FROM '; $query .= $this->db->fullTableName('articles'); $query .= ' WHERE ' . $this->db->fullTableName('articles'); $query .= '.published = ' . $this->db->value('Y'); @@ -312,7 +312,7 @@ class ModelReadTest extends BaseModelTest { $result = $this->db->getQueryCache($query, $params); $this->assertFalse(empty($result)); - $query = 'SELECT id, created FROM '; + $query = 'SELECT id, created FROM '; $query .= $this->db->fullTableName('articles'); $query .= ' WHERE ' . $this->db->fullTableName('articles') . '.title = ?'; @@ -326,7 +326,7 @@ class ModelReadTest extends BaseModelTest { $result = $this->db->getQueryCache($query, $params); $this->assertTrue(empty($result)); - $query = 'SELECT title FROM '; + $query = 'SELECT title FROM '; $query .= $this->db->fullTableName('articles'); $query .= ' WHERE ' . $this->db->fullTableName('articles') . '.title LIKE ?'; @@ -339,7 +339,7 @@ class ModelReadTest extends BaseModelTest { ); //related to ticket #5035 - $query = 'SELECT title FROM '; + $query = 'SELECT title FROM '; $query .= $this->db->fullTableName('articles') . ' WHERE title = ? AND published = ?'; $params = array('First? Article', 'Y'); $Article->query($query, $params); @@ -359,7 +359,7 @@ class ModelReadTest extends BaseModelTest { $this->loadFixtures('Article', 'User', 'Tag', 'ArticlesTag'); $Article = new Article(); - $query = 'SELECT * FROM ' . $this->db->fullTableName('articles'); + $query = 'SELECT * FROM ' . $this->db->fullTableName('articles'); $query .= ' WHERE ' . $this->db->fullTableName('articles'); $query .= '.published = ? AND ' . $this->db->fullTableName('articles') . '.user_id = ?'; $params = array('Y'); diff --git a/lib/Cake/Test/Case/Model/ModelWriteTest.php b/lib/Cake/Test/Case/Model/ModelWriteTest.php index 2879c3a10..0a862d783 100644 --- a/lib/Cake/Test/Case/Model/ModelWriteTest.php +++ b/lib/Cake/Test/Case/Model/ModelWriteTest.php @@ -6281,8 +6281,8 @@ class ModelWriteTest extends BaseModelTest { 'ProductUpdateAll' => array( 'id' => 1, 'name' => 'product one', - 'groupcode' => 120, - 'group_id' => 1), + 'groupcode' => 120, + 'group_id' => 1), 'Group' => array( 'id' => 1, 'name' => 'group one', @@ -6292,7 +6292,7 @@ class ModelWriteTest extends BaseModelTest { 'ProductUpdateAll' => array( 'id' => 2, 'name' => 'product two', - 'groupcode' => 120, + 'groupcode' => 120, 'group_id' => 1), 'Group' => array( 'id' => 1, @@ -6344,9 +6344,9 @@ class ModelWriteTest extends BaseModelTest { '0' => array( 'ProductUpdateAll' => array( 'id' => 1, - 'name' => 'new product', - 'groupcode' => 120, - 'group_id' => 1), + 'name' => 'new product', + 'groupcode' => 120, + 'group_id' => 1), 'Group' => array( 'id' => 1, 'name' => 'group one', @@ -6355,9 +6355,9 @@ class ModelWriteTest extends BaseModelTest { '1' => array( 'ProductUpdateAll' => array( 'id' => 2, - 'name' => 'new product', - 'groupcode' => 120, - 'group_id' => 1), + 'name' => 'new product', + 'groupcode' => 120, + 'group_id' => 1), 'Group' => array( 'id' => 1, 'name' => 'group one', @@ -6397,9 +6397,9 @@ class ModelWriteTest extends BaseModelTest { '0' => array( 'ProductUpdateAll' => array( 'id' => 1, - 'name' => 'new product', - 'groupcode' => 120, - 'group_id' => 1), + 'name' => 'new product', + 'groupcode' => 120, + 'group_id' => 1), 'Group' => array( 'id' => 1, 'name' => 'group one', @@ -6408,9 +6408,9 @@ class ModelWriteTest extends BaseModelTest { '1' => array( 'ProductUpdateAll' => array( 'id' => 2, - 'name' => 'new product', - 'groupcode' => 120, - 'group_id' => 1), + 'name' => 'new product', + 'groupcode' => 120, + 'group_id' => 1), 'Group' => array( 'id' => 1, 'name' => 'group one', diff --git a/lib/Cake/Test/Case/Model/Validator/CakeValidationSetTest.php b/lib/Cake/Test/Case/Model/Validator/CakeValidationSetTest.php index aa604fac9..e2aad21a9 100644 --- a/lib/Cake/Test/Case/Model/Validator/CakeValidationSetTest.php +++ b/lib/Cake/Test/Case/Model/Validator/CakeValidationSetTest.php @@ -24,7 +24,7 @@ App::uses('CakeValidationSet', 'Model/Validator'); * * @package Cake.Test.Case.Model.Validator */ -class CakeValidationSetTest extends CakeTestCase { +class CakeValidationSetTest extends CakeTestCase { /** * testValidate method diff --git a/lib/Cake/Test/Case/Network/CakeRequestTest.php b/lib/Cake/Test/Case/Network/CakeRequestTest.php index 189a109c7..e971b4bce 100644 --- a/lib/Cake/Test/Case/Network/CakeRequestTest.php +++ b/lib/Cake/Test/Case/Network/CakeRequestTest.php @@ -1337,7 +1337,7 @@ class CakeRequestTest extends CakeTestCase { return array( array( 'IIS - No rewrite base path', - array( + array( 'App' => array( 'base' => false, 'baseUrl' => '/index.php', diff --git a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php index 575b6b082..2c1348e81 100644 --- a/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php +++ b/lib/Cake/Test/Case/Network/Email/CakeEmailTest.php @@ -1772,9 +1772,9 @@ class CakeEmailTest extends CakeTestCase { $newStyleEmail = $this->_getEmailByNewStyleCharset('iso-2022-jp', null); $newStyleHeaders = $newStyleEmail->getHeaders($checkHeaders); - $this->assertSame($oldStyleHeaders['From'], $newStyleHeaders['From']); - $this->assertSame($oldStyleHeaders['To'], $newStyleHeaders['To']); - $this->assertSame($oldStyleHeaders['Cc'], $newStyleHeaders['Cc']); + $this->assertSame($oldStyleHeaders['From'], $newStyleHeaders['From']); + $this->assertSame($oldStyleHeaders['To'], $newStyleHeaders['To']); + $this->assertSame($oldStyleHeaders['Cc'], $newStyleHeaders['Cc']); $this->assertSame($oldStyleHeaders['Subject'], $newStyleHeaders['Subject']); // Header Charset : UTF-8 @@ -1785,9 +1785,9 @@ class CakeEmailTest extends CakeTestCase { $newStyleEmail = $this->_getEmailByNewStyleCharset('iso-2022-jp', 'utf-8'); $newStyleHeaders = $newStyleEmail->getHeaders($checkHeaders); - $this->assertSame($oldStyleHeaders['From'], $newStyleHeaders['From']); - $this->assertSame($oldStyleHeaders['To'], $newStyleHeaders['To']); - $this->assertSame($oldStyleHeaders['Cc'], $newStyleHeaders['Cc']); + $this->assertSame($oldStyleHeaders['From'], $newStyleHeaders['From']); + $this->assertSame($oldStyleHeaders['To'], $newStyleHeaders['To']); + $this->assertSame($oldStyleHeaders['Cc'], $newStyleHeaders['Cc']); $this->assertSame($oldStyleHeaders['Subject'], $newStyleHeaders['Subject']); // Header Charset : ISO-2022-JP @@ -1798,9 +1798,9 @@ class CakeEmailTest extends CakeTestCase { $newStyleEmail = $this->_getEmailByNewStyleCharset('utf-8', 'iso-2022-jp'); $newStyleHeaders = $newStyleEmail->getHeaders($checkHeaders); - $this->assertSame($oldStyleHeaders['From'], $newStyleHeaders['From']); - $this->assertSame($oldStyleHeaders['To'], $newStyleHeaders['To']); - $this->assertSame($oldStyleHeaders['Cc'], $newStyleHeaders['Cc']); + $this->assertSame($oldStyleHeaders['From'], $newStyleHeaders['From']); + $this->assertSame($oldStyleHeaders['To'], $newStyleHeaders['To']); + $this->assertSame($oldStyleHeaders['Cc'], $newStyleHeaders['Cc']); $this->assertSame($oldStyleHeaders['Subject'], $newStyleHeaders['Subject']); } diff --git a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php b/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php index 1b507e964..d9d6f3ffd 100644 --- a/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php +++ b/lib/Cake/Test/Case/Network/Http/HttpSocketTest.php @@ -221,7 +221,7 @@ class HttpSocketTest extends CakeTestCase { $baseConfig = $this->Socket->config; $this->Socket->expects($this->never())->method('connect'); $this->Socket->__construct(array('host' => 'foo-bar')); - $baseConfig['host'] = 'foo-bar'; + $baseConfig['host'] = 'foo-bar'; $baseConfig['protocol'] = getprotobyname($baseConfig['protocol']); $this->assertEquals($this->Socket->config, $baseConfig); diff --git a/lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php b/lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php index 4438d47ec..f85269873 100644 --- a/lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php +++ b/lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php @@ -25,7 +25,7 @@ App::uses('Router', 'Routing'); * * @package Cake.Test.Case.Routing.Route */ -class PluginShortRouteTest extends CakeTestCase { +class PluginShortRouteTest extends CakeTestCase { /** * setUp method diff --git a/lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php b/lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php index 33b4276b0..7385f155f 100644 --- a/lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php +++ b/lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php @@ -26,7 +26,7 @@ App::uses('Router', 'Routing'); * * @package Cake.Test.Case.Routing.Route */ -class RedirectRouteTest extends CakeTestCase { +class RedirectRouteTest extends CakeTestCase { /** * setUp method diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index a2fef73c2..6d0c19120 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -2578,9 +2578,9 @@ class RouterTest extends CakeTestCase { 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' => 'edit', 'method' => 'PUT', 'id' => true), array('action' => 'delete', 'method' => 'DELETE', 'id' => true), - array('action' => 'edit', 'method' => 'POST', 'id' => true) + array('action' => 'edit', 'method' => 'POST', 'id' => true) ); $this->assertEquals($default, $expected); @@ -2588,9 +2588,9 @@ class RouterTest extends CakeTestCase { 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' => 'edit', 'method' => 'PUT', 'id' => true), array('action' => 'delete', 'method' => 'DELETE', 'id' => true), - array('action' => 'update', 'method' => 'POST', 'id' => true) + array('action' => 'update', 'method' => 'POST', 'id' => true) ); Router::resourceMap($custom); $this->assertEquals(Router::resourceMap(), $custom); diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php index 30aad2826..7aedbe3ba 100644 --- a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php @@ -352,7 +352,6 @@ class CakeTestCaseTest extends CakeTestCase { * @return void */ public function testGetMockForModel() { - $Post = $this->getMockForModel('Post'); $this->assertInstanceOf('Post', $Post); @@ -372,7 +371,6 @@ class CakeTestCaseTest extends CakeTestCase { * @return void */ public function testGetMockForModelWithPlugin() { - $TestPluginComment = $this->getMockForModel('TestPlugin.TestPluginComment'); $result = ClassRegistry::init('TestPlugin.TestPluginComment'); diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php index 6afdc0b35..ab26dac6e 100644 --- a/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php +++ b/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php @@ -47,7 +47,7 @@ class CakeTestFixtureTestFixture extends CakeTestFixture { * @var array */ public $fields = array( - 'id' => array('type' => 'integer', 'key' => 'primary'), + 'id' => array('type' => 'integer', 'key' => 'primary'), 'name' => array('type' => 'string', 'length' => '255'), 'created' => array('type' => 'datetime') ); @@ -92,7 +92,7 @@ class StringsTestFixture extends CakeTestFixture { * @var array */ public $fields = array( - 'id' => array('type' => 'integer', 'key' => 'primary'), + 'id' => array('type' => 'integer', 'key' => 'primary'), 'name' => array('type' => 'string', 'length' => '255'), 'email' => array('type' => 'string', 'length' => '255'), 'age' => array('type' => 'integer', 'default' => 10) diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index bb1416f78..dd07dc84c 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -135,8 +135,8 @@ class DebuggerTest extends CakeTestCase { 'a' => array( 'href' => "javascript:void(0);", 'onclick' => "preg:/document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display = " . - "\(document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display == 'none'" . - " \? '' \: 'none'\);/" + "\(document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display == 'none'" . + " \? '' \: 'none'\);/" ), 'b' => array(), 'Notice', '/b', ' (8)', )); @@ -165,7 +165,7 @@ class DebuggerTest extends CakeTestCase { Debugger::output('xml', array( 'error' => '{:code}{:file}{:line}' . - '{:description}', + '{:description}', 'context' => "{:context}", 'trace' => "{:trace}", )); @@ -217,7 +217,7 @@ class DebuggerTest extends CakeTestCase { Debugger::addFormat('js', array( 'traceLine' => '{:reference} - {:path}, line {:line}' + '&line={:line}">{:path}, line {:line}' )); Debugger::outputAs('js'); @@ -226,7 +226,7 @@ class DebuggerTest extends CakeTestCase { Debugger::addFormat('xml', array( 'error' => '{:code}{:file}{:line}' . - '{:description}', + '{:description}', )); Debugger::outputAs('xml'); diff --git a/lib/Cake/Test/Case/Utility/SetTest.php b/lib/Cake/Test/Case/Utility/SetTest.php index a8ccfef3e..4ee3a85f5 100644 --- a/lib/Cake/Test/Case/Utility/SetTest.php +++ b/lib/Cake/Test/Case/Utility/SetTest.php @@ -1218,21 +1218,21 @@ class SetTest extends CakeTestCase { $nonSequential = array( 'User' => array( - 0 => array('id' => 1), - 2 => array('id' => 2), - 6 => array('id' => 3), - 9 => array('id' => 4), - 3 => array('id' => 5), + 0 => array('id' => 1), + 2 => array('id' => 2), + 6 => array('id' => 3), + 9 => array('id' => 4), + 3 => array('id' => 5), ), ); $nonZero = array( 'User' => array( - 2 => array('id' => 1), - 4 => array('id' => 2), - 6 => array('id' => 3), - 9 => array('id' => 4), - 3 => array('id' => 5), + 2 => array('id' => 1), + 4 => array('id' => 2), + 6 => array('id' => 3), + 9 => array('id' => 4), + 3 => array('id' => 5), ), ); @@ -1690,7 +1690,7 @@ class SetTest extends CakeTestCase { $result = Set::remove($a, 'files'); $expected = array( - 'pages' => array('name' => 'page') + 'pages' => array('name' => 'page') ); $this->assertEquals($expected, $result); } diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 75218dbd0..5d44fa4f5 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -933,7 +933,7 @@ class FormHelperTest extends CakeTestCase { $this->Form->request['_Token'] = array('key' => $key); $result = $this->Form->secure($fields); - $hash = '51e3b55a6edd82020b3f29c9ae200e14bbeb7ee5%3AModel.0.hidden%7CModel.0.valid'; + $hash = '51e3b55a6edd82020b3f29c9ae200e14bbeb7ee5%3AModel.0.hidden%7CModel.0.valid'; $hash .= '%7CModel.1.hidden%7CModel.1.valid'; $expected = array( diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index 4c0ef2649..5a94ab636 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -319,8 +319,8 @@ class HtmlHelperTest extends CakeTestCase { $this->assertTags($result, $expected); $result = $this->Html->link($this->Html->image('../favicon.ico'), '#', array('escape' => false)); - $expected = array( - 'a' => array('href' => '#'), + $expected = array( + 'a' => array('href' => '#'), 'img' => array('src' => 'img/../favicon.ico', 'alt' => ''), '/a' ); @@ -1871,7 +1871,7 @@ class HtmlHelperTest extends CakeTestCase { array('ul' => array('class' => 'breadcrumb')), ' array('class' => 'home', 'href' => '/')), 'Home', '/a', - array('span' =>array('class' => 'divider')), '-', '/span', + array('span' => array('class' => 'divider')), '-', '/span', '/li', ' array('href' => '/lib')), 'Library', '/a', @@ -1885,14 +1885,14 @@ class HtmlHelperTest extends CakeTestCase { /** * Test GetCrumbList using style of Zurb Foundation. - * + * * @return void */ public function testCrumbListZurbStyle() { $this->Html->addCrumb('Home', '#'); $this->Html->addCrumb('Features', '#'); - $this->Html->addCrumb('Gene Splicing', '#'); - $this->Html->addCrumb('Home', '#'); + $this->Html->addCrumb('Gene Splicing', '#'); + $this->Html->addCrumb('Home', '#'); $result = $this->Html->getCrumbList( array('class' => 'breadcrumbs', 'firstClass' => false, 'lastClass' => 'current') ); diff --git a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php index d046bb65a..fbf77c0de 100644 --- a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php @@ -315,7 +315,7 @@ class PaginatorHelperTest extends CakeTestCase { Router::reload(); Router::parse('/'); Router::setRequestInfo(array( - array('plugin' => null, 'controller' => 'accounts', 'action' => 'index', 'pass' => array(), 'form' => array(), 'url' => array('url' => 'accounts/', 'mod_rewrite' => 'true'), 'bare' => 0), + array('plugin' => null, 'controller' => 'accounts', 'action' => 'index', 'pass' => array(), 'form' => array(), 'url' => array('url' => 'accounts/', 'mod_rewrite' => 'true'), 'bare' => 0), array('base' => '/officespace', 'here' => '/officespace/accounts/', 'webroot' => '/officespace/') )); diff --git a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php index 6595757c0..dfa2975c1 100644 --- a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php @@ -743,7 +743,7 @@ class RssHelperTest extends CakeTestCase { public function testElementNamespaceWithPrefix() { $item = array( - 'title' => 'Title', + 'title' => 'Title', 'dc:creator' => 'Alex', 'xy:description' => 'descriptive words' ); diff --git a/lib/Cake/Test/Fixture/AcoFixture.php b/lib/Cake/Test/Fixture/AcoFixture.php index d80d3dd08..5bc90358c 100644 --- a/lib/Cake/Test/Fixture/AcoFixture.php +++ b/lib/Cake/Test/Fixture/AcoFixture.php @@ -52,11 +52,11 @@ class AcoFixture extends CakeTestFixture { * @var array */ public $records = array( - array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 24), - array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'Controller1', 'lft' => 2, 'rght' => 9), - array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'action1', 'lft' => 3, 'rght' => 6), - array('parent_id' => 3, 'model' => null, 'foreign_key' => null, 'alias' => 'record1', 'lft' => 4, 'rght' => 5), - array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'action2', 'lft' => 7, 'rght' => 8), + array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 24), + array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'Controller1', 'lft' => 2, 'rght' => 9), + array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'action1', 'lft' => 3, 'rght' => 6), + array('parent_id' => 3, 'model' => null, 'foreign_key' => null, 'alias' => 'record1', 'lft' => 4, 'rght' => 5), + array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'action2', 'lft' => 7, 'rght' => 8), array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'Controller2', 'lft' => 10, 'rght' => 17), array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'action1', 'lft' => 11, 'rght' => 14), array('parent_id' => 7, 'model' => null, 'foreign_key' => null, 'alias' => 'record1', 'lft' => 12, 'rght' => 13), diff --git a/lib/Cake/Test/Fixture/AcoTwoFixture.php b/lib/Cake/Test/Fixture/AcoTwoFixture.php index af399fa3a..c12b0a55e 100644 --- a/lib/Cake/Test/Fixture/AcoTwoFixture.php +++ b/lib/Cake/Test/Fixture/AcoTwoFixture.php @@ -52,11 +52,11 @@ 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' => 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), diff --git a/lib/Cake/Test/Fixture/AdFixture.php b/lib/Cake/Test/Fixture/AdFixture.php index d7100c881..ff7d0cd70 100644 --- a/lib/Cake/Test/Fixture/AdFixture.php +++ b/lib/Cake/Test/Fixture/AdFixture.php @@ -52,11 +52,11 @@ class AdFixture extends CakeTestFixture { * @var array */ public $records = array( - array('parent_id' => null, 'lft' => 1, 'rght' => 2, 'campaign_id' => 1, 'name' => 'Nordover'), - array('parent_id' => null, 'lft' => 3, 'rght' => 4, 'campaign_id' => 1, 'name' => 'Statbergen'), - array('parent_id' => null, 'lft' => 5, 'rght' => 6, 'campaign_id' => 1, 'name' => 'Feroy'), - array('parent_id' => null, 'lft' => 7, 'rght' => 12, 'campaign_id' => 2, 'name' => 'Newcastle'), - array('parent_id' => null, 'lft' => 8, 'rght' => 9, 'campaign_id' => 2, 'name' => 'Dublin'), + array('parent_id' => null, 'lft' => 1, 'rght' => 2, 'campaign_id' => 1, 'name' => 'Nordover'), + array('parent_id' => null, 'lft' => 3, 'rght' => 4, 'campaign_id' => 1, 'name' => 'Statbergen'), + array('parent_id' => null, 'lft' => 5, 'rght' => 6, 'campaign_id' => 1, 'name' => 'Feroy'), + array('parent_id' => null, 'lft' => 7, 'rght' => 12, 'campaign_id' => 2, 'name' => 'Newcastle'), + array('parent_id' => null, 'lft' => 8, 'rght' => 9, 'campaign_id' => 2, 'name' => 'Dublin'), array('parent_id' => null, 'lft' => 10, 'rght' => 11, 'campaign_id' => 2, 'name' => 'Alborg'), array('parent_id' => null, 'lft' => 13, 'rght' => 14, 'campaign_id' => 3, 'name' => 'New York') ); diff --git a/lib/Cake/Test/Fixture/AfterTreeFixture.php b/lib/Cake/Test/Fixture/AfterTreeFixture.php index 32766c9fe..1702e2134 100644 --- a/lib/Cake/Test/Fixture/AfterTreeFixture.php +++ b/lib/Cake/Test/Fixture/AfterTreeFixture.php @@ -51,11 +51,11 @@ class AfterTreeFixture extends CakeTestFixture { * @var array */ public $records = array( - array('parent_id' => null, 'lft' => 1, 'rght' => 2, 'name' => 'One'), - array('parent_id' => null, 'lft' => 3, 'rght' => 4, 'name' => 'Two'), - array('parent_id' => null, 'lft' => 5, 'rght' => 6, 'name' => 'Three'), + array('parent_id' => null, 'lft' => 1, 'rght' => 2, 'name' => 'One'), + array('parent_id' => null, 'lft' => 3, 'rght' => 4, 'name' => 'Two'), + array('parent_id' => null, 'lft' => 5, 'rght' => 6, 'name' => 'Three'), array('parent_id' => null, 'lft' => 7, 'rght' => 12, 'name' => 'Four'), - array('parent_id' => null, 'lft' => 8, 'rght' => 9, 'name' => 'Five'), + array('parent_id' => null, 'lft' => 8, 'rght' => 9, 'name' => 'Five'), array('parent_id' => null, 'lft' => 10, 'rght' => 11, 'name' => 'Six'), array('parent_id' => null, 'lft' => 13, 'rght' => 14, 'name' => 'Seven') ); diff --git a/lib/Cake/Test/Fixture/AroTwoFixture.php b/lib/Cake/Test/Fixture/AroTwoFixture.php index 306567a53..05868d1cc 100644 --- a/lib/Cake/Test/Fixture/AroTwoFixture.php +++ b/lib/Cake/Test/Fixture/AroTwoFixture.php @@ -56,11 +56,11 @@ class AroTwoFixture extends CakeTestFixture { 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' => 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'), ); } diff --git a/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php b/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php index e852287f1..d2a6a3c6f 100644 --- a/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php +++ b/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php @@ -52,25 +52,25 @@ class ArosAcoTwoFixture extends CakeTestFixture { * @var array */ public $records = array( - array('aro_id' => '1', 'aco_id' => '1', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), - array('aro_id' => '2', 'aco_id' => '1', '_create' => '0', '_read' => '1', '_update' => '1', '_delete' => '1'), - array('aro_id' => '3', 'aco_id' => '2', '_create' => '0', '_read' => '1', '_update' => '0', '_delete' => '0'), - array('aro_id' => '4', 'aco_id' => '2', '_create' => '1', '_read' => '1', '_update' => '0', '_delete' => '-1'), - array('aro_id' => '4', 'aco_id' => '6', '_create' => '1', '_read' => '1', '_update' => '0', '_delete' => '0'), - array('aro_id' => '5', 'aco_id' => '1', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), - array('aro_id' => '6', 'aco_id' => '3', '_create' => '-1', '_read' => '1', '_update' => '-1', '_delete' => '-1'), - array('aro_id' => '6', 'aco_id' => '4', '_create' => '-1', '_read' => '1', '_update' => '-1', '_delete' => '1'), - array('aro_id' => '6', 'aco_id' => '6', '_create' => '-1', '_read' => '1', '_update' => '1', '_delete' => '-1'), - array('aro_id' => '7', 'aco_id' => '2', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), - array('aro_id' => '7', 'aco_id' => '7', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '0'), - array('aro_id' => '7', 'aco_id' => '8', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '0'), - array('aro_id' => '7', 'aco_id' => '9', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), - array('aro_id' => '7', 'aco_id' => '10', '_create' => '0', '_read' => '0', '_update' => '0', '_delete' => '1'), - array('aro_id' => '8', 'aco_id' => '10', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), - array('aro_id' => '8', 'aco_id' => '2', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), - array('aro_id' => '9', 'aco_id' => '4', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '-1'), - array('aro_id' => '9', 'aco_id' => '9', '_create' => '0', '_read' => '0', '_update' => '1', '_delete' => '1'), - array('aro_id' => '10', 'aco_id' => '9', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), - array('aro_id' => '10', 'aco_id' => '10', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), + array('aro_id' => '1', 'aco_id' => '1', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), + array('aro_id' => '2', 'aco_id' => '1', '_create' => '0', '_read' => '1', '_update' => '1', '_delete' => '1'), + array('aro_id' => '3', 'aco_id' => '2', '_create' => '0', '_read' => '1', '_update' => '0', '_delete' => '0'), + array('aro_id' => '4', 'aco_id' => '2', '_create' => '1', '_read' => '1', '_update' => '0', '_delete' => '-1'), + array('aro_id' => '4', 'aco_id' => '6', '_create' => '1', '_read' => '1', '_update' => '0', '_delete' => '0'), + array('aro_id' => '5', 'aco_id' => '1', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), + array('aro_id' => '6', 'aco_id' => '3', '_create' => '-1', '_read' => '1', '_update' => '-1', '_delete' => '-1'), + array('aro_id' => '6', 'aco_id' => '4', '_create' => '-1', '_read' => '1', '_update' => '-1', '_delete' => '1'), + array('aro_id' => '6', 'aco_id' => '6', '_create' => '-1', '_read' => '1', '_update' => '1', '_delete' => '-1'), + array('aro_id' => '7', 'aco_id' => '2', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), + array('aro_id' => '7', 'aco_id' => '7', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '0'), + array('aro_id' => '7', 'aco_id' => '8', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '0'), + array('aro_id' => '7', 'aco_id' => '9', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), + array('aro_id' => '7', 'aco_id' => '10', '_create' => '0', '_read' => '0', '_update' => '0', '_delete' => '1'), + array('aro_id' => '8', 'aco_id' => '10', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), + array('aro_id' => '8', 'aco_id' => '2', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), + array('aro_id' => '9', 'aco_id' => '4', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '-1'), + array('aro_id' => '9', 'aco_id' => '9', '_create' => '0', '_read' => '0', '_update' => '1', '_delete' => '1'), + array('aro_id' => '10', 'aco_id' => '9', '_create' => '1', '_read' => '1', '_update' => '1', '_delete' => '1'), + array('aro_id' => '10', 'aco_id' => '10', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), ); } diff --git a/lib/Cake/Test/Fixture/AttachmentFixture.php b/lib/Cake/Test/Fixture/AttachmentFixture.php index e322c1ac8..d99898dcf 100644 --- a/lib/Cake/Test/Fixture/AttachmentFixture.php +++ b/lib/Cake/Test/Fixture/AttachmentFixture.php @@ -50,6 +50,6 @@ class AttachmentFixture extends CakeTestFixture { * @var array */ public $records = array( - array('comment_id' => 5, 'attachment' => 'attachment.zip', 'created' => '2007-03-18 10:51:23', 'updated' => '2007-03-18 10:53:31') + array('comment_id' => 5, 'attachment' => 'attachment.zip', 'created' => '2007-03-18 10:51:23', 'updated' => '2007-03-18 10:53:31') ); } diff --git a/lib/Cake/Test/Fixture/CounterCachePostFixture.php b/lib/Cake/Test/Fixture/CounterCachePostFixture.php index 0ba496b7f..a4f3f0ea5 100644 --- a/lib/Cake/Test/Fixture/CounterCachePostFixture.php +++ b/lib/Cake/Test/Fixture/CounterCachePostFixture.php @@ -34,8 +34,8 @@ class CounterCachePostFixture extends CakeTestFixture { ); public $records = array( - array('id' => 1, 'title' => 'Rock and Roll', 'user_id' => 66, 'published' => false), - array('id' => 2, 'title' => 'Music', 'user_id' => 66, 'published' => true), - array('id' => 3, 'title' => 'Food', 'user_id' => 301, 'published' => true), + array('id' => 1, 'title' => 'Rock and Roll', 'user_id' => 66, 'published' => false), + array('id' => 2, 'title' => 'Music', 'user_id' => 66, 'published' => true), + array('id' => 3, 'title' => 'Food', 'user_id' => 301, 'published' => true), ); } diff --git a/lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php b/lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php index 911187aa7..f9ba5b9ee 100644 --- a/lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php +++ b/lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php @@ -33,8 +33,8 @@ class CounterCachePostNonstandardPrimaryKeyFixture extends CakeTestFixture { ); public $records = array( - array('pid' => 1, 'title' => 'Rock and Roll', 'uid' => 66), - array('pid' => 2, 'title' => 'Music', 'uid' => 66), - array('pid' => 3, 'title' => 'Food', 'uid' => 301), + array('pid' => 1, 'title' => 'Rock and Roll', 'uid' => 66), + array('pid' => 2, 'title' => 'Music', 'uid' => 66), + array('pid' => 3, 'title' => 'Food', 'uid' => 301), ); } diff --git a/lib/Cake/Test/test_app/Config/acl.php b/lib/Cake/Test/test_app/Config/acl.php index aeb8d1e3f..8547d0c7d 100644 --- a/lib/Cake/Test/test_app/Config/acl.php +++ b/lib/Cake/Test/test_app/Config/acl.php @@ -23,29 +23,29 @@ // Roles // ------------------------------------- $config['roles'] = array( - 'Role/admin' => null, - 'Role/data_acquirer' => null, - 'Role/accounting' => null, + 'Role/admin' => null, + 'Role/data_acquirer' => null, + 'Role/accounting' => null, 'Role/database_manager' => null, - 'Role/sales' => null, - 'Role/data_analyst' => 'Role/data_acquirer, Role/database_manager', - 'Role/reports' => 'Role/data_analyst', + 'Role/sales' => null, + 'Role/data_analyst' => 'Role/data_acquirer, Role/database_manager', + 'Role/reports' => 'Role/data_analyst', // allow inherited roles to be defined as an array or comma separated list - 'Role/manager' => array( + 'Role/manager' => array( 'Role/accounting', 'Role/sales', ), - 'Role/accounting_manager' => 'Role/accounting', + 'Role/accounting_manager' => 'Role/accounting', // managers 'User/hardy' => 'Role/accounting_manager, Role/reports', - 'User/stan' => 'Role/manager', + 'User/stan' => 'Role/manager', // accountants - 'User/peter' => 'Role/accounting', - 'User/jeff' => 'Role/accounting', + 'User/peter' => 'Role/accounting', + 'User/jeff' => 'Role/accounting', // admins 'User/jan' => 'Role/admin', // database - 'User/db_manager_1' => 'Role/database_manager', + 'User/db_manager_1' => 'Role/database_manager', 'User/db_manager_2' => 'Role/database_manager', ); @@ -66,9 +66,9 @@ $config['rules']['allow'] = array( ); $config['rules']['deny'] = array( // accountants and sales should not delete anything - '/controllers/*/delete' => array( + '/controllers/*/delete' => array( 'Role/sales', 'Role/accounting' ), - '/controllers/db/drop' => 'User/db_manager_2', + '/controllers/db/drop' => 'User/db_manager_2', ); diff --git a/lib/Cake/TestSuite/CakeTestCase.php b/lib/Cake/TestSuite/CakeTestCase.php index 585a4b6db..a84e92449 100644 --- a/lib/Cake/TestSuite/CakeTestCase.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -394,7 +394,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { } $regex[] = array( sprintf('%sClose %s tag', $prefix[0], substr($tags, strlen($match[0]))), - sprintf('%s<[\s]*\/[\s]*%s[\s]*>[\n\r]*', $prefix[1], substr($tags, strlen($match[0]))), + sprintf('%s<[\s]*\/[\s]*%s[\s]*>[\n\r]*', $prefix[1], substr($tags, strlen($match[0]))), $i, ); continue; @@ -689,7 +689,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { } list($plugin, $name) = pluginSplit($model); - $config = array_merge((array) $config, array('name' => $name)); + $config = array_merge((array)$config, array('name' => $name)); $mock = $this->getMock($name, $methods, array($config)); ClassRegistry::removeObject($name); ClassRegistry::addObject($name, $mock); diff --git a/lib/Cake/TestSuite/CakeTestSuiteCommand.php b/lib/Cake/TestSuite/CakeTestSuiteCommand.php index dbadb12aa..7c9793180 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteCommand.php +++ b/lib/Cake/TestSuite/CakeTestSuiteCommand.php @@ -133,7 +133,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command { * @return CakeTestRunner */ public function getRunner($loader) { - return new CakeTestRunner($loader, $this->_params); + return new CakeTestRunner($loader, $this->_params); } /**