Permalink
Browse files

fix coding standards

  • Loading branch information...
1 parent 27d7e28 commit eadc3a75e564ac0d12e29e0d5d3c86193f986266 @ceeram ceeram committed Nov 21, 2012
Showing with 161 additions and 163 deletions.
  1. +1 −1 lib/Cake/Console/Command/AclShell.php
  2. +1 −1 lib/Cake/Console/Command/ApiShell.php
  3. +1 −1 lib/Cake/Console/Command/Task/ExtractTask.php
  4. +1 −1 lib/Cake/Console/Command/Task/ViewTask.php
  5. +2 −2 lib/Cake/Controller/Component/Acl/PhpAcl.php
  6. +1 −1 lib/Cake/Controller/Component/EmailComponent.php
  7. +1 −1 lib/Cake/Controller/Controller.php
  8. +1 −1 lib/Cake/Event/CakeEventListener.php
  9. +1 −1 lib/Cake/Model/Datasource/Database/Postgres.php
  10. +1 −1 lib/Cake/Model/Datasource/Database/Sqlserver.php
  11. +1 −1 lib/Cake/Network/Http/HttpSocketResponse.php
  12. +2 −2 lib/Cake/Routing/Router.php
  13. +1 −1 lib/Cake/Test/Case/Console/ShellDispatcherTest.php
  14. +3 −3 lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php
  15. +1 −1 lib/Cake/Test/Case/Core/AppTest.php
  16. +4 −4 lib/Cake/Test/Case/I18n/MultibyteTest.php
  17. +1 −1 lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
  18. +1 −1 lib/Cake/Test/Case/Model/ModelIntegrationTest.php
  19. +7 −7 lib/Cake/Test/Case/Model/ModelReadTest.php
  20. +15 −15 lib/Cake/Test/Case/Model/ModelWriteTest.php
  21. +1 −1 lib/Cake/Test/Case/Model/Validator/CakeValidationSetTest.php
  22. +1 −1 lib/Cake/Test/Case/Network/CakeRequestTest.php
  23. +9 −9 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
  24. +1 −1 lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
  25. +1 −1 lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php
  26. +1 −1 lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php
  27. +4 −4 lib/Cake/Test/Case/Routing/RouterTest.php
  28. +0 −2 lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php
  29. +2 −2 lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php
  30. +5 −5 lib/Cake/Test/Case/Utility/DebuggerTest.php
  31. +11 −11 lib/Cake/Test/Case/Utility/SetTest.php
  32. +1 −1 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
  33. +6 −6 lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
  34. +1 −1 lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php
  35. +1 −1 lib/Cake/Test/Case/View/Helper/RssHelperTest.php
  36. +5 −5 lib/Cake/Test/Fixture/AcoFixture.php
  37. +5 −5 lib/Cake/Test/Fixture/AcoTwoFixture.php
  38. +5 −5 lib/Cake/Test/Fixture/AdFixture.php
  39. +4 −4 lib/Cake/Test/Fixture/AfterTreeFixture.php
  40. +6 −6 lib/Cake/Test/Fixture/AroTwoFixture.php
  41. +20 −20 lib/Cake/Test/Fixture/ArosAcoTwoFixture.php
  42. +1 −1 lib/Cake/Test/Fixture/AttachmentFixture.php
  43. +3 −3 lib/Cake/Test/Fixture/CounterCachePostFixture.php
  44. +3 −3 lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php
  45. +14 −14 lib/Cake/Test/test_app/Config/acl.php
  46. +2 −2 lib/Cake/TestSuite/CakeTestCase.php
  47. +1 −1 lib/Cake/TestSuite/CakeTestSuiteCommand.php
