From 45ec5d73c5a212659ff937d402fc6ec4ae8699b6 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Thu, 16 Feb 2012 23:13:12 -0800 Subject: [PATCH] Add missing visibility keywords --- lib/Cake/Console/Command/Task/BakeTask.php | 2 +- .../Model/Datasource/Database/Postgres.php | 2 +- .../Test/Case/Cache/Engine/ApcEngineTest.php | 2 +- .../Case/Cache/Engine/MemcacheEngineTest.php | 2 +- .../Console/Command/Task/FixtureTaskTest.php | 2 +- .../Component/AuthComponentTest.php | 4 ++-- .../Component/CookieComponentTest.php | 4 ++-- .../Case/Controller/Component/DbAclTest.php | 6 ++--- .../Component/PaginatorComponentTest.php | 2 +- .../Component/RequestHandlerComponentTest.php | 2 +- .../Test/Case/Controller/ScaffoldTest.php | 6 ++--- .../Behavior/ContainableBehaviorTest.php | 8 +++---- .../Model/Behavior/TranslateBehaviorTest.php | 2 +- .../Model/Datasource/Database/MysqlTest.php | 6 ++--- .../Datasource/Database/PostgresTest.php | 4 ++-- .../Model/Datasource/Database/SqliteTest.php | 2 +- .../Case/Model/Datasource/DboSourceTest.php | 4 ++-- lib/Cake/Test/Case/Model/DbAclTest.php | 2 +- .../Test/Case/Model/ModelIntegrationTest.php | 24 +++++++++---------- .../Test/Case/Model/ModelValidationTest.php | 2 +- .../Test/Case/Network/CakeRequestTest.php | 4 ++-- lib/Cake/Test/Case/Routing/DispatcherTest.php | 8 +++---- .../Case/TestSuite/CakeTestFixtureTest.php | 2 +- .../Test/Case/Utility/ClassRegistryTest.php | 2 +- lib/Cake/Test/Case/Utility/FileTest.php | 4 ++-- lib/Cake/Test/Case/Utility/ValidationTest.php | 2 +- .../Test/Case/View/Helper/FormHelperTest.php | 14 +++++------ .../Test/Case/View/Helper/HtmlHelperTest.php | 2 +- .../Test/Case/View/Helper/JsHelperTest.php | 2 +- lib/Cake/Test/Case/View/HelperTest.php | 4 ++-- .../TestSuite/CakeTestSuiteDispatcher.php | 10 ++++---- lib/Cake/TestSuite/ControllerTestCase.php | 2 +- .../TestSuite/Reporter/CakeBaseReporter.php | 2 +- lib/Cake/View/Helper/NumberHelper.php | 2 +- 34 files changed, 74 insertions(+), 74 deletions(-) diff --git a/lib/Cake/Console/Command/Task/BakeTask.php b/lib/Cake/Console/Command/Task/BakeTask.php index 9d77e7fd45a..e76d36bc659 100644 --- a/lib/Cake/Console/Command/Task/BakeTask.php +++ b/lib/Cake/Console/Command/Task/BakeTask.php @@ -52,7 +52,7 @@ class BakeTask extends AppShell { * * @return void */ - function startup() { + public function startup() { Configure::write('debug', 2); Configure::write('Cache.disable', 1); parent::startup(); diff --git a/lib/Cake/Model/Datasource/Database/Postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php index 148a301ecd7..544f614147d 100644 --- a/lib/Cake/Model/Datasource/Database/Postgres.php +++ b/lib/Cake/Model/Datasource/Database/Postgres.php @@ -898,7 +898,7 @@ public function renderStatement($type, $data) { * * @return string The schema name */ - function getSchemaName() { + public function getSchemaName() { return $this->config['schema']; } diff --git a/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php index 63f50c188da..1c4e4d3a149 100644 --- a/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php @@ -78,7 +78,7 @@ public function testReadAndWriteCache() { * * @return void */ - function testReadWriteDurationZero() { + public function testReadWriteDurationZero() { Cache::config('apc', array('engine' => 'Apc', 'duration' => 0, 'prefix' => 'cake_')); Cache::write('zero', 'Should save', 'apc'); sleep(1); diff --git a/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php index 1c6a3769ef4..c9ae26447af 100644 --- a/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php @@ -169,7 +169,7 @@ public function testParseServerStringNonLatin() { * * @return void */ - function testParseServerStringUnix() { + public function testParseServerStringUnix() { $Memcache =& new TestMemcacheEngine(); $result = $Memcache->parseServerString('unix:///path/to/memcached.sock'); $this->assertEquals($result, array('unix:///path/to/memcached.sock', 0)); diff --git a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php index 1c452a1dbd4..197c79afe97 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php @@ -177,7 +177,7 @@ public function testImportOptionsAlternateConnection() { * * @return void */ - function testImportRecordsNoEscaping() { + public function testImportRecordsNoEscaping() { $db = ConnectionManager::getDataSource('test'); if ($db instanceof Sqlserver) { $this->markTestSkipped('This test does not run on SQLServer'); diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index f80e8ff8131..b8002687172 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -42,7 +42,7 @@ class TestAuthComponent extends AuthComponent { * * @return void */ - function _stop($status = 0) { + protected function _stop($status = 0) { $this->testStop = true; } @@ -117,7 +117,7 @@ class AuthTestController extends Controller { * * @return void */ - function __construct($request, $response) { + public function __construct($request, $response) { $request->addParams(Router::parse('/auth_test')); $request->here = '/auth_test'; $request->webroot = '/'; diff --git a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php index fceab20473f..6af12402a0c 100644 --- a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php @@ -539,7 +539,7 @@ public function testDeleteRemovesChildren() { * * @return void */ - function testDeleteChildrenNotExist() { + public function testDeleteChildrenNotExist() { $this->assertNull($this->Cookie->delete('NotFound')); $this->assertNull($this->Cookie->delete('Not.Found')); } @@ -573,7 +573,7 @@ protected function _implode(array $array) { * @param mixed $value * @return string */ - function __encrypt($value) { + protected function __encrypt($value) { if (is_array($value)) { $value = $this->_implode($value); } diff --git a/lib/Cake/Test/Case/Controller/Component/DbAclTest.php b/lib/Cake/Test/Case/Controller/Component/DbAclTest.php index 8546764a661..02e4534e904 100644 --- a/lib/Cake/Test/Case/Controller/Component/DbAclTest.php +++ b/lib/Cake/Test/Case/Controller/Component/DbAclTest.php @@ -155,7 +155,7 @@ class DbAclTwoTest extends DbAcl { * * @return void */ - function __construct() { + public function __construct() { $this->Aro = new AroTwoTest(); $this->Aro->Permission = new PermissionTwoTest(); $this->Aco = new AcoTwoTest(); @@ -480,7 +480,7 @@ public function testRevoke() { * @param bool $treesToo * @return void */ - function __debug ($printTreesToo = false) { + protected function __debug ($printTreesToo = false) { $this->Acl->Aro->displayField = 'alias'; $this->Acl->Aco->displayField = 'alias'; $aros = $this->Acl->Aro->find('list', array('order' => 'lft')); @@ -527,7 +527,7 @@ function __debug ($printTreesToo = false) { * @param int $len * @return void */ - function __pad($string = '', $len = 14) { + protected function __pad($string = '', $len = 14) { return str_pad($string, $len); } } diff --git a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php index 814fa6b7d12..13d198084b0 100644 --- a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php @@ -861,7 +861,7 @@ public function testPaginateMaxLimit() { * * @return void */ - function testPaginateOrderVirtualFieldSharedWithRealField() { + public function testPaginateOrderVirtualFieldSharedWithRealField() { $Controller =& new Controller($this->request); $Controller->uses = array('PaginatorControllerPost', 'PaginatorControllerComment'); $Controller->constructClasses(); diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index a7241be70f1..afc3f3d4c11 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -107,7 +107,7 @@ public function setUp() { * * @return void */ - function _init() { + protected function _init() { $request = new CakeRequest('controller_posts/index'); $response = new CakeResponse(); $this->Controller = new RequestHandlerTestController($request, $response); diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php index 585041bb738..cd2e45dd814 100644 --- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php +++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php @@ -90,7 +90,7 @@ class TestScaffoldMock extends Scaffold { * * @param unknown_type $params */ - function _scaffold(CakeRequest $request) { + protected function _scaffold(CakeRequest $request) { $this->_params = $request; } @@ -99,7 +99,7 @@ function _scaffold(CakeRequest $request) { * * @return unknown */ - function getParams() { + public function getParams() { return $this->_params; } } @@ -277,7 +277,7 @@ public function testScaffoldFlashMessages() { * * @return void */ - function testHabtmFieldAdditionWithScaffoldForm() { + public function testHabtmFieldAdditionWithScaffoldForm() { CakePlugin::unload(); $params = array( 'plugin' => null, diff --git a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php index 2523a8c2b6e..6b100559402 100644 --- a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php @@ -3511,7 +3511,7 @@ public function testResetMultipleHabtmAssociations() { /** * test that bindModel and unbindModel work with find() calls in between. */ - function testBindMultipleTimesWithFind() { + public function testBindMultipleTimesWithFind() { $binding = array( 'hasOne' => array( 'ArticlesTag' => array( @@ -3624,7 +3624,7 @@ public function testLazyLoad() { * @param array $contain * @return void */ - function __containments(&$Model, $contain = array()) { + protected function __containments(&$Model, $contain = array()) { if (!is_array($Model)) { $result = $Model->containments($contain); return $this->__containments($result['models']); @@ -3645,7 +3645,7 @@ function __containments(&$Model, $contain = array()) { * @param array $expected * @return void */ - function __assertBindings(&$Model, $expected = array()) { + protected function __assertBindings(&$Model, $expected = array()) { $expected = array_merge(array('belongsTo' => array(), 'hasOne' => array(), 'hasMany' => array(), 'hasAndBelongsToMany' => array()), $expected); foreach ($expected as $binding => $expect) { @@ -3661,7 +3661,7 @@ function __assertBindings(&$Model, $expected = array()) { * @param bool $output * @return void */ - function __bindings(&$Model, $extra = array(), $output = true) { + protected function __bindings(&$Model, $extra = array(), $output = true) { $relationTypes = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); $debug = '['; diff --git a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php index 538eb7623be..adcd1df8dc2 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php @@ -63,7 +63,7 @@ public function tearDown() { * * @return void */ - function testCountWithConditions() { + public function testCountWithConditions() { $this->loadFixtures('Translate', 'TranslatedItem'); $Model =& new TranslatedItem(); diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index 2ef9c39983d..20bedaff381 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -178,7 +178,7 @@ public function testLocalizedFloats() { * * @return void */ - function testScientificNotation() { + public function testScientificNotation() { $result = $this->db->value(2.2E-54, 'float'); $this->assertEquals('2.2E-54', (string)$result); @@ -1055,7 +1055,7 @@ public function testGenerateAssociationQuerySelfJoin() { * @param mixed $model * @return void */ - function _buildRelatedModels($model) { + protected function _buildRelatedModels($model) { foreach ($model->associations() as $type) { foreach ($model->{$type} as $assoc => $assocData) { if (is_string($assocData)) { @@ -1077,7 +1077,7 @@ function _buildRelatedModels($model) { * @param mixed $binding * @return void */ - function &_prepareAssociationQuery($model, &$queryData, $binding) { + protected function &_prepareAssociationQuery($model, &$queryData, $binding) { $type = $binding['type']; $assoc = $binding['model']; $assocData = $model->{$type}[$assoc]; diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index 3e5ae4afe37..53effa2b998 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -43,7 +43,7 @@ class DboPostgresTestDb extends Postgres { * @param mixed $sql * @return void */ - function _execute($sql, $params = array(), $prepareOptions = array()) { + protected function _execute($sql, $params = array(), $prepareOptions = array()) { $this->simulated[] = $sql; return null; } @@ -757,7 +757,7 @@ public function testVirtualFields() { * * @return void */ - function testVirtualFieldAsAConstant() { + public function testVirtualFieldAsAConstant() { $this->loadFixtures('Article', 'Comment'); $Article = ClassRegistry::init('Article'); $Article->virtualFields = array( diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php index 28f3d1b4d93..2855f013345 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php @@ -42,7 +42,7 @@ class DboSqliteTestDb extends Sqlite { * @param mixed $sql * @return void */ - function _execute($sql, $params = array(), $prepareOptions = array()) { + protected function _execute($sql, $params = array(), $prepareOptions = array()) { $this->simulated[] = $sql; return null; } diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index 7b1ddb3cee2..3c31e543f84 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -790,7 +790,7 @@ public function testFieldsUsingMethodCache() { * * @return void */ - function testGroupNoModel() { + public function testGroupNoModel() { $result = $this->db->group('created'); $this->assertEquals(' GROUP BY created', $result); } @@ -798,7 +798,7 @@ function testGroupNoModel() { /** * Test getting the last error. */ - function testLastError() { + public function testLastError() { $stmt = $this->getMock('PDOStatement'); $stmt->expects($this->any()) ->method('errorInfo') diff --git a/lib/Cake/Test/Case/Model/DbAclTest.php b/lib/Cake/Test/Case/Model/DbAclTest.php index 46fa933cf4a..02880ecc61b 100644 --- a/lib/Cake/Test/Case/Model/DbAclTest.php +++ b/lib/Cake/Test/Case/Model/DbAclTest.php @@ -214,7 +214,7 @@ class TestDbAcl extends DbAcl { * * @return void */ - function __construct() { + public function __construct() { $this->Aro = new DbAroTest(); $this->Aro->Permission = new DbPermissionTest(); $this->Aco = new DbAcoTest(); diff --git a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php index 9a764534190..3e2f59f47df 100644 --- a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php +++ b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php @@ -240,7 +240,7 @@ public function testDynamicBehaviorAttachment() { * @access public * @return void */ - function testFindWithJoinsOption() { + public function testFindWithJoinsOption() { $this->loadFixtures('Article', 'User'); $TestUser =& new User(); @@ -626,7 +626,7 @@ public function testCrossDatabaseJoins() { * * @return void */ - function testHABTMKeepExisting() { + public function testHABTMKeepExisting() { $this->loadFixtures('Site', 'Domain', 'DomainsSite'); $Site = new Site(); @@ -674,8 +674,8 @@ function testHABTMKeepExisting() { $results = $Site->Domain->DomainsSite->find('count', array( 'conditions' => array( 'DomainsSite.active' => true, - ), - )); + ), + )); $expected = 5; $this->assertEquals($expected, $results); @@ -687,8 +687,8 @@ function testHABTMKeepExisting() { $results = $Site->DomainsSite->find('count', array( 'conditions' => array( 'DomainsSite.active' => true, - ), - )); + ), + )); $expected = 6; $this->assertEquals($expected, $results); @@ -697,8 +697,8 @@ function testHABTMKeepExisting() { 'Site' => array('id' => 1, 'name' => 'cakephp (modified)'), 'Domain' => array( 'Domain' => array(3), - ) - ); + ) + ); $Site->create($data); $Site->save($data); @@ -715,12 +715,12 @@ function testHABTMKeepExisting() { * * @return void */ - function testHABTMKeepExistingWithThreeDbs() { + public function testHABTMKeepExistingWithThreeDbs() { $config = ConnectionManager::enumConnectionObjects(); $this->skipIf( !isset($config['test']) || !isset($config['test2']) || !isset($config['test_database_three']), 'Primary, secondary, and tertiary test databases not configured, skipping test. To run this test define $test, $test2, and $test_database_three in your database configuration.' - ); + ); $this->loadFixtures('Player', 'Guild', 'GuildsPlayer', 'Armor', 'ArmorsPlayer'); $Player = ClassRegistry::init('Player'); @@ -729,9 +729,9 @@ function testHABTMKeepExistingWithThreeDbs() { 'Armor' => array( 'with' => 'ArmorsPlayer', 'unique' => 'keepExisting', - ), ), - ), false); + ), + ), false); $this->assertEquals('test', $Player->useDbConfig); $this->assertEquals('test', $Player->Guild->useDbConfig); $this->assertEquals('test2', $Player->Guild->GuildsPlayer->useDbConfig); diff --git a/lib/Cake/Test/Case/Model/ModelValidationTest.php b/lib/Cake/Test/Case/Model/ModelValidationTest.php index 8435eda3a77..729febcc52c 100644 --- a/lib/Cake/Test/Case/Model/ModelValidationTest.php +++ b/lib/Cake/Test/Case/Model/ModelValidationTest.php @@ -766,7 +766,7 @@ public function testValidationMessageAsArray() { * * @return void */ - function testStateValidation() { + public function testStateValidation() { $this->loadFixtures('Article'); $Article = new Article(); diff --git a/lib/Cake/Test/Case/Network/CakeRequestTest.php b/lib/Cake/Test/Case/Network/CakeRequestTest.php index e124b1458b2..b816be917a9 100644 --- a/lib/Cake/Test/Case/Network/CakeRequestTest.php +++ b/lib/Cake/Test/Case/Network/CakeRequestTest.php @@ -815,7 +815,7 @@ public function testAddDetector() { * * @return void */ - function _detectCallback($request) { + protected function _detectCallback($request) { return $request->return == true; } @@ -1709,7 +1709,7 @@ public function testIsRequested() { * @param mixed $env * @return void */ - function __loadEnvironment($env) { + protected function __loadEnvironment($env) { if (isset($env['App'])) { Configure::write('App', $env['App']); } diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index 2258c1f7ddf..1403b137a1c 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -1492,7 +1492,7 @@ public function testHttpMethodOverrides() { * * @return void */ - function __backupEnvironment() { + protected function __backupEnvironment() { return array( 'App' => Configure::read('App'), 'GET' => $_GET, @@ -1506,7 +1506,7 @@ function __backupEnvironment() { * * @return void */ - function __reloadEnvironment() { + protected function __reloadEnvironment() { foreach ($_GET as $key => $val) { unset($_GET[$key]); } @@ -1525,7 +1525,7 @@ function __reloadEnvironment() { * @param mixed $env * @return void */ - function __loadEnvironment($env) { + protected function __loadEnvironment($env) { if ($env['reload']) { $this->__reloadEnvironment(); } @@ -1559,7 +1559,7 @@ function __loadEnvironment($env) { * @param mixed $her * @return string */ - function __cachePath($here) { + protected function __cachePath($here) { $path = $here; if ($here == '/') { $path = 'home'; diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php index d2d319bc4b1..b6a5c2dc763 100644 --- a/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php +++ b/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php @@ -424,7 +424,7 @@ public function testInsert() { * @param string $values * @return boolean true */ - function _insertCallback($table, $fields, $values) { + protected function _insertCallback($table, $fields, $values) { $this->insertMulti['table'] = $table; $this->insertMulti['fields'] = $fields; $this->insertMulti['values'] = $values; diff --git a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php index 773db536415..20a241aa03a 100644 --- a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php +++ b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php @@ -150,7 +150,7 @@ abstract function doSomething(); */ interface ClassRegistryInterfaceTest { - function doSomething(); + public function doSomething(); } /** diff --git a/lib/Cake/Test/Case/Utility/FileTest.php b/lib/Cake/Test/Case/Utility/FileTest.php index b2b4fc1a7d9..9537b896ed8 100644 --- a/lib/Cake/Test/Case/Utility/FileTest.php +++ b/lib/Cake/Test/Case/Utility/FileTest.php @@ -427,7 +427,7 @@ public function testDelete() { * * @return void */ - function testDeleteAfterRead() { + public function testDeleteAfterRead() { if (!$tmpFile = $this->_getTmpFile()) { return false; } @@ -484,7 +484,7 @@ public function testMime() { * @param bool $paintSkip * @return void */ - function _getTmpFile($paintSkip = true) { + protected function _getTmpFile($paintSkip = true) { $tmpFile = TMP . 'tests' . DS . 'cakephp.file.test.tmp'; if (is_writable(dirname($tmpFile)) && (!file_exists($tmpFile) || is_writable($tmpFile))) { return $tmpFile; diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php index 96b5735843b..cd047b74c38 100644 --- a/lib/Cake/Test/Case/Utility/ValidationTest.php +++ b/lib/Cake/Test/Case/Utility/ValidationTest.php @@ -2100,7 +2100,7 @@ public function testUserDefined() { * * @return void */ - function testDatetime() { + public function testDatetime() { $this->assertTrue(Validation::datetime('27-12-2006 01:00', 'dmy')); $this->assertTrue(Validation::datetime('27-12-2006 01:00', array('dmy'))); $this->assertFalse(Validation::datetime('27-12-2006 1:00', 'dmy')); diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 556ca67dc98..318079f178d 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -1086,7 +1086,7 @@ public function testFormSecurityMultipleInputFields() { * * @return void */ - function testFormSecurityArrayFields() { + public function testFormSecurityArrayFields() { $key = 'testKey'; $this->Form->request->params['_Token']['key'] = $key; @@ -1524,7 +1524,7 @@ public function testPasswordValidation() { * @access public * @return void */ - function testEmptyErrorValidation() { + public function testEmptyErrorValidation() { $this->Form->validationErrors['Contact']['password'] = ''; $result = $this->Form->input('Contact.password'); $expected = array( @@ -1552,7 +1552,7 @@ function testEmptyErrorValidation() { * @access public * @return void */ - function testEmptyInputErrorValidation() { + public function testEmptyInputErrorValidation() { $this->Form->validationErrors['Contact']['password'] = 'Please provide a password'; $result = $this->Form->input('Contact.password', array('error' => '')); $expected = array( @@ -2222,7 +2222,7 @@ public function testInputTime() { * * @return void */ - function testInputDatetime() { + public function testInputDatetime() { extract($this->dateRegex); $result = $this->Form->input('prueba', array( 'type' => 'datetime', 'timeFormat' => 24, 'dateFormat' => 'DMY', 'minYear' => 2008, @@ -5216,7 +5216,7 @@ public function testFormDateTimeMulti() { * * @return void */ - function testDateTimeLabelIdMatchesFirstInput() { + public function testDateTimeLabelIdMatchesFirstInput() { $result = $this->Form->input('Model.date', array('type' => 'date')); $this->assertContains('label for="ModelDateMonth"', $result); @@ -6230,7 +6230,7 @@ public function testSubmitUnlockedByDefault() { * * @return void */ - function testSubmitImageTimestamp() { + public function testSubmitImageTimestamp() { Configure::write('Asset.timestamp', 'force'); $result = $this->Form->submit('cake.power.gif'); @@ -6785,7 +6785,7 @@ public function testEditFormWithData() { * * @return void */ - function testFormInputRequiredDetection() { + public function testFormInputRequiredDetection() { $this->Form->create('Contact'); $result = $this->Form->input('Contact.non_existing'); diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index 1d43e624d8f..da5408f5dcb 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -902,7 +902,7 @@ public function testScriptWithBlocks() { * * @return void */ - function testScriptAssetFilter() { + public function testScriptAssetFilter() { Configure::write('Asset.filter.js', 'js.php'); $result = $this->Html->script('jquery-1.3'); diff --git a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php index 93705db1947..d300f82205e 100644 --- a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php @@ -130,7 +130,7 @@ public function tearDown() { * * @return void */ - function _useMock() { + protected function _useMock() { $request = new CakeRequest(null, false); if (!class_exists('TestJsEngineHelper', false)) { diff --git a/lib/Cake/Test/Case/View/HelperTest.php b/lib/Cake/Test/Case/View/HelperTest.php index 3a474311a6f..e1a58a483d3 100644 --- a/lib/Cake/Test/Case/View/HelperTest.php +++ b/lib/Cake/Test/Case/View/HelperTest.php @@ -460,7 +460,7 @@ public function testValue() { * * @return void */ - function testValueWithDefault() { + public function testValueWithDefault() { $this->Helper->request->data = array('zero' => 0); $this->Helper->setEntity('zero'); $result = $this->Helper->value(array('default' => 'something'), 'zero'); @@ -480,7 +480,7 @@ function testValueWithDefault() { * * @return void */ - function testValueHabtmKeys() { + public function testValueHabtmKeys() { $this->Helper->request->data = array( 'HelperTestTag' => array('HelperTestTag' => '') ); diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index 1398faec985..8ca8adbd773 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -79,7 +79,7 @@ class CakeTestSuiteDispatcher { * * @return void */ - function __construct() { + public function __construct() { $this->_baseUrl = $_SERVER['PHP_SELF']; $dir = rtrim(dirname($this->_baseUrl), '\\'); $this->_baseDir = ($dir === '/') ? $dir : $dir . '/'; @@ -161,7 +161,7 @@ public function loadTestFramework() { * * @return void */ - function _checkXdebug() { + protected function _checkXdebug() { if (!extension_loaded('xdebug')) { $baseDir = $this->_baseDir; include CAKE . 'TestSuite' . DS . 'templates' . DS . 'xdebug.php'; @@ -174,7 +174,7 @@ function _checkXdebug() { * * @return void */ - function _testCaseList() { + protected function _testCaseList() { $command = new CakeTestSuiteCommand('', $this->params); $Reporter = $command->handleReporter($this->params['output']); $Reporter->paintDocumentStart(); @@ -199,7 +199,7 @@ public function setParams($params) { * * @return void */ - function _parseParams() { + protected function _parseParams() { if (!$this->_paramsParsed) { if (!isset($_SERVER['SERVER_NAME'])) { $_SERVER['SERVER_NAME'] = ''; @@ -226,7 +226,7 @@ function _parseParams() { * * @return void */ - function _runTestCase() { + protected function _runTestCase() { $commandArgs = array( 'case' => $this->params['case'], 'core' => $this->params['core'], diff --git a/lib/Cake/TestSuite/ControllerTestCase.php b/lib/Cake/TestSuite/ControllerTestCase.php index 04a1a47d43a..9d5c5a23a54 100644 --- a/lib/Cake/TestSuite/ControllerTestCase.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -50,7 +50,7 @@ class ControllerTestDispatcher extends Dispatcher { * * @return Controller */ - function _getController($request, $response) { + protected function _getController($request, $response) { if ($this->testController === null) { $this->testController = parent::_getController($request, $response); } diff --git a/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php index e9c43c4cb23..9be119dda96 100644 --- a/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php @@ -60,7 +60,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter { * @param string $charset The character set to output with. Defaults to UTF-8 * @param array $params Array of request parameters the reporter should use. See above. */ - function __construct($charset = 'utf-8', $params = array()) { + public function __construct($charset = 'utf-8', $params = array()) { if (!$charset) { $charset = 'utf-8'; } diff --git a/lib/Cake/View/Helper/NumberHelper.php b/lib/Cake/View/Helper/NumberHelper.php index fe95658a7a0..ba4130130c1 100644 --- a/lib/Cake/View/Helper/NumberHelper.php +++ b/lib/Cake/View/Helper/NumberHelper.php @@ -47,7 +47,7 @@ class NumberHelper extends AppHelper { * @param View $View The View this helper is being attached to. * @param array $settings Configuration settings for the helper */ - function __construct(View $View, $settings = array()) { + public function __construct(View $View, $settings = array()) { $settings = Set::merge(array('engine' => 'CakeNumber'), $settings); parent::__construct($View, $settings); list($plugin, $engineClass) = pluginSplit($settings['engine'], true);