Code consistency formatting tweaks

This commit is contained in:
Kyle Robinson Young 2011-12-06 12:52:48 -08:00
parent be770bd9b8
commit 1e1c7a036d
62 changed files with 127 additions and 12 deletions

View file

@ -200,6 +200,7 @@
* timestamping regardless of debug value. * timestamping regardless of debug value.
*/ */
//Configure::write('Asset.timestamp', true); //Configure::write('Asset.timestamp', true);
/** /**
* Compress CSS output by removing comments, whitespace, repeating tags, etc. * 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. * This requires a/var/cache directory to be writable by the web server for caching.

View file

@ -374,6 +374,7 @@ class Cache {
self::set(null, $config); self::set(null, $config);
return $success; return $success;
} }
/** /**
* Decrement a number under the key and return decremented value. * Decrement a number under the key and return decremented value.
* *
@ -401,6 +402,7 @@ class Cache {
self::set(null, $config); self::set(null, $config);
return $success; return $success;
} }
/** /**
* Delete a key from the cache. * Delete a key from the cache.
* *

View file

@ -110,6 +110,7 @@ class XcacheEngine extends CacheEngine {
public function decrement($key, $offset = 1) { public function decrement($key, $offset = 1) {
return xcache_dec($key, $offset); return xcache_dec($key, $offset);
} }
/** /**
* Delete a key from the cache * Delete a key from the cache
* *

View file

@ -151,6 +151,7 @@ class ApiShell extends AppShell {
))->description(__d('cake_console', 'Lookup doc block comments for classes in CakePHP.')); ))->description(__d('cake_console', 'Lookup doc block comments for classes in CakePHP.'));
return $parser; return $parser;
} }
/** /**
* Show help for this shell. * Show help for this shell.
* *

View file

@ -554,6 +554,7 @@ class UpgradeShell extends AppShell {
); );
$this->_filesRegexpUpdate($patterns); $this->_filesRegexpUpdate($patterns);
} }
/** /**
* Move application views files to where they now should be * Move application views files to where they now should be
* *

View file

@ -200,6 +200,7 @@
* timestamping regardless of debug value. * timestamping regardless of debug value.
*/ */
//Configure::write('Asset.timestamp', true); //Configure::write('Asset.timestamp', true);
/** /**
* Compress CSS output by removing comments, whitespace, repeating tags, etc. * 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. * This requires a/var/cache directory to be writable by the web server for caching.

View file

@ -365,6 +365,7 @@ form .submit input[type=submit] {
form .submit input[type=submit]:hover { form .submit input[type=submit]:hover {
background: #5BA150; background: #5BA150;
} }
/* Form errors */ /* Form errors */
form .error { form .error {
background: #FFDACC; background: #FFDACC;
@ -646,6 +647,7 @@ pre {
overflow: auto; overflow: auto;
text-shadow: none; text-shadow: none;
} }
/* excerpt */ /* excerpt */
.cake-code-dump pre, .cake-code-dump pre,
.cake-code-dump pre code { .cake-code-dump pre code {

View file

@ -24,6 +24,7 @@
if (!defined('DS')) { if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR); define('DS', DIRECTORY_SEPARATOR);
} }
/** /**
* These defines should only be edited if you have cake installed in * These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed. * a directory layout other than the way it is distributed.
@ -37,6 +38,7 @@
if (!defined('ROOT')) { if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__)))); define('ROOT', dirname(dirname(dirname(__FILE__))));
} }
/** /**
* The actual directory name for the "app". * The actual directory name for the "app".
* *

View file

@ -24,6 +24,7 @@ ini_set('display_errors', 1);
if (!defined('DS')) { if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR); define('DS', DIRECTORY_SEPARATOR);
} }
/** /**
* These defines should only be edited if you have cake installed in * These defines should only be edited if you have cake installed in
* a directory layout other than the way it is distributed. * a directory layout other than the way it is distributed.
@ -37,6 +38,7 @@ ini_set('display_errors', 1);
if (!defined('ROOT')) { if (!defined('ROOT')) {
define('ROOT', dirname(dirname(dirname(__FILE__)))); define('ROOT', dirname(dirname(dirname(__FILE__))));
} }
/** /**
* The actual directory name for the "app". * The actual directory name for the "app".
* *

View file

@ -100,6 +100,7 @@ class DigestAuthenticate extends BaseAuthenticate {
$this->settings['opaque'] = md5($this->settings['realm']); $this->settings['opaque'] = md5($this->settings['realm']);
} }
} }
/** /**
* Authenticate a user using Digest HTTP auth. Will use the configured User model and attempt a * Authenticate a user using Digest HTTP auth. Will use the configured User model and attempt a
* login using Digest HTTP auth. * login using Digest HTTP auth.
@ -142,6 +143,7 @@ class DigestAuthenticate extends BaseAuthenticate {
} }
return false; return false;
} }
/** /**
* Find a user record using the standard options. * Find a user record using the standard options.
* *

View file

@ -226,6 +226,7 @@ class MissingActionException extends CakeException {
parent::__construct($message, $code); parent::__construct($message, $code);
} }
} }
/** /**
* Private Action exception - used when a controller action * Private Action exception - used when a controller action
* starts with a `_`. * starts with a `_`.

View file

@ -585,6 +585,7 @@ class Sqlserver extends DboSource {
return parent::value($data, $column); return parent::value($data, $column);
} }
} }
/** /**
* Returns an array of all result rows for a given SQL query. * Returns an array of all result rows for a given SQL query.
* Returns false if no rows matched. * Returns false if no rows matched.
@ -742,6 +743,7 @@ class Sqlserver extends DboSource {
} }
return $affected; return $affected;
} }
/** /**
* Executes given SQL statement. * Executes given SQL statement.
* *

View file

@ -3075,6 +3075,7 @@ class Model extends Object {
} }
return $valid; return $valid;
} }
/** /**
* Marks a field as invalid, optionally setting the name of validation * Marks a field as invalid, optionally setting the name of validation
* rule (in case of multiple validation for field) that was broken. * rule (in case of multiple validation for field) that was broken.

View file

@ -1,5 +1,4 @@
<?php <?php
App::uses('CakeRoute', 'Routing/Route');
/** /**
* Plugin short route, that copies the plugin param to the controller parameters * Plugin short route, that copies the plugin param to the controller parameters
* It is used for supporting /:plugin routes. * It is used for supporting /:plugin routes.
@ -18,6 +17,13 @@ App::uses('CakeRoute', 'Routing/Route');
* @since CakePHP(tm) v 1.3 * @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @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 { class PluginShortRoute extends CakeRoute {
/** /**

View file

@ -1,7 +1,4 @@
<?php <?php
App::uses('CakeResponse', 'Network');
App::uses('CakeRoute', 'Routing/Route');
/** /**
* Redirect route will perform an immediate redirect. Redirect routes * Redirect route will perform an immediate redirect. Redirect routes
* are useful when you want to have Routing layer redirects occur in your * are useful when you want to have Routing layer redirects occur in your
@ -21,6 +18,14 @@ App::uses('CakeRoute', 'Routing/Route');
* @since CakePHP(tm) v 2.0 * @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @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 { class RedirectRoute extends CakeRoute {
/** /**

View file

@ -80,6 +80,7 @@ class BasicsTest extends CakeTestCase {
$this->assertEquals($result, array()); $this->assertEquals($result, array());
} }
/** /**
* testHttpBase method * testHttpBase method
* *

View file

@ -364,6 +364,7 @@ class MemcacheEngineTest extends CakeTestCase {
Cache::clear(false, 'memcache2'); Cache::clear(false, 'memcache2');
} }
/** /**
* test that a 0 duration can succesfully write. * test that a 0 duration can succesfully write.
* *

View file

@ -28,6 +28,7 @@ class PhpReaderTest extends CakeTestCase {
parent::setUp(); parent::setUp();
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS; $this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
} }
/** /**
* test reading files * test reading files
* *

View file

@ -19,12 +19,12 @@
* @since CakePHP(tm) v 1.3 * @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
App::uses('ShellDispatcher', 'Console'); App::uses('ShellDispatcher', 'Console');
App::uses('ConsoleOutput', 'Console'); App::uses('ConsoleOutput', 'Console');
App::uses('ConsoleInput', 'Console'); App::uses('ConsoleInput', 'Console');
App::uses('Shell', 'Console'); App::uses('Shell', 'Console');
App::uses('TemplateTask', 'Console/Command/Task'); App::uses('TemplateTask', 'Console/Command/Task');
/** /**
* TemplateTaskTest class * TemplateTaskTest class
* *

View file

@ -71,6 +71,7 @@ class TaskCollectionTest extends CakeTestCase {
$this->assertFalse($this->Tasks->enabled('DbConfig'), 'DbConfigTask should be disabled'); $this->assertFalse($this->Tasks->enabled('DbConfig'), 'DbConfigTask should be disabled');
} }
/** /**
* test missingtask exception * test missingtask exception
* *

View file

@ -163,6 +163,7 @@ class BasicAuthenticateTest extends CakeTestCase {
$result = $this->auth->authenticate($request, $this->response); $result = $this->auth->authenticate($request, $this->response);
$this->assertFalse($result); $this->assertFalse($result);
} }
/** /**
* test authenticate sucesss * test authenticate sucesss
* *

View file

@ -499,6 +499,7 @@ class CookieComponentTest extends CakeTestCase {
$this->assertNull($this->Cookie->read('User.email')); $this->assertNull($this->Cookie->read('User.email'));
$this->Cookie->destroy(); $this->Cookie->destroy();
} }
/** /**
* Test deleting recursively with keys that don't exist. * Test deleting recursively with keys that don't exist.
* *

View file

@ -470,6 +470,7 @@ class DbAclTest extends CakeTestCase {
$this->Acl->deny('Bobs', 'ROOT/printers/DoesNotExist', 'create'); $this->Acl->deny('Bobs', 'ROOT/printers/DoesNotExist', 'create');
} }
/** /**
* debug function - to help editing/creating test cases for the ACL component * debug function - to help editing/creating test cases for the ACL component
* *

View file

@ -45,6 +45,7 @@ class RequestHandlerTestController extends Controller {
$this->viewPath = 'Posts'; $this->viewPath = 'Posts';
$this->render('index'); $this->render('index');
} }
/** /**
* test method for ajax redirection + parameter parsing * test method for ajax redirection + parameter parsing
* *

View file

@ -110,6 +110,7 @@ class ComponentCollectionTest extends CakeTestCase {
$this->assertFalse($this->Components->enabled('Cookie'), 'Cookie should be disabled'); $this->assertFalse($this->Components->enabled('Cookie'), 'Cookie should be disabled');
} }
/** /**
* test missingcomponent exception * test missingcomponent exception
* *

View file

@ -34,6 +34,7 @@ class MergeVarsAppController extends Controller {
* @var array * @var array
*/ */
public $components = array('MergeVar' => array('flag', 'otherFlag', 'redirect' => false)); public $components = array('MergeVar' => array('flag', 'otherFlag', 'redirect' => false));
/** /**
* helpers * helpers
* *
@ -42,7 +43,6 @@ class MergeVarsAppController extends Controller {
public $helpers = array('MergeVar' => array('format' => 'html', 'terse')); public $helpers = array('MergeVar' => array('format' => 'html', 'terse'));
} }
/** /**
* MergeVar Component * MergeVar Component
* *

View file

@ -35,12 +35,14 @@ class ControllerTestAppController extends Controller {
* @var array * @var array
*/ */
public $helpers = array('Html'); public $helpers = array('Html');
/** /**
* uses property * uses property
* *
* @var array * @var array
*/ */
public $uses = array('ControllerPost'); public $uses = array('ControllerPost');
/** /**
* components property * components property
* *
@ -305,6 +307,7 @@ class TestComponent extends Object {
*/ */
public function beforeRedirect() { public function beforeRedirect() {
} }
/** /**
* initialize method * initialize method
* *
@ -320,6 +323,7 @@ class TestComponent extends Object {
*/ */
public function startup(&$controller) { public function startup(&$controller) {
} }
/** /**
* shutdown method * shutdown method
* *
@ -327,6 +331,7 @@ class TestComponent extends Object {
*/ */
public function shutdown(&$controller) { public function shutdown(&$controller) {
} }
/** /**
* beforeRender callback * beforeRender callback
* *
@ -351,6 +356,7 @@ class AnotherTestController extends ControllerTestAppController {
* @var string 'Name' * @var string 'Name'
*/ */
public $name = 'AnotherTest'; public $name = 'AnotherTest';
/** /**
* uses property * uses property
* *
@ -358,6 +364,11 @@ class AnotherTestController extends ControllerTestAppController {
*/ */
public $uses = null; public $uses = null;
/**
* merge parent
*
* @var string
*/
protected $_mergeParent = 'ControllerTestAppController'; protected $_mergeParent = 'ControllerTestAppController';
} }
@ -1114,6 +1125,7 @@ class ControllerTest extends CakeTestCase {
$Controller->startupProcess(); $Controller->startupProcess();
} }
/** /**
* Tests that the shutdown process calls the correct functions * Tests that the shutdown process calls the correct functions
* *

View file

@ -16,7 +16,6 @@
* @since CakePHP(tm) v 1.2.0.5436 * @since CakePHP(tm) v 1.2.0.5436
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
App::uses('Router', 'Routing'); App::uses('Router', 'Routing');
App::uses('Controller', 'Controller'); App::uses('Controller', 'Controller');
App::uses('Scaffold', 'Controller'); App::uses('Scaffold', 'Controller');
@ -105,8 +104,6 @@ class TestScaffoldMock extends Scaffold {
} }
} }
/** /**
* Scaffold Test class * Scaffold Test class
* *
@ -127,6 +124,7 @@ class ScaffoldTest extends CakeTestCase {
* @var array * @var array
*/ */
public $fixtures = array('core.article', 'core.user', 'core.comment', 'core.join_thing', 'core.tag'); public $fixtures = array('core.article', 'core.user', 'core.comment', 'core.join_thing', 'core.tag');
/** /**
* setUp method * setUp method
* *
@ -273,6 +271,7 @@ class ScaffoldTest extends CakeTestCase {
$result = ob_get_clean(); $result = ob_get_clean();
$this->assertRegExp('/Scaffold Mock has been updated/', $result); $this->assertRegExp('/Scaffold Mock has been updated/', $result);
} }
/** /**
* test that habtm relationship keys get added to scaffoldFields. * test that habtm relationship keys get added to scaffoldFields.
* *
@ -308,6 +307,7 @@ class ScaffoldTest extends CakeTestCase {
$result = $Scaffold->controller->viewVars; $result = $Scaffold->controller->viewVars;
$this->assertEquals($result['scaffoldFields'], array('id', 'user_id', 'title', 'body', 'published', 'created', 'updated', 'ScaffoldTag')); $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 * test that the proper names and variable values are set by Scaffold
* *

View file

@ -126,6 +126,7 @@ class MyCustomExceptionRenderer extends ExceptionRenderer {
echo 'widget thing is missing'; echo 'widget thing is missing';
} }
} }
/** /**
* Exception class for testing app error handlers and custom errors. * Exception class for testing app error handlers and custom errors.
* *
@ -409,6 +410,7 @@ class ExceptionRendererTest extends CakeTestCase {
$result = ob_get_clean(); $result = ob_get_clean();
$this->assertContains('Not Found', $result); $this->assertContains('Not Found', $result);
} }
/** /**
* test that error400 doesn't expose XSS * test that error400 doesn't expose XSS
* *

View file

@ -2989,6 +2989,7 @@ class ContainableBehaviorTest extends CakeTestCase {
$this->assertFalse(isset($result[0]['Comment']['published']), 'published found %s'); $this->assertFalse(isset($result[0]['Comment']['published']), 'published found %s');
$this->assertFalse(isset($result[0]['User']['password']), 'password found %s'); $this->assertFalse(isset($result[0]['User']['password']), 'password found %s');
} }
/** /**
* testFindConditionalBinding method * testFindConditionalBinding method
* *
@ -3568,6 +3569,7 @@ class ContainableBehaviorTest extends CakeTestCase {
$this->assertTrue(isset($result[0]['Article'])); $this->assertTrue(isset($result[0]['Article']));
$this->assertTrue(isset($result[0]['User'])); $this->assertTrue(isset($result[0]['User']));
} }
/** /**
* test that autoFields doesn't splice in columns that aren't part of the join. * test that autoFields doesn't splice in columns that aren't part of the join.
* *

View file

@ -829,6 +829,7 @@ class TranslateBehaviorTest extends CakeTestCase {
); );
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* testTranslateTableWithPrefix method * testTranslateTableWithPrefix method
* Tests that is possible to have a translation model with a custom tablePrefix * Tests that is possible to have a translation model with a custom tablePrefix

View file

@ -1202,6 +1202,7 @@ class TreeBehaviorNumberTest extends CakeTestCase {
$this->assertTrue($this->Tree->cacheQueries, 'cacheQueries was not restored after reorder(). %s'); $this->assertTrue($this->Tree->cacheQueries, 'cacheQueries was not restored after reorder(). %s');
$this->Tree->cacheQueries = $original; $this->Tree->cacheQueries = $original;
} }
/** /**
* testGenerateTreeListWithSelfJoin method * testGenerateTreeListWithSelfJoin method
* *

View file

@ -254,6 +254,7 @@ class TestBehavior extends ModelBehavior {
} }
echo "onError trigger success"; echo "onError trigger success";
} }
/** /**
* beforeTest method * beforeTest method
* *

View file

@ -440,12 +440,14 @@ class SchemaPrefixAuthUser extends CakeTestModel {
* @var string * @var string
*/ */
public $name = 'SchemaPrefixAuthUser'; public $name = 'SchemaPrefixAuthUser';
/** /**
* table prefix * table prefix
* *
* @var string * @var string
*/ */
public $tablePrefix = 'auth_'; public $tablePrefix = 'auth_';
/** /**
* useTable * useTable
* *
@ -746,6 +748,7 @@ class CakeSchemaTest extends CakeTestCase {
$result = $this->Schema->generateTable('posts', $posts); $result = $this->Schema->generateTable('posts', $posts);
$this->assertRegExp('/public \$posts/', $result); $this->assertRegExp('/public \$posts/', $result);
} }
/** /**
* testSchemaWrite method * testSchemaWrite method
* *

View file

@ -24,7 +24,6 @@ App::uses('ConnectionManager', 'Model');
*/ */
class ConnectionManagerTest extends CakeTestCase { class ConnectionManagerTest extends CakeTestCase {
/** /**
* tearDown method * tearDown method
* *
@ -34,6 +33,7 @@ class ConnectionManagerTest extends CakeTestCase {
parent::tearDown(); parent::tearDown();
CakePlugin::unload(); CakePlugin::unload();
} }
/** /**
* testEnumConnectionObjects method * testEnumConnectionObjects method
* *

View file

@ -225,6 +225,7 @@ class MysqlTest extends CakeTestCase {
$this->Dbo->rawQuery('DROP TABLE ' . $this->Dbo->fullTableName($tableName)); $this->Dbo->rawQuery('DROP TABLE ' . $this->Dbo->fullTableName($tableName));
} }
/** /**
* testLastAffected method * testLastAffected method
* *

View file

@ -206,6 +206,7 @@ class PostgresTest extends CakeTestCase {
'core.tag', 'core.articles_tag', 'core.attachment', 'core.person', 'core.post', 'core.author', 'core.tag', 'core.articles_tag', 'core.attachment', 'core.person', 'core.post', 'core.author',
'core.datatype', 'core.datatype',
); );
/** /**
* Actual DB connection used in testing * Actual DB connection used in testing
* *

View file

@ -163,6 +163,7 @@ class SqlserverTestModel extends Model {
'foreignKey' => 'client_id' 'foreignKey' => 'client_id'
) )
); );
/** /**
* find method * find method
* *
@ -302,6 +303,7 @@ class SqlserverTest extends CakeTestCase {
$result = $this->db->value('', 'binary'); $result = $this->db->value('', 'binary');
$this->assertSame($expected, $result); $this->assertSame($expected, $result);
} }
/** /**
* testFields method * testFields method
* *
@ -459,6 +461,7 @@ class SqlserverTest extends CakeTestCase {
); );
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* testBuildColumn * testBuildColumn
* *
@ -521,6 +524,7 @@ class SqlserverTest extends CakeTestCase {
$expected = '[body] nvarchar(MAX)'; $expected = '[body] nvarchar(MAX)';
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* testBuildIndex method * testBuildIndex method
* *
@ -547,6 +551,7 @@ class SqlserverTest extends CakeTestCase {
$expected = array('ALTER TABLE items ADD CONSTRAINT client_id UNIQUE([client_id], [period_id]);'); $expected = array('ALTER TABLE items ADD CONSTRAINT client_id UNIQUE([client_id], [period_id]);');
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* testUpdateAllSyntax method * testUpdateAllSyntax method
* *

View file

@ -137,6 +137,7 @@ class DatabaseSessionTest extends CakeTestCase {
$result = $this->storage->write('', 'This is a Test'); $result = $this->storage->write('', 'This is a Test');
$this->assertFalse($result); $this->assertFalse($result);
} }
/** /**
* test read() * test read()
* *

View file

@ -186,6 +186,7 @@ class DbAroUserTest extends CakeTestModel {
* @var string 'auth_users' * @var string 'auth_users'
*/ */
public $useTable = 'auth_users'; public $useTable = 'auth_users';
/** /**
* bindNode method * bindNode method
* *

View file

@ -32,6 +32,7 @@ class DboMock extends DboSource {
public function name($field) { public function name($field) {
return $field; return $field;
} }
/** /**
* Returns true to fake a database connection * Returns true to fake a database connection
*/ */

View file

@ -7447,6 +7447,7 @@ class ModelReadTest extends BaseModelTest {
); );
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* Testing availability of $this->findQueryType in Model callbacks * Testing availability of $this->findQueryType in Model callbacks
* *

View file

@ -41,6 +41,7 @@ abstract class BaseModelTest extends CakeTestCase {
* @var bool false * @var bool false
*/ */
public $backupGlobals = false; public $backupGlobals = false;
/** /**
* fixtures property * fixtures property
* *

View file

@ -539,6 +539,7 @@ class ModelWriteTest extends BaseModelTest {
$result = $Model->save($data); $result = $Model->save($data);
$this->assertFalse($result); $this->assertFalse($result);
} }
/** /**
* test that beforeSave returning false can abort saves. * test that beforeSave returning false can abort saves.
* *
@ -1795,6 +1796,7 @@ class ModelWriteTest extends BaseModelTest {
$this->assertEquals(count($result['NotDoomedSomethingElse']), 2); $this->assertEquals(count($result['NotDoomedSomethingElse']), 2);
$this->assertEquals(count($result['DoomedSomethingElse']), 1); $this->assertEquals(count($result['DoomedSomethingElse']), 1);
} }
/** /**
* testHabtmSaveKeyResolution method * testHabtmSaveKeyResolution method
* *

View file

@ -1894,6 +1894,7 @@ class AssociationTest2 extends CakeTestModel {
class Callback extends CakeTestModel { class Callback extends CakeTestModel {
} }
/** /**
* CallbackPostTestModel class * CallbackPostTestModel class
* *

View file

@ -676,6 +676,7 @@ class CakeEmailTest extends CakeTestCase {
$result = $this->CakeEmail->transportClass(); $result = $this->CakeEmail->transportClass();
$this->assertInstanceOf('DebugTransport', $result); $this->assertInstanceOf('DebugTransport', $result);
} }
/** /**
* testSendWithContent method * testSendWithContent method
* *
@ -1213,6 +1214,7 @@ class CakeEmailTest extends CakeTestCase {
$this->assertTrue((bool)strpos($result['headers'], 'Message-ID: ')); $this->assertTrue((bool)strpos($result['headers'], 'Message-ID: '));
$this->assertTrue((bool)strpos($result['headers'], 'To: ')); $this->assertTrue((bool)strpos($result['headers'], 'To: '));
} }
/** /**
* testViewRender method * testViewRender method
* *

View file

@ -291,6 +291,7 @@ class ArticlesTestController extends ArticlesTestAppController {
public function admin_index() { public function admin_index() {
return true; return true;
} }
/** /**
* fake index method. * fake index method.
* *
@ -441,6 +442,7 @@ class TestCachedPagesController extends Controller {
public function view($id = null) { public function view($id = null) {
$this->render('index'); $this->render('index');
} }
/** /**
* test cached forms / tests view object being registered * test cached forms / tests view object being registered
* *
@ -723,6 +725,7 @@ class DispatcherTest extends CakeTestCase {
$controller = $Dispatcher->dispatch($url, $response, array('return' => 1)); $controller = $Dispatcher->dispatch($url, $response, array('return' => 1));
} }
/** /**
* testDispatch method * testDispatch method
* *

View file

@ -2084,6 +2084,7 @@ class RouterTest extends CakeTestCase {
$this->assertEquals(Router::stripPlugin($url), $url); $this->assertEquals(Router::stripPlugin($url), $url);
$this->assertEquals(Router::stripPlugin($url, null), $url); $this->assertEquals(Router::stripPlugin($url, null), $url);
} }
/** /**
* testCurentRoute * testCurentRoute
* *
@ -2098,6 +2099,7 @@ class RouterTest extends CakeTestCase {
$route = Router::currentRoute(); $route = Router::currentRoute();
$this->assertEquals(array_merge($url, array('plugin' => null)), $route->defaults); $this->assertEquals(array_merge($url, array('plugin' => null)), $route->defaults);
} }
/** /**
* testRequestRoute * testRequestRoute
* *
@ -2124,6 +2126,7 @@ class RouterTest extends CakeTestCase {
$route = Router::requestRoute(); $route = Router::requestRoute();
$this->assertEquals(array_merge($url, array('plugin' => null)), $route->defaults); $this->assertEquals(array_merge($url, array('plugin' => null)), $route->defaults);
} }
/** /**
* testGetParams * testGetParams
* *
@ -2389,6 +2392,7 @@ class RouterTest extends CakeTestCase {
$result = Router::url(array('base' => false)); $result = Router::url(array('base' => false));
$this->assertEquals('/posts', $result, 'with second requests, the last should win.'); $this->assertEquals('/posts', $result, 'with second requests, the last should win.');
} }
/** /**
* test that a route object returning a full url is not modified. * test that a route object returning a full url is not modified.
* *

View file

@ -214,8 +214,8 @@ class CakeTestCaseTest extends CakeTestCase {
$manager->expects($this->once())->method('unload'); $manager->expects($this->once())->method('unload');
$result = $test->run(); $result = $test->run();
$this->assertEquals(1, $result->errorCount()); $this->assertEquals(1, $result->errorCount());
} }
/** /**
* testSkipIf * testSkipIf
* *

View file

@ -184,6 +184,7 @@ class FolderTest extends CakeTestCase {
chmod($path, '0777'); chmod($path, '0777');
rmdir($path); rmdir($path);
} }
/** /**
* testOperations method * testOperations method
* *
@ -343,6 +344,7 @@ class FolderTest extends CakeTestCase {
$result = Folder::addPathElement(DS . 'some' . DS . 'dir' . DS, 'another_path'); $result = Folder::addPathElement(DS . 'some' . DS . 'dir' . DS, 'another_path');
$this->assertEquals($result, DS . 'some' . DS . 'dir' . DS . 'another_path'); $this->assertEquals($result, DS . 'some' . DS . 'dir' . DS . 'another_path');
} }
/** /**
* testFolderRead method * testFolderRead method
* *

View file

@ -1291,6 +1291,7 @@ class SetTest extends CakeTestCase {
$this->assertSame($expected, $result); $this->assertSame($expected, $result);
$this->assertSame($result, Set::extract('{n}.B.field1', $items)); $this->assertSame($result, Set::extract('{n}.B.field1', $items));
} }
/** /**
* testExtractWithArrays method * testExtractWithArrays method
* *

View file

@ -53,6 +53,7 @@ class TestNlValidation {
static function postal($check) { static function postal($check) {
return true; return true;
} }
/** /**
* ssn function for testing ssn pass through * ssn function for testing ssn pass through
* *

View file

@ -68,6 +68,7 @@ class CacheHelperTest extends CakeTestCase {
$this->markTestSkipped('TMP/views is not writable %s'); $this->markTestSkipped('TMP/views is not writable %s');
} }
} }
/** /**
* setUp method * setUp method
* *
@ -158,6 +159,7 @@ class CacheHelperTest extends CakeTestCase {
@unlink($filename); @unlink($filename);
} }
/** /**
* Test cache parsing with cake:nocache tags in view file. * Test cache parsing with cake:nocache tags in view file.
* *

View file

@ -990,6 +990,7 @@ class FormHelperTest extends CakeTestCase {
$result = $this->Form->unlockField(); $result = $this->Form->unlockField();
$this->assertEquals(array('Address.button'), $result); $this->assertEquals(array('Address.button'), $result);
} }
/** /**
* Test that the correct fields are unlocked for image submits with no names. * Test that the correct fields are unlocked for image submits with no names.
* *
@ -1029,6 +1030,7 @@ class FormHelperTest extends CakeTestCase {
$this->assertTags($result, $expected); $this->assertTags($result, $expected);
$this->assertEquals(array('test', 'test_x', 'test_y'), $this->Form->unlockField()); $this->assertEquals(array('test', 'test_x', 'test_y'), $this->Form->unlockField());
} }
/** /**
* testFormSecurityMultipleInputFields method * testFormSecurityMultipleInputFields method
* *
@ -4143,6 +4145,7 @@ class FormHelperTest extends CakeTestCase {
); );
$this->assertTags($result, $expected); $this->assertTags($result, $expected);
} }
/** /**
* testSelectHiddenFieldOmission method * testSelectHiddenFieldOmission method
* *
@ -5824,6 +5827,7 @@ class FormHelperTest extends CakeTestCase {
); );
$this->assertTags($result, $expected); $this->assertTags($result, $expected);
} }
/** /**
* testPostLink method * testPostLink method
* *
@ -6597,6 +6601,7 @@ class FormHelperTest extends CakeTestCase {
$this->assertRegExp('/name="created\[min\]"/', $result, 'min name attribute is wrong.'); $this->assertRegExp('/name="created\[min\]"/', $result, 'min name attribute is wrong.');
$this->assertRegExp('/name="created\[meridian\]"/', $result, 'meridian name attribute is wrong.'); $this->assertRegExp('/name="created\[meridian\]"/', $result, 'meridian name attribute is wrong.');
} }
/** /**
* testEditFormWithData method * testEditFormWithData method
* *

View file

@ -48,6 +48,7 @@ class OptionEngineHelper extends JsBaseEngineHelper {
public function testMap($options = array()) { public function testMap($options = array()) {
return $this->_mapOptions('request', $options); return $this->_mapOptions('request', $options);
} }
/** /**
* test method for option parsing * test method for option parsing
* *
@ -697,6 +698,7 @@ class JsBaseEngineTest extends CakeTestCase {
$this->View = $this->getMock('View', array('addScript'), array(&$controller)); $this->View = $this->getMock('View', array('addScript'), array(&$controller));
$this->JsEngine = new OptionEngineHelper($this->View); $this->JsEngine = new OptionEngineHelper($this->View);
} }
/** /**
* tearDown method * tearDown method
* *

View file

@ -74,6 +74,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
$this->assertEquals($result, $this->Moo); $this->assertEquals($result, $this->Moo);
$this->assertEquals($this->Moo->selection, '$$("#some_long-id.class")'); $this->assertEquals($this->Moo->selection, '$$("#some_long-id.class")');
} }
/** /**
* test event binding * test event binding
* *
@ -93,6 +94,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
$expected = "\$(\"myLink\").addEvent(\"click\", function (event) {event.stop();\nthis.setStyle(\"display\", \"none\");});"; $expected = "\$(\"myLink\").addEvent(\"click\", function (event) {event.stop();\nthis.setStyle(\"display\", \"none\");});";
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* test dom ready event creation * test dom ready event creation
* *
@ -103,6 +105,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
$expected = 'window.addEvent("domready", function (event) {foo.name = "bar";});'; $expected = 'window.addEvent("domready", function (event) {foo.name = "bar";});';
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* test Each method * test Each method
* *
@ -114,6 +117,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
$expected = '$("foo").each(function (item, index) {item.setStyle("display", "none");});'; $expected = '$("foo").each(function (item, index) {item.setStyle("display", "none");});';
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* test Effect generation * test Effect generation
* *
@ -153,6 +157,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
$expected = '$("foo").set("slide", {duration:"long"}).slide("out");'; $expected = '$("foo").set("slide", {duration:"long"}).slide("out");';
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* Test Request Generation * Test Request Generation
* *
@ -223,6 +228,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
$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();'; $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); $this->assertEquals($expected, $result);
} }
/** /**
* test sortable list generation * test sortable list generation
* *
@ -241,6 +247,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
$expected = 'var jsSortable = new Sortables($("myList"), {constrain:"parent", onComplete:onStop, onSort:onSort, onStart:onStart, snap:5});'; $expected = 'var jsSortable = new Sortables($("myList"), {constrain:"parent", onComplete:onStop, onSort:onSort, onStart:onStart, snap:5});';
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* test drag() method * test drag() method
* *
@ -273,6 +280,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
'hover' => 'onHover', 'hover' => 'onHover',
)); ));
} }
/** /**
* test drop() method * test drop() method
* *
@ -300,6 +308,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
$expected = '$("my-drag").makeDraggable({droppables:$("drop-me"), onDrop:function (element, droppable, event) {onDrop}, onEnter:function (element, droppable) {onHover}, onLeave:function (element, droppable) {onLeave}});'; $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); $this->assertEquals($expected, $result);
} }
/** /**
* test slider generation * test slider generation
* *
@ -341,6 +350,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
$expected = 'var jsSlider = new Slider($("slider"), $("my-handle"), {mode:"horizontal", onChange:function (step) {change;}, onComplete:function (event) {complete;}});'; $expected = 'var jsSlider = new Slider($("slider"), $("my-handle"), {mode:"horizontal", onChange:function (step) {change;}, onComplete:function (event) {complete;}});';
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);
} }
/** /**
* test the serializeForm implementation. * test the serializeForm implementation.
* *

View file

@ -87,6 +87,7 @@ class TextHelperTest extends CakeTestCase {
$this->assertSame($this->Text->truncate($text8, 15), 'Vive la R'.chr(195).chr(169).'pu...'); $this->assertSame($this->Text->truncate($text8, 15), 'Vive la R'.chr(195).chr(169).'pu...');
$this->assertSame($this->Text->truncate($text9, 10), 'НОПРСТУ...'); $this->assertSame($this->Text->truncate($text9, 10), 'НОПРСТУ...');
} }
/** /**
* testHighlight method * testHighlight method
* *

View file

@ -447,6 +447,7 @@ class ViewTest extends CakeTestCase {
$this->View->element('test_element', array(), array('callbacks' => true)); $this->View->element('test_element', array(), array('callbacks' => true));
$this->mockObjects[] = $this->View->ElementCallbackMockHtml; $this->mockObjects[] = $this->View->ElementCallbackMockHtml;
} }
/** /**
* test that additional element viewVars don't get overwritten with helpers. * test that additional element viewVars don't get overwritten with helpers.
* *

View file

@ -34,12 +34,14 @@ class TranslateWithPrefixFixture extends CakeTestFixture {
* @var string 'Translate' * @var string 'Translate'
*/ */
public $name = 'TranslateWithPrefix'; public $name = 'TranslateWithPrefix';
/** /**
* table property * table property
* *
* @var string 'i18n' * @var string 'i18n'
*/ */
public $table = 'i18n_translate_with_prefixes'; public $table = 'i18n_translate_with_prefixes';
/** /**
* fields property * fields property
* *
@ -53,6 +55,7 @@ class TranslateWithPrefixFixture extends CakeTestFixture {
'field' => array('type' => 'string', 'null' => false), 'field' => array('type' => 'string', 'null' => false),
'content' => array('type' => 'text') 'content' => array('type' => 'text')
); );
/** /**
* records property * records property
* *

View file

@ -45,6 +45,7 @@ class CakeTestSuiteDispatcher {
'filter' => false, 'filter' => false,
'fixture' => null 'fixture' => null
); );
/** /**
* Baseurl for the request * Baseurl for the request
* *

View file

@ -1,5 +1,4 @@
<?php <?php
App::import('Model', 'ConnectionManager');
/** /**
* Washes strings from unwanted noise. * Washes strings from unwanted noise.
* *
@ -19,6 +18,7 @@ App::import('Model', 'ConnectionManager');
* @since CakePHP(tm) v 0.10.0.1076 * @since CakePHP(tm) v 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
App::import('Model', 'ConnectionManager');
/** /**
* Data Sanitization. * Data Sanitization.

View file

@ -472,6 +472,7 @@ abstract class JsBaseEngineHelper extends AppHelper {
* @return string Completed slider script * @return string Completed slider script
*/ */
abstract public function slider($options = array()); abstract public function slider($options = array());
/** /**
* Serialize the form attached to $selector. * Serialize the form attached to $selector.
* Pass `true` for $isForm if the current selection is a form element. * Pass `true` for $isForm if the current selection is a form element.