mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Code consistency formatting tweaks
This commit is contained in:
parent
be770bd9b8
commit
1e1c7a036d
62 changed files with 127 additions and 12 deletions
|
@ -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.
|
||||
|
|
|
@ -374,6 +374,7 @@ class Cache {
|
|||
self::set(null, $config);
|
||||
return $success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrement a number under the key and return decremented value.
|
||||
*
|
||||
|
@ -401,6 +402,7 @@ class Cache {
|
|||
self::set(null, $config);
|
||||
return $success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a key from the cache.
|
||||
*
|
||||
|
|
|
@ -110,6 +110,7 @@ class XcacheEngine extends CacheEngine {
|
|||
public function decrement($key, $offset = 1) {
|
||||
return xcache_dec($key, $offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a key from the cache
|
||||
*
|
||||
|
|
|
@ -151,6 +151,7 @@ class ApiShell extends AppShell {
|
|||
))->description(__d('cake_console', 'Lookup doc block comments for classes in CakePHP.'));
|
||||
return $parser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show help for this shell.
|
||||
*
|
||||
|
|
|
@ -554,6 +554,7 @@ class UpgradeShell extends AppShell {
|
|||
);
|
||||
$this->_filesRegexpUpdate($patterns);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move application views files to where they now should be
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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".
|
||||
*
|
||||
|
|
|
@ -24,6 +24,7 @@ ini_set('display_errors', 1);
|
|||
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 @@ ini_set('display_errors', 1);
|
|||
if (!defined('ROOT')) {
|
||||
define('ROOT', dirname(dirname(dirname(__FILE__))));
|
||||
}
|
||||
|
||||
/**
|
||||
* The actual directory name for the "app".
|
||||
*
|
||||
|
|
|
@ -100,6 +100,7 @@ class DigestAuthenticate extends BaseAuthenticate {
|
|||
$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 @@ class DigestAuthenticate extends BaseAuthenticate {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a user record using the standard options.
|
||||
*
|
||||
|
|
|
@ -226,6 +226,7 @@ class MissingActionException extends CakeException {
|
|||
parent::__construct($message, $code);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Private Action exception - used when a controller action
|
||||
* starts with a `_`.
|
||||
|
|
|
@ -585,6 +585,7 @@ class Sqlserver extends DboSource {
|
|||
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 @@ class Sqlserver extends DboSource {
|
|||
}
|
||||
return $affected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes given SQL statement.
|
||||
*
|
||||
|
|
|
@ -3075,6 +3075,7 @@ class Model extends Object {
|
|||
}
|
||||
return $valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks a field as invalid, optionally setting the name of validation
|
||||
* rule (in case of multiple validation for field) that was broken.
|
||||
|
|
|
@ -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 @@ App::uses('CakeRoute', 'Routing/Route');
|
|||
* @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 {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 @@ App::uses('CakeRoute', 'Routing/Route');
|
|||
* @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 {
|
||||
|
||||
/**
|
||||
|
|
|
@ -80,6 +80,7 @@ class BasicsTest extends CakeTestCase {
|
|||
$this->assertEquals($result, array());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* testHttpBase method
|
||||
*
|
||||
|
|
|
@ -364,6 +364,7 @@ class MemcacheEngineTest extends CakeTestCase {
|
|||
|
||||
Cache::clear(false, 'memcache2');
|
||||
}
|
||||
|
||||
/**
|
||||
* test that a 0 duration can succesfully write.
|
||||
*
|
||||
|
|
|
@ -28,6 +28,7 @@ class PhpReaderTest extends CakeTestCase {
|
|||
parent::setUp();
|
||||
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config'. DS;
|
||||
}
|
||||
|
||||
/**
|
||||
* test reading files
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -71,6 +71,7 @@ class TaskCollectionTest extends CakeTestCase {
|
|||
|
||||
$this->assertFalse($this->Tasks->enabled('DbConfig'), 'DbConfigTask should be disabled');
|
||||
}
|
||||
|
||||
/**
|
||||
* test missingtask exception
|
||||
*
|
||||
|
|
|
@ -163,6 +163,7 @@ class BasicAuthenticateTest extends CakeTestCase {
|
|||
$result = $this->auth->authenticate($request, $this->response);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test authenticate sucesss
|
||||
*
|
||||
|
|
|
@ -499,6 +499,7 @@ class CookieComponentTest extends CakeTestCase {
|
|||
$this->assertNull($this->Cookie->read('User.email'));
|
||||
$this->Cookie->destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test deleting recursively with keys that don't exist.
|
||||
*
|
||||
|
|
|
@ -470,6 +470,7 @@ class DbAclTest extends CakeTestCase {
|
|||
|
||||
$this->Acl->deny('Bobs', 'ROOT/printers/DoesNotExist', 'create');
|
||||
}
|
||||
|
||||
/**
|
||||
* debug function - to help editing/creating test cases for the ACL component
|
||||
*
|
||||
|
|
|
@ -45,6 +45,7 @@ class RequestHandlerTestController extends Controller {
|
|||
$this->viewPath = 'Posts';
|
||||
$this->render('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* test method for ajax redirection + parameter parsing
|
||||
*
|
||||
|
|
|
@ -110,6 +110,7 @@ class ComponentCollectionTest extends CakeTestCase {
|
|||
|
||||
$this->assertFalse($this->Components->enabled('Cookie'), 'Cookie should be disabled');
|
||||
}
|
||||
|
||||
/**
|
||||
* test missingcomponent exception
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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 @@ class TestComponent extends Object {
|
|||
*/
|
||||
public function startup(&$controller) {
|
||||
}
|
||||
|
||||
/**
|
||||
* shutdown method
|
||||
*
|
||||
|
@ -327,6 +331,7 @@ class TestComponent extends Object {
|
|||
*/
|
||||
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 @@ class ControllerTest extends CakeTestCase {
|
|||
|
||||
$Controller->startupProcess();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that the shutdown process calls the correct functions
|
||||
*
|
||||
|
|
|
@ -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 @@ class TestScaffoldMock extends Scaffold {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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 @@ class ScaffoldTest extends CakeTestCase {
|
|||
$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 @@ class ScaffoldTest extends CakeTestCase {
|
|||
$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
|
||||
*
|
||||
|
|
|
@ -126,6 +126,7 @@ class MyCustomExceptionRenderer extends ExceptionRenderer {
|
|||
echo 'widget thing is missing';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception class for testing app error handlers and custom errors.
|
||||
*
|
||||
|
@ -409,6 +410,7 @@ class ExceptionRendererTest extends CakeTestCase {
|
|||
$result = ob_get_clean();
|
||||
$this->assertContains('Not Found', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test that error400 doesn't expose XSS
|
||||
*
|
||||
|
|
|
@ -2989,6 +2989,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
|||
$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 @@ class ContainableBehaviorTest extends CakeTestCase {
|
|||
$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.
|
||||
*
|
||||
|
|
|
@ -829,6 +829,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
|||
);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testTranslateTableWithPrefix method
|
||||
* Tests that is possible to have a translation model with a custom tablePrefix
|
||||
|
|
|
@ -1202,6 +1202,7 @@ class TreeBehaviorNumberTest extends CakeTestCase {
|
|||
$this->assertTrue($this->Tree->cacheQueries, 'cacheQueries was not restored after reorder(). %s');
|
||||
$this->Tree->cacheQueries = $original;
|
||||
}
|
||||
|
||||
/**
|
||||
* testGenerateTreeListWithSelfJoin method
|
||||
*
|
||||
|
|
|
@ -254,6 +254,7 @@ class TestBehavior extends ModelBehavior {
|
|||
}
|
||||
echo "onError trigger success";
|
||||
}
|
||||
|
||||
/**
|
||||
* beforeTest method
|
||||
*
|
||||
|
|
|
@ -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 @@ class CakeSchemaTest extends CakeTestCase {
|
|||
$result = $this->Schema->generateTable('posts', $posts);
|
||||
$this->assertRegExp('/public \$posts/', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testSchemaWrite method
|
||||
*
|
||||
|
|
|
@ -24,7 +24,6 @@ App::uses('ConnectionManager', 'Model');
|
|||
*/
|
||||
class ConnectionManagerTest extends CakeTestCase {
|
||||
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
|
@ -34,6 +33,7 @@ class ConnectionManagerTest extends CakeTestCase {
|
|||
parent::tearDown();
|
||||
CakePlugin::unload();
|
||||
}
|
||||
|
||||
/**
|
||||
* testEnumConnectionObjects method
|
||||
*
|
||||
|
|
|
@ -225,6 +225,7 @@ class MysqlTest extends CakeTestCase {
|
|||
|
||||
$this->Dbo->rawQuery('DROP TABLE ' . $this->Dbo->fullTableName($tableName));
|
||||
}
|
||||
|
||||
/**
|
||||
* testLastAffected method
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -163,6 +163,7 @@ class SqlserverTestModel extends Model {
|
|||
'foreignKey' => 'client_id'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* find method
|
||||
*
|
||||
|
@ -302,6 +303,7 @@ class SqlserverTest extends CakeTestCase {
|
|||
$result = $this->db->value('', 'binary');
|
||||
$this->assertSame($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testFields method
|
||||
*
|
||||
|
@ -459,6 +461,7 @@ class SqlserverTest extends CakeTestCase {
|
|||
);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testBuildColumn
|
||||
*
|
||||
|
@ -521,6 +524,7 @@ class SqlserverTest extends CakeTestCase {
|
|||
$expected = '[body] nvarchar(MAX)';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testBuildIndex method
|
||||
*
|
||||
|
@ -547,6 +551,7 @@ class SqlserverTest extends CakeTestCase {
|
|||
$expected = array('ALTER TABLE items ADD CONSTRAINT client_id UNIQUE([client_id], [period_id]);');
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testUpdateAllSyntax method
|
||||
*
|
||||
|
|
|
@ -137,6 +137,7 @@ class DatabaseSessionTest extends CakeTestCase {
|
|||
$result = $this->storage->write('', 'This is a Test');
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test read()
|
||||
*
|
||||
|
|
|
@ -186,6 +186,7 @@ class DbAroUserTest extends CakeTestModel {
|
|||
* @var string 'auth_users'
|
||||
*/
|
||||
public $useTable = 'auth_users';
|
||||
|
||||
/**
|
||||
* bindNode method
|
||||
*
|
||||
|
|
|
@ -32,6 +32,7 @@ class DboMock extends DboSource {
|
|||
public function name($field) {
|
||||
return $field;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true to fake a database connection
|
||||
*/
|
||||
|
|
|
@ -7447,6 +7447,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing availability of $this->findQueryType in Model callbacks
|
||||
*
|
||||
|
|
|
@ -41,6 +41,7 @@ abstract class BaseModelTest extends CakeTestCase {
|
|||
* @var bool false
|
||||
*/
|
||||
public $backupGlobals = false;
|
||||
|
||||
/**
|
||||
* fixtures property
|
||||
*
|
||||
|
|
|
@ -539,6 +539,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
$result = $Model->save($data);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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['DoomedSomethingElse']), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* testHabtmSaveKeyResolution method
|
||||
*
|
||||
|
|
|
@ -1894,6 +1894,7 @@ class AssociationTest2 extends CakeTestModel {
|
|||
class Callback extends CakeTestModel {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* CallbackPostTestModel class
|
||||
*
|
||||
|
|
|
@ -676,6 +676,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$result = $this->CakeEmail->transportClass();
|
||||
$this->assertInstanceOf('DebugTransport', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testSendWithContent method
|
||||
*
|
||||
|
@ -1213,6 +1214,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$this->assertTrue((bool)strpos($result['headers'], 'Message-ID: '));
|
||||
$this->assertTrue((bool)strpos($result['headers'], 'To: '));
|
||||
}
|
||||
|
||||
/**
|
||||
* testViewRender method
|
||||
*
|
||||
|
|
|
@ -291,6 +291,7 @@ class ArticlesTestController extends ArticlesTestAppController {
|
|||
public function admin_index() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* fake index method.
|
||||
*
|
||||
|
@ -441,6 +442,7 @@ class TestCachedPagesController extends Controller {
|
|||
public function view($id = null) {
|
||||
$this->render('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* test cached forms / tests view object being registered
|
||||
*
|
||||
|
@ -723,6 +725,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
|
||||
$controller = $Dispatcher->dispatch($url, $response, array('return' => 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* testDispatch method
|
||||
*
|
||||
|
|
|
@ -2084,6 +2084,7 @@ class RouterTest extends CakeTestCase {
|
|||
$this->assertEquals(Router::stripPlugin($url), $url);
|
||||
$this->assertEquals(Router::stripPlugin($url, null), $url);
|
||||
}
|
||||
|
||||
/**
|
||||
* testCurentRoute
|
||||
*
|
||||
|
@ -2098,6 +2099,7 @@ class RouterTest extends CakeTestCase {
|
|||
$route = Router::currentRoute();
|
||||
$this->assertEquals(array_merge($url, array('plugin' => null)), $route->defaults);
|
||||
}
|
||||
|
||||
/**
|
||||
* testRequestRoute
|
||||
*
|
||||
|
@ -2124,6 +2126,7 @@ class RouterTest extends CakeTestCase {
|
|||
$route = Router::requestRoute();
|
||||
$this->assertEquals(array_merge($url, array('plugin' => null)), $route->defaults);
|
||||
}
|
||||
|
||||
/**
|
||||
* testGetParams
|
||||
*
|
||||
|
@ -2389,6 +2392,7 @@ class RouterTest extends CakeTestCase {
|
|||
$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.
|
||||
*
|
||||
|
|
|
@ -214,8 +214,8 @@ class CakeTestCaseTest extends CakeTestCase {
|
|||
$manager->expects($this->once())->method('unload');
|
||||
$result = $test->run();
|
||||
$this->assertEquals(1, $result->errorCount());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* testSkipIf
|
||||
*
|
||||
|
|
|
@ -184,6 +184,7 @@ class FolderTest extends CakeTestCase {
|
|||
chmod($path, '0777');
|
||||
rmdir($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* testOperations method
|
||||
*
|
||||
|
@ -343,6 +344,7 @@ class FolderTest extends CakeTestCase {
|
|||
$result = Folder::addPathElement(DS . 'some' . DS . 'dir' . DS, 'another_path');
|
||||
$this->assertEquals($result, DS . 'some' . DS . 'dir' . DS . 'another_path');
|
||||
}
|
||||
|
||||
/**
|
||||
* testFolderRead method
|
||||
*
|
||||
|
|
|
@ -1291,6 +1291,7 @@ class SetTest extends CakeTestCase {
|
|||
$this->assertSame($expected, $result);
|
||||
$this->assertSame($result, Set::extract('{n}.B.field1', $items));
|
||||
}
|
||||
|
||||
/**
|
||||
* testExtractWithArrays method
|
||||
*
|
||||
|
|
|
@ -53,6 +53,7 @@ class TestNlValidation {
|
|||
static function postal($check) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* ssn function for testing ssn pass through
|
||||
*
|
||||
|
|
|
@ -68,6 +68,7 @@ class CacheHelperTest extends CakeTestCase {
|
|||
$this->markTestSkipped('TMP/views is not writable %s');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* setUp method
|
||||
*
|
||||
|
@ -158,6 +159,7 @@ class CacheHelperTest extends CakeTestCase {
|
|||
|
||||
@unlink($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test cache parsing with cake:nocache tags in view file.
|
||||
*
|
||||
|
|
|
@ -990,6 +990,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
$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 @@ class FormHelperTest extends CakeTestCase {
|
|||
$this->assertTags($result, $expected);
|
||||
$this->assertEquals(array('test', 'test_x', 'test_y'), $this->Form->unlockField());
|
||||
}
|
||||
|
||||
/**
|
||||
* testFormSecurityMultipleInputFields method
|
||||
*
|
||||
|
@ -4143,6 +4145,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
);
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
* testSelectHiddenFieldOmission method
|
||||
*
|
||||
|
@ -5824,6 +5827,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
);
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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\[meridian\]"/', $result, 'meridian name attribute is wrong.');
|
||||
}
|
||||
|
||||
/**
|
||||
* testEditFormWithData method
|
||||
*
|
||||
|
|
|
@ -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 @@ class JsBaseEngineTest extends CakeTestCase {
|
|||
$this->View = $this->getMock('View', array('addScript'), array(&$controller));
|
||||
$this->JsEngine = new OptionEngineHelper($this->View);
|
||||
}
|
||||
|
||||
/**
|
||||
* tearDown method
|
||||
*
|
||||
|
|
|
@ -74,6 +74,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
|
|||
$this->assertEquals($result, $this->Moo);
|
||||
$this->assertEquals($this->Moo->selection, '$$("#some_long-id.class")');
|
||||
}
|
||||
|
||||
/**
|
||||
* test event binding
|
||||
*
|
||||
|
@ -93,6 +94,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
|
|||
$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 @@ class MootoolsEngineHelperTest extends CakeTestCase {
|
|||
$expected = 'window.addEvent("domready", function (event) {foo.name = "bar";});';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test Each method
|
||||
*
|
||||
|
@ -114,6 +117,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
|
|||
$expected = '$("foo").each(function (item, index) {item.setStyle("display", "none");});';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test Effect generation
|
||||
*
|
||||
|
@ -153,6 +157,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
|
|||
$expected = '$("foo").set("slide", {duration:"long"}).slide("out");';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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});';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test drag() method
|
||||
*
|
||||
|
@ -273,6 +280,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
|
|||
'hover' => 'onHover',
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* 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}});';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;}});';
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test the serializeForm implementation.
|
||||
*
|
||||
|
|
|
@ -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($text9, 10), 'НОПРСТУ...');
|
||||
}
|
||||
|
||||
/**
|
||||
* testHighlight method
|
||||
*
|
||||
|
|
|
@ -447,6 +447,7 @@ class ViewTest extends CakeTestCase {
|
|||
$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.
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -45,6 +45,7 @@ class CakeTestSuiteDispatcher {
|
|||
'filter' => false,
|
||||
'fixture' => null
|
||||
);
|
||||
|
||||
/**
|
||||
* Baseurl for the request
|
||||
*
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
App::import('Model', 'ConnectionManager');
|
||||
/**
|
||||
* Washes strings from unwanted noise.
|
||||
*
|
||||
|
@ -19,6 +18,7 @@ App::import('Model', 'ConnectionManager');
|
|||
* @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.
|
||||
|
|
|
@ -472,6 +472,7 @@ abstract class JsBaseEngineHelper extends AppHelper {
|
|||
* @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.
|
||||
|
|
Loading…
Reference in a new issue