Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #360 from shama/patch-code-formatting

Code consistency formatting tweaks
  • Loading branch information...
commit dfced8b222d07dc507520559f51ba61d4bca2c73 2 parents be770bd + 1e1c7a0
@lorenzo lorenzo authored
Showing with 127 additions and 12 deletions.
  1. +1 −0  app/Config/core.php
  2. +2 −0  lib/Cake/Cache/Cache.php
  3. +1 −0  lib/Cake/Cache/Engine/XcacheEngine.php
  4. +1 −0  lib/Cake/Console/Command/ApiShell.php
  5. +1 −0  lib/Cake/Console/Command/UpgradeShell.php
  6. +1 −0  lib/Cake/Console/Templates/skel/Config/core.php
  7. +2 −0  lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css
  8. +2 −0  lib/Cake/Console/Templates/skel/webroot/index.php
  9. +2 −0  lib/Cake/Console/Templates/skel/webroot/test.php
  10. +2 −0  lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
  11. +1 −0  lib/Cake/Error/exceptions.php
  12. +2 −0  lib/Cake/Model/Datasource/Database/Sqlserver.php
  13. +1 −0  lib/Cake/Model/Model.php
  14. +7 −1 lib/Cake/Routing/Route/PluginShortRoute.php
  15. +8 −3 lib/Cake/Routing/Route/RedirectRoute.php
  16. +1 −0  lib/Cake/Test/Case/BasicsTest.php
  17. +1 −0  lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
  18. +1 −0  lib/Cake/Test/Case/Configure/PhpReaderTest.php
  19. +1 −1  lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php
  20. +1 −0  lib/Cake/Test/Case/Console/TaskCollectionTest.php
  21. +1 −0  lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php
  22. +1 −0  lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php
  23. +1 −0  lib/Cake/Test/Case/Controller/Component/DbAclTest.php
  24. +1 −0  lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
  25. +1 −0  lib/Cake/Test/Case/Controller/ComponentCollectionTest.php
  26. +1 −1  lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php
  27. +12 −0 lib/Cake/Test/Case/Controller/ControllerTest.php
  28. +3 −3 lib/Cake/Test/Case/Controller/ScaffoldTest.php
  29. +2 −0  lib/Cake/Test/Case/Error/ExceptionRendererTest.php
  30. +2 −0  lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php
  31. +1 −0  lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
  32. +1 −0  lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php
  33. +1 −0  lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
  34. +3 −0  lib/Cake/Test/Case/Model/CakeSchemaTest.php
  35. +1 −1  lib/Cake/Test/Case/Model/ConnectionManagerTest.php
  36. +1 −0  lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
  37. +1 −0  lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
  38. +5 −0 lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php
  39. +1 −0  lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php
  40. +1 −0  lib/Cake/Test/Case/Model/DbAclTest.php
  41. +1 −0  lib/Cake/Test/Case/Model/ModelIntegrationTest.php
  42. +1 −0  lib/Cake/Test/Case/Model/ModelReadTest.php
  43. +1 −0  lib/Cake/Test/Case/Model/ModelTestBase.php
  44. +2 −0  lib/Cake/Test/Case/Model/ModelWriteTest.php
  45. +1 −0  lib/Cake/Test/Case/Model/models.php
  46. +2 −0  lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
  47. +3 −0  lib/Cake/Test/Case/Routing/DispatcherTest.php
  48. +4 −0 lib/Cake/Test/Case/Routing/RouterTest.php
  49. +1 −1  lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php
  50. +2 −0  lib/Cake/Test/Case/Utility/FolderTest.php
  51. +1 −0  lib/Cake/Test/Case/Utility/SetTest.php
  52. +1 −0  lib/Cake/Test/Case/Utility/ValidationTest.php
  53. +2 −0  lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
  54. +5 −0 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
  55. +2 −0  lib/Cake/Test/Case/View/Helper/JsHelperTest.php
  56. +10 −0 lib/Cake/Test/Case/View/Helper/MootoolsEngineHelperTest.php
  57. +1 −0  lib/Cake/Test/Case/View/Helper/TextHelperTest.php
  58. +1 −0  lib/Cake/Test/Case/View/ViewTest.php
  59. +3 −0  lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php
  60. +1 −0  lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
  61. +1 −1  lib/Cake/Utility/Sanitize.php
  62. +1 −0  lib/Cake/View/Helper/JsBaseEngineHelper.php
View
1  app/Config/core.php
@@ -200,6 +200,7 @@
* timestamping regardless of debug value.
*/
//Configure::write('Asset.timestamp', true);
+
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server for caching.
View
2  lib/Cake/Cache/Cache.php
@@ -374,6 +374,7 @@ public static function increment($key, $offset = 1, $config = 'default') {
self::set(null, $config);
return $success;
}
+
/**
* Decrement a number under the key and return decremented value.
*
@@ -401,6 +402,7 @@ public static function decrement($key, $offset = 1, $config = 'default') {
self::set(null, $config);
return $success;
}
+
/**
* Delete a key from the cache.
*
View
1  lib/Cake/Cache/Engine/XcacheEngine.php
@@ -110,6 +110,7 @@ public function increment($key, $offset = 1) {
public function decrement($key, $offset = 1) {
return xcache_dec($key, $offset);
}
+
/**
* Delete a key from the cache
*
View
1  lib/Cake/Console/Command/ApiShell.php
@@ -151,6 +151,7 @@ public function getOptionParser() {
))->description(__d('cake_console', 'Lookup doc block comments for classes in CakePHP.'));
return $parser;
}
+
/**
* Show help for this shell.
*
View
1  lib/Cake/Console/Command/UpgradeShell.php
@@ -554,6 +554,7 @@ public function exceptions() {
);
$this->_filesRegexpUpdate($patterns);
}
+
/**
* Move application views files to where they now should be
*
View
1  lib/Cake/Console/Templates/skel/Config/core.php
@@ -200,6 +200,7 @@
* timestamping regardless of debug value.
*/
//Configure::write('Asset.timestamp', true);
+
/**
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
* This requires a/var/cache directory to be writable by the web server for caching.
View
2  lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css
@@ -365,6 +365,7 @@ form .submit input[type=submit] {
form .submit input[type=submit]:hover {
background: #5BA150;
}
+
/* Form errors */
form .error {
background: #FFDACC;
@@ -646,6 +647,7 @@ pre {
overflow: auto;
text-shadow: none;
}
+
/* excerpt */
.cake-code-dump pre,
.cake-code-dump pre code {
View
2  lib/Cake/Console/Templates/skel/webroot/index.php
@@ -24,6 +24,7 @@
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
+
/**
* These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed.
@@ -37,6 +38,7 @@
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
+
/**
* The actual directory name for the "app".
*
View
2  lib/Cake/Console/Templates/skel/webroot/test.php
@@ -24,6 +24,7 @@
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
+
/**
* These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed.
@@ -37,6 +38,7 @@
if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__))));
}
+
/**
* The actual directory name for the "app".
*
View
2  lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
@@ -100,6 +100,7 @@ public function __construct(ComponentCollection $collection, $settings) {
$this->settings['opaque'] = md5($this->settings['realm']);
}
}
+
/**
* Authenticate a user using Digest HTTP auth. Will use the configured User model and attempt a
* login using Digest HTTP auth.
@@ -142,6 +143,7 @@ public function getUser($request) {
}
return false;
}
+
/**
* Find a user record using the standard options.
*
View
1  lib/Cake/Error/exceptions.php
@@ -226,6 +226,7 @@ public function __construct($message, $code = 404) {
parent::__construct($message, $code);
}
}
+
/**
* Private Action exception - used when a controller action
* starts with a `_`.
View
2  lib/Cake/Model/Datasource/Database/Sqlserver.php
@@ -585,6 +585,7 @@ public function value($data, $column = null) {
return parent::value($data, $column);
}
}
+
/**
* Returns an array of all result rows for a given SQL query.
* Returns false if no rows matched.
@@ -742,6 +743,7 @@ public function lastAffected($source = null) {
}
return $affected;
}
+
/**
* Executes given SQL statement.
*
View
1  lib/Cake/Model/Model.php
@@ -3075,6 +3075,7 @@ protected function _validateWithModels($options) {
}
return $valid;
}
+
/**
* Marks a field as invalid, optionally setting the name of validation
* rule (in case of multiple validation for field) that was broken.
View
8 lib/Cake/Routing/Route/PluginShortRoute.php
@@ -1,5 +1,4 @@
<?php
-App::uses('CakeRoute', 'Routing/Route');
/**
* Plugin short route, that copies the plugin param to the controller parameters
* It is used for supporting /:plugin routes.
@@ -18,6 +17,13 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+App::uses('CakeRoute', 'Routing/Route');
+
+/**
+ * Plugin Short Route class
+ *
+ * @package Cake.Routing.Route
+ */
class PluginShortRoute extends CakeRoute {
/**
View
11 lib/Cake/Routing/Route/RedirectRoute.php
@@ -1,7 +1,4 @@
<?php
-App::uses('CakeResponse', 'Network');
-App::uses('CakeRoute', 'Routing/Route');
-
/**
* Redirect route will perform an immediate redirect. Redirect routes
* are useful when you want to have Routing layer redirects occur in your
@@ -21,6 +18,14 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+App::uses('CakeResponse', 'Network');
+App::uses('CakeRoute', 'Routing/Route');
+
+/**
+ * Redirect Route class
+ *
+ * @package Cake.Routing.Route
+ */
class RedirectRoute extends CakeRoute {
/**
View
1  lib/Cake/Test/Case/BasicsTest.php
@@ -80,6 +80,7 @@ public function testArrayDiffKey() {
$this->assertEquals($result, array());
}
+
/**
* testHttpBase method
*
View
1  lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
@@ -364,6 +364,7 @@ public function testClear() {
Cache::clear(false, 'memcache2');
}
+
/**
* test that a 0 duration can succesfully write.
*
View
1  lib/Cake/Test/Case/Configure/PhpReaderTest.php
@@ -28,6 +28,7 @@ public function setUp() {
parent::setUp();
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
}
+
/**
* test reading files
*
View
2  lib/Cake/Test/Case/Console/Command/Task/TemplateTaskTest.php
@@ -19,12 +19,12 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-
App::uses('ShellDispatcher', 'Console');
App::uses('ConsoleOutput', 'Console');
App::uses('ConsoleInput', 'Console');
App::uses('Shell', 'Console');
App::uses('TemplateTask', 'Console/Command/Task');
+
/**
* TemplateTaskTest class
*
View
1  lib/Cake/Test/Case/Console/TaskCollectionTest.php
@@ -71,6 +71,7 @@ public function testLoadWithEnableFalse() {
$this->assertFalse($this->Tasks->enabled('DbConfig'), 'DbConfigTask should be disabled');
}
+
/**
* test missingtask exception
*
View
1  lib/Cake/Test/Case/Controller/Component/Auth/BasicAuthenticateTest.php
@@ -163,6 +163,7 @@ public function testAuthenticateChallenge() {
$result = $this->auth->authenticate($request, $this->response);
$this->assertFalse($result);
}
+
/**
* test authenticate sucesss
*
View
1  lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php
@@ -499,6 +499,7 @@ public function testDeleteRemovesChildren() {
$this->assertNull($this->Cookie->read('User.email'));
$this->Cookie->destroy();
}
+
/**
* Test deleting recursively with keys that don't exist.
*
View
1  lib/Cake/Test/Case/Controller/Component/DbAclTest.php
@@ -470,6 +470,7 @@ public function testRevoke() {
$this->Acl->deny('Bobs', 'ROOT/printers/DoesNotExist', 'create');
}
+
/**
* debug function - to help editing/creating test cases for the ACL component
*
View
1  lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
@@ -45,6 +45,7 @@ public function destination() {
$this->viewPath = 'Posts';
$this->render('index');
}
+
/**
* test method for ajax redirection + parameter parsing
*
View
1  lib/Cake/Test/Case/Controller/ComponentCollectionTest.php
@@ -110,6 +110,7 @@ public function testLoadWithEnableFalse() {
$this->assertFalse($this->Components->enabled('Cookie'), 'Cookie should be disabled');
}
+
/**
* test missingcomponent exception
*
View
2  lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php
@@ -34,6 +34,7 @@ class MergeVarsAppController extends Controller {
* @var array
*/
public $components = array('MergeVar' => array('flag', 'otherFlag', 'redirect' => false));
+
/**
* helpers
*
@@ -42,7 +43,6 @@ class MergeVarsAppController extends Controller {
public $helpers = array('MergeVar' => array('format' => 'html', 'terse'));
}
-
/**
* MergeVar Component
*
View
12 lib/Cake/Test/Case/Controller/ControllerTest.php
@@ -35,12 +35,14 @@ class ControllerTestAppController extends Controller {
* @var array
*/
public $helpers = array('Html');
+
/**
* uses property
*
* @var array
*/
public $uses = array('ControllerPost');
+
/**
* components property
*
@@ -305,6 +307,7 @@ class TestComponent extends Object {
*/
public function beforeRedirect() {
}
+
/**
* initialize method
*
@@ -320,6 +323,7 @@ public function initialize(&$controller) {
*/
public function startup(&$controller) {
}
+
/**
* shutdown method
*
@@ -327,6 +331,7 @@ public function startup(&$controller) {
*/
public function shutdown(&$controller) {
}
+
/**
* beforeRender callback
*
@@ -351,6 +356,7 @@ class AnotherTestController extends ControllerTestAppController {
* @var string 'Name'
*/
public $name = 'AnotherTest';
+
/**
* uses property
*
@@ -358,6 +364,11 @@ class AnotherTestController extends ControllerTestAppController {
*/
public $uses = null;
+/**
+ * merge parent
+ *
+ * @var string
+ */
protected $_mergeParent = 'ControllerTestAppController';
}
@@ -1114,6 +1125,7 @@ public function testStartupProcess() {
$Controller->startupProcess();
}
+
/**
* Tests that the shutdown process calls the correct functions
*
View
6 lib/Cake/Test/Case/Controller/ScaffoldTest.php
@@ -16,7 +16,6 @@
* @since CakePHP(tm) v 1.2.0.5436
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-
App::uses('Router', 'Routing');
App::uses('Controller', 'Controller');
App::uses('Scaffold', 'Controller');
@@ -105,8 +104,6 @@ function getParams() {
}
}
-
-
/**
* Scaffold Test class
*
@@ -127,6 +124,7 @@ class ScaffoldTest extends CakeTestCase {
* @var array
*/
public $fixtures = array('core.article', 'core.user', 'core.comment', 'core.join_thing', 'core.tag');
+
/**
* setUp method
*
@@ -273,6 +271,7 @@ public function testScaffoldFlashMessages() {
$result = ob_get_clean();
$this->assertRegExp('/Scaffold Mock has been updated/', $result);
}
+
/**
* test that habtm relationship keys get added to scaffoldFields.
*
@@ -308,6 +307,7 @@ function testHabtmFieldAdditionWithScaffoldForm() {
$result = $Scaffold->controller->viewVars;
$this->assertEquals($result['scaffoldFields'], array('id', 'user_id', 'title', 'body', 'published', 'created', 'updated', 'ScaffoldTag'));
}
+
/**
* test that the proper names and variable values are set by Scaffold
*
View
2  lib/Cake/Test/Case/Error/ExceptionRendererTest.php
@@ -126,6 +126,7 @@ public function missingWidgetThing() {
echo 'widget thing is missing';
}
}
+
/**
* Exception class for testing app error handlers and custom errors.
*
@@ -409,6 +410,7 @@ public function testerror400OnlyChangingCakeException() {
$result = ob_get_clean();
$this->assertContains('Not Found', $result);
}
+
/**
* test that error400 doesn't expose XSS
*
View
2  lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php
@@ -2989,6 +2989,7 @@ public function testHasOneFieldsInContain() {
$this->assertFalse(isset($result[0]['Comment']['published']), 'published found %s');
$this->assertFalse(isset($result[0]['User']['password']), 'password found %s');
}
+
/**
* testFindConditionalBinding method
*
@@ -3568,6 +3569,7 @@ public function testAutoFieldsWithMultipleDatabases() {
$this->assertTrue(isset($result[0]['Article']));
$this->assertTrue(isset($result[0]['User']));
}
+
/**
* test that autoFields doesn't splice in columns that aren't part of the join.
*
View
1  lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
@@ -829,6 +829,7 @@ public function testTranslateWithAssociations() {
);
$this->assertEquals($expected, $result);
}
+
/**
* testTranslateTableWithPrefix method
* Tests that is possible to have a translation model with a custom tablePrefix
View
1  lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php
@@ -1202,6 +1202,7 @@ public function testReorderBigTreeWithQueryCaching() {
$this->assertTrue($this->Tree->cacheQueries, 'cacheQueries was not restored after reorder(). %s');
$this->Tree->cacheQueries = $original;
}
+
/**
* testGenerateTreeListWithSelfJoin method
*
View
1  lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
@@ -254,6 +254,7 @@ public function onError($model, $error) {
}
echo "onError trigger success";
}
+
/**
* beforeTest method
*
View
3  lib/Cake/Test/Case/Model/CakeSchemaTest.php
@@ -440,12 +440,14 @@ class SchemaPrefixAuthUser extends CakeTestModel {
* @var string
*/
public $name = 'SchemaPrefixAuthUser';
+
/**
* table prefix
*
* @var string
*/
public $tablePrefix = 'auth_';
+
/**
* useTable
*
@@ -746,6 +748,7 @@ public function testGenerateTable() {
$result = $this->Schema->generateTable('posts', $posts);
$this->assertRegExp('/public \$posts/', $result);
}
+
/**
* testSchemaWrite method
*
View
2  lib/Cake/Test/Case/Model/ConnectionManagerTest.php
@@ -24,7 +24,6 @@
*/
class ConnectionManagerTest extends CakeTestCase {
-
/**
* tearDown method
*
@@ -34,6 +33,7 @@ public function tearDown() {
parent::tearDown();
CakePlugin::unload();
}
+
/**
* testEnumConnectionObjects method
*
View
1  lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
@@ -225,6 +225,7 @@ public function testTinyintCasting() {
$this->Dbo->rawQuery('DROP TABLE ' . $this->Dbo->fullTableName($tableName));
}
+
/**
* testLastAffected method
*
View
1  lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
@@ -206,6 +206,7 @@ class PostgresTest extends CakeTestCase {
'core.tag', 'core.articles_tag', 'core.attachment', 'core.person', 'core.post', 'core.author',
'core.datatype',
);
+
/**
* Actual DB connection used in testing
*
View
5 lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php
@@ -163,6 +163,7 @@ class SqlserverTestModel extends Model {
'foreignKey' => 'client_id'
)
);
+
/**
* find method
*
@@ -302,6 +303,7 @@ public function testQuoting() {
$result = $this->db->value('', 'binary');
$this->assertSame($expected, $result);
}
+
/**
* testFields method
*
@@ -459,6 +461,7 @@ public function testDescribe() {
);
$this->assertEquals($expected, $result);
}
+
/**
* testBuildColumn
*
@@ -521,6 +524,7 @@ public function testBuildColumn() {
$expected = '[body] nvarchar(MAX)';
$this->assertEquals($expected, $result);
}
+
/**
* testBuildIndex method
*
@@ -547,6 +551,7 @@ public function testBuildIndex() {
$expected = array('ALTER TABLE items ADD CONSTRAINT client_id UNIQUE([client_id], [period_id]);');
$this->assertEquals($expected, $result);
}
+
/**
* testUpdateAllSyntax method
*
View
1  lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php
@@ -137,6 +137,7 @@ public function testWriteEmptySessionId() {
$result = $this->storage->write('', 'This is a Test');
$this->assertFalse($result);
}
+
/**
* test read()
*
View
1  lib/Cake/Test/Case/Model/DbAclTest.php
@@ -186,6 +186,7 @@ class DbAroUserTest extends CakeTestModel {
* @var string 'auth_users'
*/
public $useTable = 'auth_users';
+
/**
* bindNode method
*
View
1  lib/Cake/Test/Case/Model/ModelIntegrationTest.php
@@ -32,6 +32,7 @@ class DboMock extends DboSource {
public function name($field) {
return $field;
}
+
/**
* Returns true to fake a database connection
*/
View
1  lib/Cake/Test/Case/Model/ModelReadTest.php
@@ -7447,6 +7447,7 @@ public function testRecursiveFindAllWithLimit() {
);
$this->assertEquals($expected, $result);
}
+
/**
* Testing availability of $this->findQueryType in Model callbacks
*
View
1  lib/Cake/Test/Case/Model/ModelTestBase.php
@@ -41,6 +41,7 @@
* @var bool false
*/
public $backupGlobals = false;
+
/**
* fixtures property
*
View
2  lib/Cake/Test/Case/Model/ModelWriteTest.php
@@ -539,6 +539,7 @@ public function testBeforeValidateSaveAbortion() {
$result = $Model->save($data);
$this->assertFalse($result);
}
+
/**
* test that beforeSave returning false can abort saves.
*
@@ -1795,6 +1796,7 @@ public function testHabtmSaveWithConditionsInAssociation() {
$this->assertEquals(count($result['NotDoomedSomethingElse']), 2);
$this->assertEquals(count($result['DoomedSomethingElse']), 1);
}
+
/**
* testHabtmSaveKeyResolution method
*
View
1  lib/Cake/Test/Case/Model/models.php
@@ -1894,6 +1894,7 @@ class AssociationTest2 extends CakeTestModel {
class Callback extends CakeTestModel {
}
+
/**
* CallbackPostTestModel class
*
View
2  lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
@@ -676,6 +676,7 @@ public function testConfigString() {
$result = $this->CakeEmail->transportClass();
$this->assertInstanceOf('DebugTransport', $result);
}
+
/**
* testSendWithContent method
*
@@ -1213,6 +1214,7 @@ public function testConstructWithConfigString() {
$this->assertTrue((bool)strpos($result['headers'], 'Message-ID: '));
$this->assertTrue((bool)strpos($result['headers'], 'To: '));
}
+
/**
* testViewRender method
*
View
3  lib/Cake/Test/Case/Routing/DispatcherTest.php
@@ -291,6 +291,7 @@ class ArticlesTestController extends ArticlesTestAppController {
public function admin_index() {
return true;
}
+
/**
* fake index method.
*
@@ -441,6 +442,7 @@ public function test_nocache_tags() {
public function view($id = null) {
$this->render('index');
}
+
/**
* test cached forms / tests view object being registered
*
@@ -723,6 +725,7 @@ public function testMissingControllerAbstract() {
$controller = $Dispatcher->dispatch($url, $response, array('return' => 1));
}
+
/**
* testDispatch method
*
View
4 lib/Cake/Test/Case/Routing/RouterTest.php
@@ -2084,6 +2084,7 @@ public function testStripPlugin() {
$this->assertEquals(Router::stripPlugin($url), $url);
$this->assertEquals(Router::stripPlugin($url, null), $url);
}
+
/**
* testCurentRoute
*
@@ -2098,6 +2099,7 @@ public function testCurrentRoute() {
$route = Router::currentRoute();
$this->assertEquals(array_merge($url, array('plugin' => null)), $route->defaults);
}
+
/**
* testRequestRoute
*
@@ -2124,6 +2126,7 @@ public function testRequestRoute() {
$route = Router::requestRoute();
$this->assertEquals(array_merge($url, array('plugin' => null)), $route->defaults);
}
+
/**
* testGetParams
*
@@ -2389,6 +2392,7 @@ public function testUrlWithRequestAction() {
$result = Router::url(array('base' => false));
$this->assertEquals('/posts', $result, 'with second requests, the last should win.');
}
+
/**
* test that a route object returning a full url is not modified.
*
View
2  lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php
@@ -214,8 +214,8 @@ public function testThrowException() {
$manager->expects($this->once())->method('unload');
$result = $test->run();
$this->assertEquals(1, $result->errorCount());
-
}
+
/**
* testSkipIf
*
View
2  lib/Cake/Test/Case/Utility/FolderTest.php
@@ -184,6 +184,7 @@ public function testRecursiveCreateFailure() {
chmod($path, '0777');
rmdir($path);
}
+
/**
* testOperations method
*
@@ -343,6 +344,7 @@ public function testAddPathElement() {
$result = Folder::addPathElement(DS . 'some' . DS . 'dir' . DS, 'another_path');
$this->assertEquals($result, DS . 'some' . DS . 'dir' . DS . 'another_path');
}
+
/**
* testFolderRead method
*
View
1  lib/Cake/Test/Case/Utility/SetTest.php
@@ -1291,6 +1291,7 @@ public function testExtractWithNonZeroArrays() {
$this->assertSame($expected, $result);
$this->assertSame($result, Set::extract('{n}.B.field1', $items));
}
+
/**
* testExtractWithArrays method
*
View
1  lib/Cake/Test/Case/Utility/ValidationTest.php
@@ -53,6 +53,7 @@ class TestNlValidation {
static function postal($check) {
return true;
}
+
/**
* ssn function for testing ssn pass through
*
View
2  lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
@@ -68,6 +68,7 @@ public function skip() {
$this->markTestSkipped('TMP/views is not writable %s');
}
}
+
/**
* setUp method
*
@@ -158,6 +159,7 @@ public function testCacheNonLatinCharactersInRoute() {
@unlink($filename);
}
+
/**
* Test cache parsing with cake:nocache tags in view file.
*
View
5 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
@@ -990,6 +990,7 @@ public function testSecuritySubmitNestedNamed() {
$result = $this->Form->unlockField();
$this->assertEquals(array('Address.button'), $result);
}
+
/**
* Test that the correct fields are unlocked for image submits with no names.
*
@@ -1029,6 +1030,7 @@ public function testSecuritySubmitImageName() {
$this->assertTags($result, $expected);
$this->assertEquals(array('test', 'test_x', 'test_y'), $this->Form->unlockField());
}
+
/**
* testFormSecurityMultipleInputFields method
*
@@ -4143,6 +4145,7 @@ public function testInputMultipleCheckboxes() {
);
$this->assertTags($result, $expected);
}
+
/**
* testSelectHiddenFieldOmission method
*
@@ -5824,6 +5827,7 @@ public function testSecurePostButton() {
);
$this->assertTags($result, $expected);
}
+
/**
* testPostLink method
*
@@ -6597,6 +6601,7 @@ public function testDateTimeWithGetForms() {
$this->assertRegExp('/name="created\[min\]"/', $result, 'min name attribute is wrong.');
$this->assertRegExp('/name="created\[meridian\]"/', $result, 'meridian name attribute is wrong.');
}
+
/**
* testEditFormWithData method
*
View
2  lib/Cake/Test/Case/View/Helper/JsHelperTest.php
@@ -48,6 +48,7 @@ class OptionEngineHelper extends JsBaseEngineHelper {
public function testMap($options = array()) {
return $this->_mapOptions('request', $options);
}
+
/**
* test method for option parsing
*
@@ -697,6 +698,7 @@ public function setUp() {
$this->View = $this->getMock('View', array('addScript'), array(&$controller));
$this->JsEngine = new OptionEngineHelper($this->View);
}
+
/**
* tearDown method
*
View
10 lib/Cake/Test/Case/View/Helper/MootoolsEngineHelperTest.php
@@ -74,6 +74,7 @@ public function testSelector() {
$this->assertEquals($result, $this->Moo);
$this->assertEquals($this->Moo->selection, '$$("#some_long-id.class")');
}
+
/**
* test event binding
*
@@ -93,6 +94,7 @@ public function testEvent() {
$expected = "\$(\"myLink\").addEvent(\"click\", function (event) {event.stop();\nthis.setStyle(\"display\", \"none\");});";
$this->assertEquals($expected, $result);
}
+
/**
* test dom ready event creation
*
@@ -103,6 +105,7 @@ public function testDomReady() {
$expected = 'window.addEvent("domready", function (event) {foo.name = "bar";});';
$this->assertEquals($expected, $result);
}
+
/**
* test Each method
*
@@ -114,6 +117,7 @@ public function testEach() {
$expected = '$("foo").each(function (item, index) {item.setStyle("display", "none");});';
$this->assertEquals($expected, $result);
}
+
/**
* test Effect generation
*
@@ -153,6 +157,7 @@ public function testEffect() {
$expected = '$("foo").set("slide", {duration:"long"}).slide("out");';
$this->assertEquals($expected, $result);
}
+
/**
* Test Request Generation
*
@@ -223,6 +228,7 @@ public function testRequest() {
$expected = 'var jsRequest = new Request.HTML({method:"post", onComplete:function () {doComplete}, onRequest:function () {doBefore}, onSuccess:function (responseText, responseXML) {doSuccess}, update:"update-zone", url:"\\/people\\/edit\\/1"}).send();';
$this->assertEquals($expected, $result);
}
+
/**
* test sortable list generation
*
@@ -241,6 +247,7 @@ public function testSortable() {
$expected = 'var jsSortable = new Sortables($("myList"), {constrain:"parent", onComplete:onStop, onSort:onSort, onStart:onStart, snap:5});';
$this->assertEquals($expected, $result);
}
+
/**
* test drag() method
*
@@ -273,6 +280,7 @@ public function testDropWithMissingOption() {
'hover' => 'onHover',
));
}
+
/**
* test drop() method
*
@@ -300,6 +308,7 @@ public function testDrop() {
$expected = '$("my-drag").makeDraggable({droppables:$("drop-me"), onDrop:function (element, droppable, event) {onDrop}, onEnter:function (element, droppable) {onHover}, onLeave:function (element, droppable) {onLeave}});';
$this->assertEquals($expected, $result);
}
+
/**
* test slider generation
*
@@ -341,6 +350,7 @@ public function testSlider() {
$expected = 'var jsSlider = new Slider($("slider"), $("my-handle"), {mode:"horizontal", onChange:function (step) {change;}, onComplete:function (event) {complete;}});';
$this->assertEquals($expected, $result);
}
+
/**
* test the serializeForm implementation.
*
View
1  lib/Cake/Test/Case/View/Helper/TextHelperTest.php
@@ -87,6 +87,7 @@ public function testTruncate() {
$this->assertSame($this->Text->truncate($text8, 15), 'Vive la R'.chr(195).chr(169).'pu...');
$this->assertSame($this->Text->truncate($text9, 10), 'НОПРСТУ...');
}
+
/**
* testHighlight method
*
View
1  lib/Cake/Test/Case/View/ViewTest.php
@@ -447,6 +447,7 @@ public function testElementCallbacks() {
$this->View->element('test_element', array(), array('callbacks' => true));
$this->mockObjects[] = $this->View->ElementCallbackMockHtml;
}
+
/**
* test that additional element viewVars don't get overwritten with helpers.
*
View
3  lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php
@@ -34,12 +34,14 @@ class TranslateWithPrefixFixture extends CakeTestFixture {
* @var string 'Translate'
*/
public $name = 'TranslateWithPrefix';
+
/**
* table property
*
* @var string 'i18n'
*/
public $table = 'i18n_translate_with_prefixes';
+
/**
* fields property
*
@@ -53,6 +55,7 @@ class TranslateWithPrefixFixture extends CakeTestFixture {
'field' => array('type' => 'string', 'null' => false),
'content' => array('type' => 'text')
);
+
/**
* records property
*
View
1  lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
@@ -45,6 +45,7 @@ class CakeTestSuiteDispatcher {
'filter' => false,
'fixture' => null
);
+
/**
* Baseurl for the request
*
View
2  lib/Cake/Utility/Sanitize.php
@@ -1,5 +1,4 @@
<?php
-App::import('Model', 'ConnectionManager');
/**
* Washes strings from unwanted noise.
*
@@ -19,6 +18,7 @@
* @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+App::import('Model', 'ConnectionManager');
/**
* Data Sanitization.
View
1  lib/Cake/View/Helper/JsBaseEngineHelper.php
@@ -472,6 +472,7 @@ protected function _utf8ToHex($string) {
* @return string Completed slider script
*/
abstract public function slider($options = array());
+
/**
* Serialize the form attached to $selector.
* Pass `true` for $isForm if the current selection is a form element.
Please sign in to comment.
Something went wrong with that request. Please try again.