View
2 lib/Cake/Console/Command/AclShell.php
@@ -324,7 +324,7 @@ public function view() {
$this->hr();
$stack = array();
- $last = null;
+ $last = null;
foreach ($nodes as $n) {
$stack[] = $n;
View
2 lib/Cake/Console/Command/ApiShell.php
@@ -161,7 +161,7 @@ public function getOptionParser() {
* @return void
*/
public function help() {
- $head = "Usage: cake api [<type>] <className> [-m <method>]\n";
+ $head = "Usage: cake api [<type>] <className> [-m <method>]\n";
$head .= "-----------------------------------------------\n";
$head .= "Parameters:\n\n";
View
2 lib/Cake/Console/Command/Task/ExtractTask.php
@@ -611,7 +611,7 @@ protected function _writeFiles() {
* @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 <EMAIL@ADDRESS>\n";
$output .= "#\n";
$output .= "#, fuzzy\n";
View
2 lib/Cake/Console/Command/Task/ViewTask.php
@@ -207,7 +207,7 @@ protected function _interactive() {
$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') {
View
4 lib/Cake/Controller/Component/Acl/PhpAcl.php
@@ -273,7 +273,7 @@ public function access($aro, $aco, $action, $type = 'deny') {
foreach ($aco as $i => $node) {
if (!isset($tree[$node])) {
- $tree[$node] = array(
+ $tree[$node] = array(
'children' => array(),
);
}
@@ -519,7 +519,7 @@ public function addRole(array $aro) {
* @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);
}
View
2 lib/Cake/Controller/Component/EmailComponent.php
@@ -448,7 +448,7 @@ protected function _formatAddresses($addresses) {
* @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) {
View
2 lib/Cake/Controller/Controller.php
@@ -507,7 +507,7 @@ protected function _isPrivateAction(ReflectionMethod $method, CakeRequest $reque
$privateAction = (
$method->name[0] === '_' ||
!$method->isPublic() ||
- !in_array($method->name, $this->methods)
+ !in_array($method->name, $this->methods)
);
$prefixes = Router::prefixes();
View
2 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
View
2 lib/Cake/Model/Datasource/Database/Postgres.php
@@ -407,7 +407,7 @@ public function fields(Model $model, $alias = null, $fields = array(), $quote =
$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];
}
View
2 lib/Cake/Model/Datasource/Database/Sqlserver.php
@@ -283,7 +283,7 @@ public function fields(Model $model, $alias = null, $fields = array(), $quote =
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]);
View
2 lib/Cake/Network/Http/HttpSocketResponse.php
@@ -245,7 +245,7 @@ protected function _decodeChunkedBody($body) {
$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) {
View
4 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)
);
/**
View
2 lib/Cake/Test/Case/Console/ShellDispatcherTest.php
@@ -564,7 +564,7 @@ public function testShiftArgs() {
$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'));
View
6 lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php
@@ -596,13 +596,13 @@ public function testContentStripping() {
$this->assertEquals($expected, $result);
$content = '<p>Some HTML content with an <a href="mailto:test@example.com">email link</a>';
- $result = $this->Controller->EmailTest->strip($content, true);
+ $result = $this->Controller->EmailTest->strip($content, true);
$expected = $content;
$this->assertEquals($expected, $result);
- $content = '<p>Some HTML content with an ';
+ $content = '<p>Some HTML content with an ';
$content .= '<a href="mailto:test@example.com,test2@example.com">email link</a>';
- $result = $this->Controller->EmailTest->strip($content, true);
+ $result = $this->Controller->EmailTest->strip($content, true);
$expected = $content;
$this->assertEquals($expected, $result);
}
View
2 lib/Cake/Test/Case/Core/AppTest.php
@@ -302,7 +302,7 @@ public function testCore() {
* @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));
View
8 lib/Cake/Test/Case/I18n/MultibyteTest.php
@@ -260,9 +260,9 @@ public function testUtf8() {
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 @@ public function testAscii() {
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);
View
2 lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
@@ -3028,7 +3028,7 @@ public function testBuildColumn2() {
'type' => 'timestamp',
'default' => 'current_timestamp',
'null' => false,
- );
+ );
$result = $this->Dbo->buildColumn($data);
$expected = '`created` timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL';
$this->assertEquals($expected, $result);
View
2 lib/Cake/Test/Case/Model/ModelIntegrationTest.php
@@ -1427,7 +1427,7 @@ public function testGetAssociated() {
$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')));
View
14 lib/Cake/Test/Case/Model/ModelReadTest.php
@@ -254,23 +254,23 @@ public function testOldQuery() {
$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)';
$results = $Article->query($query);
$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';
$results = $Article->query($query, false);
$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 @@ public function testPreparedQuery() {
$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 @@ public function testPreparedQuery() {
$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 @@ public function testPreparedQuery() {
);
//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 @@ public function testParameterMismatch() {
$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');
View
30 lib/Cake/Test/Case/Model/ModelWriteTest.php
@@ -6281,8 +6281,8 @@ public function testFindAllForeignKey() {
'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 @@ public function testFindAllForeignKey() {
'ProductUpdateAll' => array(
'id' => 2,
'name' => 'product two',
- 'groupcode' => 120,
+ 'groupcode' => 120,
'group_id' => 1),
'Group' => array(
'id' => 1,
@@ -6344,9 +6344,9 @@ public function testUpdateAllWithJoins() {
'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 @@ public function testUpdateAllWithJoins() {
'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 @@ public function testUpdateAllWithoutForeignKey() {
'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 @@ public function testUpdateAllWithoutForeignKey() {
'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',
View
2 lib/Cake/Test/Case/Model/Validator/CakeValidationSetTest.php
@@ -24,7 +24,7 @@
*
* @package Cake.Test.Case.Model.Validator
*/
-class CakeValidationSetTest extends CakeTestCase {
+class CakeValidationSetTest extends CakeTestCase {
/**
* testValidate method
View
2 lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -1337,7 +1337,7 @@ public static function environmentGenerator() {
return array(
array(
'IIS - No rewrite base path',
- array(
+ array(
'App' => array(
'base' => false,
'baseUrl' => '/index.php',
View
18 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
@@ -1772,9 +1772,9 @@ public function testCharsetsCompatible() {
$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 @@ public function testCharsetsCompatible() {
$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 @@ public function testCharsetsCompatible() {
$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']);
}
View
2 lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
@@ -221,7 +221,7 @@ public function testConstruct() {
$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);
View
2 lib/Cake/Test/Case/Routing/Route/PluginShortRouteTest.php
@@ -25,7 +25,7 @@
*
* @package Cake.Test.Case.Routing.Route
*/
-class PluginShortRouteTest extends CakeTestCase {
+class PluginShortRouteTest extends CakeTestCase {
/**
* setUp method
View
2 lib/Cake/Test/Case/Routing/Route/RedirectRouteTest.php
@@ -26,7 +26,7 @@
*
* @package Cake.Test.Case.Routing.Route
*/
-class RedirectRouteTest extends CakeTestCase {
+class RedirectRouteTest extends CakeTestCase {
/**
* setUp method
View
8 lib/Cake/Test/Case/Routing/RouterTest.php
@@ -2578,19 +2578,19 @@ public function testResourceMap() {
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);
$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' => '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);
View
2 lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php
@@ -352,7 +352,6 @@ public function testAssertTextNotContains() {
* @return void
*/
public function testGetMockForModel() {
-
$Post = $this->getMockForModel('Post');
$this->assertInstanceOf('Post', $Post);
@@ -372,7 +371,6 @@ public function testGetMockForModel() {
* @return void
*/
public function testGetMockForModelWithPlugin() {
-
$TestPluginComment = $this->getMockForModel('TestPlugin.TestPluginComment');
$result = ClassRegistry::init('TestPlugin.TestPluginComment');
View
4 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)
View
10 lib/Cake/Test/Case/Utility/DebuggerTest.php
@@ -135,8 +135,8 @@ public function testOutput() {
'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 @@ public function testChangeOutputFormats() {
Debugger::output('xml', array(
'error' => '<error><code>{:code}</code><file>{:file}</file><line>{:line}</line>' .
- '{:description}</error>',
+ '{:description}</error>',
'context' => "<context>{:context}</context>",
'trace' => "<stack>{:trace}</stack>",
));
@@ -217,7 +217,7 @@ public function testAddFormat() {
Debugger::addFormat('js', array(
'traceLine' => '{:reference} - <a href="txmt://open?url=file://{:file}' .
- '&line={:line}">{:path}</a>, line {:line}'
+ '&line={:line}">{:path}</a>, line {:line}'
));
Debugger::outputAs('js');
@@ -226,7 +226,7 @@ public function testAddFormat() {
Debugger::addFormat('xml', array(
'error' => '<error><code>{:code}</code><file>{:file}</file><line>{:line}</line>' .
- '{:description}</error>',
+ '{:description}</error>',
));
Debugger::outputAs('xml');
View
22 lib/Cake/Test/Case/Utility/SetTest.php
@@ -1218,21 +1218,21 @@ public function testExtractWithNonZeroArrays() {
$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 @@ public function testRemove() {
$result = Set::remove($a, 'files');
$expected = array(
- 'pages' => array('name' => 'page')
+ 'pages' => array('name' => 'page')
);
$this->assertEquals($expected, $result);
}
View
2 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
@@ -933,7 +933,7 @@ public function testFormSecurityMultipleFields() {
$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(
View
12 lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
@@ -319,8 +319,8 @@ public function testLink() {
$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 @@ public function testCrumbListBootstrapStyle() {
array('ul' => array('class' => 'breadcrumb')),
'<li',
array('a' => array('class' => 'home', 'href' => '/')), 'Home', '/a',
- array('span' =>array('class' => 'divider')), '-', '/span',
+ array('span' => array('class' => 'divider')), '-', '/span',
'/li',
'<li',
array('a' => array('href' => '/lib')), 'Library', '/a',
@@ -1885,14 +1885,14 @@ public function testCrumbListBootstrapStyle() {
/**
* 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')
);
View
2 lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php
@@ -315,7 +315,7 @@ public function testSortLinksUsingDotNotation() {
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/')
));
View
2 lib/Cake/Test/Case/View/Helper/RssHelperTest.php
@@ -743,7 +743,7 @@ public function testElementNamespaceWithoutPrefix() {
public function testElementNamespaceWithPrefix() {
$item = array(
- 'title' => 'Title',
+ 'title' => 'Title',
'dc:creator' => 'Alex',
'xy:description' => 'descriptive words'
);
View
10 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),
View
10 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),
View
10 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')
);
View
8 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')
);
View
12 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'),
);
}
View
40 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'),
);
}
View
2 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')
);
}
View
6 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),
);
}
View
6 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),
);
}
View
28 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']['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',
);
View
4 lib/Cake/TestSuite/CakeTestCase.php
@@ -394,7 +394,7 @@ public function assertTags($string, $expected, $fullDebug = false) {
}
$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 @@ public function getMockForModel($model, $methods = array(), $config = null) {
}
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);
View
2 lib/Cake/TestSuite/CakeTestSuiteCommand.php
@@ -133,7 +133,7 @@ public function run(array $argv, $exit = true) {
* @return CakeTestRunner
*/
public function getRunner($loader) {
- return new CakeTestRunner($loader, $this->_params);
+ return new CakeTestRunner($loader, $this->_params);
}
/**

0 comments on commit eadc3a7

Please sign in to comment.