mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #500 from shama/patch-visibility
Add missing visibility keywords
This commit is contained in:
commit
c2d753ffb4
34 changed files with 74 additions and 74 deletions
|
@ -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();
|
||||
|
|
|
@ -898,7 +898,7 @@ class Postgres extends DboSource {
|
|||
*
|
||||
* @return string The schema name
|
||||
*/
|
||||
function getSchemaName() {
|
||||
public function getSchemaName() {
|
||||
return $this->config['schema'];
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class ApcEngineTest extends CakeTestCase {
|
|||
*
|
||||
* @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);
|
||||
|
|
|
@ -169,7 +169,7 @@ class MemcacheEngineTest extends CakeTestCase {
|
|||
*
|
||||
* @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));
|
||||
|
|
|
@ -177,7 +177,7 @@ class FixtureTaskTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testImportRecordsNoEscaping() {
|
||||
public function testImportRecordsNoEscaping() {
|
||||
$db = ConnectionManager::getDataSource('test');
|
||||
if ($db instanceof Sqlserver) {
|
||||
$this->markTestSkipped('This test does not run on SQLServer');
|
||||
|
|
|
@ -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 = '/';
|
||||
|
|
|
@ -539,7 +539,7 @@ class CookieComponentTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testDeleteChildrenNotExist() {
|
||||
public function testDeleteChildrenNotExist() {
|
||||
$this->assertNull($this->Cookie->delete('NotFound'));
|
||||
$this->assertNull($this->Cookie->delete('Not.Found'));
|
||||
}
|
||||
|
@ -573,7 +573,7 @@ class CookieComponentTest extends CakeTestCase {
|
|||
* @param mixed $value
|
||||
* @return string
|
||||
*/
|
||||
function __encrypt($value) {
|
||||
protected function __encrypt($value) {
|
||||
if (is_array($value)) {
|
||||
$value = $this->_implode($value);
|
||||
}
|
||||
|
|
|
@ -157,7 +157,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();
|
||||
|
@ -482,7 +482,7 @@ class DbAclTest extends CakeTestCase {
|
|||
* @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'));
|
||||
|
@ -529,7 +529,7 @@ class DbAclTest extends CakeTestCase {
|
|||
* @param int $len
|
||||
* @return void
|
||||
*/
|
||||
function __pad($string = '', $len = 14) {
|
||||
protected function __pad($string = '', $len = 14) {
|
||||
return str_pad($string, $len);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -861,7 +861,7 @@ class PaginatorComponentTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testPaginateOrderVirtualFieldSharedWithRealField() {
|
||||
public function testPaginateOrderVirtualFieldSharedWithRealField() {
|
||||
$Controller =& new Controller($this->request);
|
||||
$Controller->uses = array('PaginatorControllerPost', 'PaginatorControllerComment');
|
||||
$Controller->constructClasses();
|
||||
|
|
|
@ -107,7 +107,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function _init() {
|
||||
protected function _init() {
|
||||
$request = new CakeRequest('controller_posts/index');
|
||||
$response = new CakeResponse();
|
||||
$this->Controller = new RequestHandlerTestController($request, $response);
|
||||
|
|
|
@ -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 @@ class TestScaffoldMock extends Scaffold {
|
|||
*
|
||||
* @return unknown
|
||||
*/
|
||||
function getParams() {
|
||||
public function getParams() {
|
||||
return $this->_params;
|
||||
}
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ class ScaffoldTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testHabtmFieldAdditionWithScaffoldForm() {
|
||||
public function testHabtmFieldAdditionWithScaffoldForm() {
|
||||
CakePlugin::unload();
|
||||
$params = array(
|
||||
'plugin' => null,
|
||||
|
|
|
@ -3511,7 +3511,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
|||
/**
|
||||
* 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 @@ class ContainableBehaviorTest extends CakeTestCase {
|
|||
* @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 @@ class ContainableBehaviorTest extends CakeTestCase {
|
|||
* @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 @@ class ContainableBehaviorTest extends CakeTestCase {
|
|||
* @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 = '[';
|
||||
|
|
|
@ -63,7 +63,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testCountWithConditions() {
|
||||
public function testCountWithConditions() {
|
||||
$this->loadFixtures('Translate', 'TranslatedItem');
|
||||
|
||||
$Model =& new TranslatedItem();
|
||||
|
|
|
@ -178,7 +178,7 @@ class MysqlTest extends CakeTestCase {
|
|||
*
|
||||
* @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 @@ class MysqlTest extends CakeTestCase {
|
|||
* @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 @@ class MysqlTest extends CakeTestCase {
|
|||
* @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];
|
||||
|
|
|
@ -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 @@ class PostgresTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testVirtualFieldAsAConstant() {
|
||||
public function testVirtualFieldAsAConstant() {
|
||||
$this->loadFixtures('Article', 'Comment');
|
||||
$Article = ClassRegistry::init('Article');
|
||||
$Article->virtualFields = array(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -790,7 +790,7 @@ class DboSourceTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testGroupNoModel() {
|
||||
public function testGroupNoModel() {
|
||||
$result = $this->db->group('created');
|
||||
$this->assertEquals(' GROUP BY created', $result);
|
||||
}
|
||||
|
@ -798,7 +798,7 @@ class DboSourceTest extends CakeTestCase {
|
|||
/**
|
||||
* Test getting the last error.
|
||||
*/
|
||||
function testLastError() {
|
||||
public function testLastError() {
|
||||
$stmt = $this->getMock('PDOStatement');
|
||||
$stmt->expects($this->any())
|
||||
->method('errorInfo')
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -240,7 +240,7 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function testFindWithJoinsOption() {
|
||||
public function testFindWithJoinsOption() {
|
||||
$this->loadFixtures('Article', 'User');
|
||||
$TestUser =& new User();
|
||||
|
||||
|
@ -626,7 +626,7 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testHABTMKeepExisting() {
|
||||
public function testHABTMKeepExisting() {
|
||||
$this->loadFixtures('Site', 'Domain', 'DomainsSite');
|
||||
|
||||
$Site = new Site();
|
||||
|
@ -674,8 +674,8 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
$results = $Site->Domain->DomainsSite->find('count', array(
|
||||
'conditions' => array(
|
||||
'DomainsSite.active' => true,
|
||||
),
|
||||
));
|
||||
),
|
||||
));
|
||||
$expected = 5;
|
||||
$this->assertEquals($expected, $results);
|
||||
|
||||
|
@ -687,8 +687,8 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
$results = $Site->DomainsSite->find('count', array(
|
||||
'conditions' => array(
|
||||
'DomainsSite.active' => true,
|
||||
),
|
||||
));
|
||||
),
|
||||
));
|
||||
$expected = 6;
|
||||
$this->assertEquals($expected, $results);
|
||||
|
||||
|
@ -697,8 +697,8 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
'Site' => array('id' => 1, 'name' => 'cakephp (modified)'),
|
||||
'Domain' => array(
|
||||
'Domain' => array(3),
|
||||
)
|
||||
);
|
||||
)
|
||||
);
|
||||
$Site->create($data);
|
||||
$Site->save($data);
|
||||
|
||||
|
@ -715,12 +715,12 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
*
|
||||
* @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 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
'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);
|
||||
|
|
|
@ -766,7 +766,7 @@ class ModelValidationTest extends BaseModelTest {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testStateValidation() {
|
||||
public function testStateValidation() {
|
||||
$this->loadFixtures('Article');
|
||||
$Article = new Article();
|
||||
|
||||
|
|
|
@ -815,7 +815,7 @@ class CakeRequestTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function _detectCallback($request) {
|
||||
protected function _detectCallback($request) {
|
||||
return $request->return == true;
|
||||
}
|
||||
|
||||
|
@ -1709,7 +1709,7 @@ XML;
|
|||
* @param mixed $env
|
||||
* @return void
|
||||
*/
|
||||
function __loadEnvironment($env) {
|
||||
protected function __loadEnvironment($env) {
|
||||
if (isset($env['App'])) {
|
||||
Configure::write('App', $env['App']);
|
||||
}
|
||||
|
|
|
@ -1492,7 +1492,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function __backupEnvironment() {
|
||||
protected function __backupEnvironment() {
|
||||
return array(
|
||||
'App' => Configure::read('App'),
|
||||
'GET' => $_GET,
|
||||
|
@ -1506,7 +1506,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function __reloadEnvironment() {
|
||||
protected function __reloadEnvironment() {
|
||||
foreach ($_GET as $key => $val) {
|
||||
unset($_GET[$key]);
|
||||
}
|
||||
|
@ -1525,7 +1525,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
* @param mixed $env
|
||||
* @return void
|
||||
*/
|
||||
function __loadEnvironment($env) {
|
||||
protected function __loadEnvironment($env) {
|
||||
if ($env['reload']) {
|
||||
$this->__reloadEnvironment();
|
||||
}
|
||||
|
@ -1559,7 +1559,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
* @param mixed $her
|
||||
* @return string
|
||||
*/
|
||||
function __cachePath($here) {
|
||||
protected function __cachePath($here) {
|
||||
$path = $here;
|
||||
if ($here == '/') {
|
||||
$path = 'home';
|
||||
|
|
|
@ -424,7 +424,7 @@ class CakeTestFixtureTest extends CakeTestCase {
|
|||
* @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;
|
||||
|
|
|
@ -150,7 +150,7 @@ abstract class ClassRegistryAbstractModel extends ClassRegisterModel {
|
|||
*/
|
||||
interface ClassRegistryInterfaceTest {
|
||||
|
||||
function doSomething();
|
||||
public function doSomething();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -427,7 +427,7 @@ class FileTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testDeleteAfterRead() {
|
||||
public function testDeleteAfterRead() {
|
||||
if (!$tmpFile = $this->_getTmpFile()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ class FileTest extends CakeTestCase {
|
|||
* @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;
|
||||
|
|
|
@ -2100,7 +2100,7 @@ class ValidationTest extends CakeTestCase {
|
|||
*
|
||||
* @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'));
|
||||
|
|
|
@ -1086,7 +1086,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testFormSecurityArrayFields() {
|
||||
public function testFormSecurityArrayFields() {
|
||||
$key = 'testKey';
|
||||
|
||||
$this->Form->request->params['_Token']['key'] = $key;
|
||||
|
@ -1524,7 +1524,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
* @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 @@ class FormHelperTest extends CakeTestCase {
|
|||
* @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 @@ class FormHelperTest extends CakeTestCase {
|
|||
*
|
||||
* @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 @@ class FormHelperTest extends CakeTestCase {
|
|||
*
|
||||
* @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 @@ class FormHelperTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testSubmitImageTimestamp() {
|
||||
public function testSubmitImageTimestamp() {
|
||||
Configure::write('Asset.timestamp', 'force');
|
||||
|
||||
$result = $this->Form->submit('cake.power.gif');
|
||||
|
@ -6785,7 +6785,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testFormInputRequiredDetection() {
|
||||
public function testFormInputRequiredDetection() {
|
||||
$this->Form->create('Contact');
|
||||
|
||||
$result = $this->Form->input('Contact.non_existing');
|
||||
|
|
|
@ -902,7 +902,7 @@ class HtmlHelperTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testScriptAssetFilter() {
|
||||
public function testScriptAssetFilter() {
|
||||
Configure::write('Asset.filter.js', 'js.php');
|
||||
|
||||
$result = $this->Html->script('jquery-1.3');
|
||||
|
|
|
@ -130,7 +130,7 @@ class JsHelperTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function _useMock() {
|
||||
protected function _useMock() {
|
||||
$request = new CakeRequest(null, false);
|
||||
|
||||
if (!class_exists('TestJsEngineHelper', false)) {
|
||||
|
|
|
@ -460,7 +460,7 @@ class HelperTest extends CakeTestCase {
|
|||
*
|
||||
* @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 @@ class HelperTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function testValueHabtmKeys() {
|
||||
public function testValueHabtmKeys() {
|
||||
$this->Helper->request->data = array(
|
||||
'HelperTestTag' => array('HelperTestTag' => '')
|
||||
);
|
||||
|
|
|
@ -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 @@ class CakeTestSuiteDispatcher {
|
|||
*
|
||||
* @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 @@ class CakeTestSuiteDispatcher {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function _testCaseList() {
|
||||
protected function _testCaseList() {
|
||||
$command = new CakeTestSuiteCommand('', $this->params);
|
||||
$Reporter = $command->handleReporter($this->params['output']);
|
||||
$Reporter->paintDocumentStart();
|
||||
|
@ -199,7 +199,7 @@ class CakeTestSuiteDispatcher {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function _parseParams() {
|
||||
protected function _parseParams() {
|
||||
if (!$this->_paramsParsed) {
|
||||
if (!isset($_SERVER['SERVER_NAME'])) {
|
||||
$_SERVER['SERVER_NAME'] = '';
|
||||
|
@ -226,7 +226,7 @@ class CakeTestSuiteDispatcher {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
function _runTestCase() {
|
||||
protected function _runTestCase() {
|
||||
$commandArgs = array(
|
||||
'case' => $this->params['case'],
|
||||
'core' => $this->params['core'],
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue