mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix code style errors.
This commit is contained in:
parent
9a66768aa4
commit
57681ff115
12 changed files with 35 additions and 31 deletions
|
@ -490,7 +490,7 @@ class DbAclTest extends CakeTestCase {
|
|||
* @param bool $treesToo
|
||||
* @return void
|
||||
*/
|
||||
protected 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'));
|
||||
|
@ -518,10 +518,10 @@ class DbAclTest extends CakeTestCase {
|
|||
}
|
||||
foreach ($permissions as $key => $values) {
|
||||
array_unshift($values, $key);
|
||||
$values = array_map(array(&$this, '__pad'), $values);
|
||||
$values = array_map(array(&$this, '_pad'), $values);
|
||||
$permissions[$key] = implode (' ', $values);
|
||||
}
|
||||
$permisssions = array_map(array(&$this, '__pad'), $permissions);
|
||||
$permisssions = array_map(array(&$this, '_pad'), $permissions);
|
||||
array_unshift($permissions, 'Current Permissions :');
|
||||
if ($printTreesToo) {
|
||||
debug(array('aros' => $this->Acl->Aro->generateTreeList(), 'acos' => $this->Acl->Aco->generateTreeList()));
|
||||
|
@ -537,7 +537,7 @@ class DbAclTest extends CakeTestCase {
|
|||
* @param integer $len
|
||||
* @return void
|
||||
*/
|
||||
protected function __pad($string = '', $len = 14) {
|
||||
protected function _pad($string = '', $len = 14) {
|
||||
return str_pad($string, $len);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -412,11 +412,11 @@ class CookieComponentTest extends CakeTestCase {
|
|||
$this->assertNull($data);
|
||||
|
||||
$_COOKIE['CakeTestCookie'] = array(
|
||||
'Encrytped_array' => $this->__encrypt(array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' => 'CakePHP Rocks!')),
|
||||
'Encrytped_array' => $this->_encrypt(array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' => 'CakePHP Rocks!')),
|
||||
'Encrytped_multi_cookies' => array(
|
||||
'name' => $this->__encrypt('CakePHP'),
|
||||
'version' => $this->__encrypt('1.2.0.x'),
|
||||
'tag' => $this->__encrypt('CakePHP Rocks!')),
|
||||
'name' => $this->_encrypt('CakePHP'),
|
||||
'version' => $this->_encrypt('1.2.0.x'),
|
||||
'tag' => $this->_encrypt('CakePHP Rocks!')),
|
||||
'Plain_array' => '{"name":"CakePHP","version":"1.2.0.x","tag":"CakePHP Rocks!"}',
|
||||
'Plain_multi_cookies' => array(
|
||||
'name' => 'CakePHP',
|
||||
|
@ -467,11 +467,11 @@ class CookieComponentTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $data);
|
||||
|
||||
$_COOKIE['CakeTestCookie'] = array(
|
||||
'Encrytped_array' => $this->__encrypt(array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' => 'CakePHP Rocks!')),
|
||||
'Encrytped_array' => $this->_encrypt(array('name' => 'CakePHP', 'version' => '1.2.0.x', 'tag' => 'CakePHP Rocks!')),
|
||||
'Encrytped_multi_cookies' => array(
|
||||
'name' => $this->__encrypt('CakePHP'),
|
||||
'version' => $this->__encrypt('1.2.0.x'),
|
||||
'tag' => $this->__encrypt('CakePHP Rocks!')),
|
||||
'name' => $this->_encrypt('CakePHP'),
|
||||
'version' => $this->_encrypt('1.2.0.x'),
|
||||
'tag' => $this->_encrypt('CakePHP Rocks!')),
|
||||
'Plain_array' => '{"name":"CakePHP","version":"1.2.0.x","tag":"CakePHP Rocks!"}',
|
||||
'Plain_multi_cookies' => array(
|
||||
'name' => 'CakePHP',
|
||||
|
@ -648,7 +648,7 @@ class CookieComponentTest extends CakeTestCase {
|
|||
* @param array|string $value
|
||||
* @return string
|
||||
*/
|
||||
protected function __encrypt($value) {
|
||||
protected function _encrypt($value) {
|
||||
if (is_array($value)) {
|
||||
$value = $this->_implode($value);
|
||||
}
|
||||
|
|
|
@ -749,7 +749,7 @@ class AppTest extends CakeTestCase {
|
|||
$result = App::import('Vendor', 'css/TestAsset', array('ext' => 'css'));
|
||||
$text = ob_get_clean();
|
||||
$this->assertTrue($result);
|
||||
$this->assertEquals('this is the test asset css file', $text);
|
||||
$this->assertEquals('/* this is the test asset css file */', trim($text));
|
||||
|
||||
$result = App::import('Vendor', 'TestPlugin.sample/SamplePlugin');
|
||||
$this->assertTrue($result);
|
||||
|
|
|
@ -383,7 +383,11 @@ class CakeLogTest extends CakeTestCase {
|
|||
CakeLog::drop('shops');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test that scopes are exclusive and don't bleed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testScopedLoggingExclusive() {
|
||||
$this->_deleteLogs();
|
||||
|
||||
|
|
|
@ -1667,7 +1667,7 @@ class CakeRequestTest extends CakeTestCase {
|
|||
*/
|
||||
public function testEnvironmentDetection($name, $env, $expected) {
|
||||
$_GET = array();
|
||||
$this->__loadEnvironment($env);
|
||||
$this->_loadEnvironment($env);
|
||||
|
||||
$request = new CakeRequest();
|
||||
$this->assertEquals($expected['url'], $request->url, "url error");
|
||||
|
@ -1965,7 +1965,7 @@ XML;
|
|||
* @param array $env
|
||||
* @return void
|
||||
*/
|
||||
protected function __loadEnvironment($env) {
|
||||
protected function _loadEnvironment($env) {
|
||||
if (isset($env['App'])) {
|
||||
Configure::write('App', $env['App']);
|
||||
}
|
||||
|
|
|
@ -1040,7 +1040,7 @@ class CakeResponseTest extends CakeTestCase {
|
|||
|
||||
$response->expects($this->at(1))
|
||||
->method('header')
|
||||
->with('Content-Length', 31);
|
||||
->with('Content-Length', 38);
|
||||
|
||||
$response->expects($this->once())->method('_clearBuffer');
|
||||
$response->expects($this->once())->method('_flushBuffer');
|
||||
|
@ -1054,7 +1054,7 @@ class CakeResponseTest extends CakeTestCase {
|
|||
ob_start();
|
||||
$result = $response->send();
|
||||
$output = ob_get_clean();
|
||||
$this->assertEquals('this is the test asset css file', $output);
|
||||
$this->assertEquals("/* this is the test asset css file */\n", $output);
|
||||
$this->assertTrue($result !== false);
|
||||
}
|
||||
|
||||
|
|
|
@ -1574,7 +1574,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
|
||||
$this->assertTextEquals($out, $cached);
|
||||
|
||||
$filename = $this->__cachePath($request->here());
|
||||
$filename = $this->_cachePath($request->here());
|
||||
unlink($filename);
|
||||
}
|
||||
|
||||
|
@ -1662,7 +1662,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function __backupEnvironment() {
|
||||
protected function _backupEnvironment() {
|
||||
return array(
|
||||
'App' => Configure::read('App'),
|
||||
'GET' => $_GET,
|
||||
|
@ -1676,7 +1676,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function __reloadEnvironment() {
|
||||
protected function _reloadEnvironment() {
|
||||
foreach ($_GET as $key => $val) {
|
||||
unset($_GET[$key]);
|
||||
}
|
||||
|
@ -1695,9 +1695,9 @@ class DispatcherTest extends CakeTestCase {
|
|||
* @param array $env
|
||||
* @return void
|
||||
*/
|
||||
protected function __loadEnvironment($env) {
|
||||
protected function _loadEnvironment($env) {
|
||||
if ($env['reload']) {
|
||||
$this->__reloadEnvironment();
|
||||
$this->_reloadEnvironment();
|
||||
}
|
||||
|
||||
if (isset($env['App'])) {
|
||||
|
@ -1729,7 +1729,7 @@ class DispatcherTest extends CakeTestCase {
|
|||
* @param string $here
|
||||
* @return string
|
||||
*/
|
||||
protected function __cachePath($here) {
|
||||
protected function _cachePath($here) {
|
||||
$path = $here;
|
||||
if ($here == '/') {
|
||||
$path = 'home';
|
||||
|
|
|
@ -100,7 +100,7 @@ class MediaViewTest extends CakeTestCase {
|
|||
|
||||
$this->MediaView->response->expects($this->at(2))
|
||||
->method('header')
|
||||
->with('Content-Length', 31);
|
||||
->with('Content-Length', 38);
|
||||
|
||||
$this->MediaView->response->expects($this->once())->method('_clearBuffer');
|
||||
$this->MediaView->response->expects($this->exactly(1))
|
||||
|
@ -111,7 +111,7 @@ class MediaViewTest extends CakeTestCase {
|
|||
ob_start();
|
||||
$result = $this->MediaView->render();
|
||||
$output = ob_get_clean();
|
||||
$this->assertEquals('this is the test asset css file', $output);
|
||||
$this->assertEquals("/* this is the test asset css file */\n", $output);
|
||||
$this->assertTrue($result !== false);
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
this is the test asset css file
|
||||
/* this is the test asset css file */
|
||||
|
|
|
@ -1 +1 @@
|
|||
this is the test asset css file
|
||||
/* this is the test asset css file */
|
||||
|
|
|
@ -1 +1 @@
|
|||
override the theme webroot css file
|
||||
/* override the theme webroot css file */
|
||||
|
|
|
@ -1 +1 @@
|
|||
this is the webroot test asset css file
|
||||
/* this is the webroot test asset css file */
|
||||
|
|
Loading…
Reference in a new issue