Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix code style errors.

  • Loading branch information...
commit 57681ff11567043b1871e0df63c1727fee0d7569 1 parent 9a66768
Mark Story markstory authored
8 lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php
View
@@ -490,7 +490,7 @@ public function testRevoke() {
* @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 @@ protected function __debug($printTreesToo = false) {
}
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 @@ protected function __debug($printTreesToo = false) {
* @param integer $len
* @return void
*/
- protected function __pad($string = '', $len = 14) {
+ protected function _pad($string = '', $len = 14) {
return str_pad($string, $len);
}
}
18 lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php
View
@@ -412,11 +412,11 @@ public function testReadingCookieDataOnStartup() {
$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 @@ public function testReadingCookieDataWithoutStartup() {
$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 @@ protected function _implode(array $array) {
* @param array|string $value
* @return string
*/
- protected function __encrypt($value) {
+ protected function _encrypt($value) {
if (is_array($value)) {
$value = $this->_implode($value);
}
2  lib/Cake/Test/Case/Core/AppTest.php
View
@@ -749,7 +749,7 @@ public function testLoadingVendor() {
$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);
6 lib/Cake/Test/Case/Log/CakeLogTest.php
View
@@ -383,7 +383,11 @@ public function testScopedLoggingBC() {
CakeLog::drop('shops');
}
-
+/**
+ * Test that scopes are exclusive and don't bleed.
+ *
+ * @return void
+ */
public function testScopedLoggingExclusive() {
$this->_deleteLogs();
4 lib/Cake/Test/Case/Network/CakeRequestTest.php
View
@@ -1667,7 +1667,7 @@ public static function environmentGenerator() {
*/
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 @@ public function testOnlyAllowException() {
* @param array $env
* @return void
*/
- protected function __loadEnvironment($env) {
+ protected function _loadEnvironment($env) {
if (isset($env['App'])) {
Configure::write('App', $env['App']);
}
4 lib/Cake/Test/Case/Network/CakeResponseTest.php
View
@@ -1040,7 +1040,7 @@ public function testFile() {
$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 @@ public function testFile() {
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);
}
12 lib/Cake/Test/Case/Routing/DispatcherTest.php
View
@@ -1574,7 +1574,7 @@ public function testFullPageCachingDispatch($url) {
$this->assertTextEquals($out, $cached);
- $filename = $this->__cachePath($request->here());
+ $filename = $this->_cachePath($request->here());
unlink($filename);
}
@@ -1662,7 +1662,7 @@ public function testHttpMethodOverrides() {
*
* @return void
*/
- protected function __backupEnvironment() {
+ protected function _backupEnvironment() {
return array(
'App' => Configure::read('App'),
'GET' => $_GET,
@@ -1676,7 +1676,7 @@ protected function __backupEnvironment() {
*
* @return void
*/
- protected function __reloadEnvironment() {
+ protected function _reloadEnvironment() {
foreach ($_GET as $key => $val) {
unset($_GET[$key]);
}
@@ -1695,9 +1695,9 @@ protected function __reloadEnvironment() {
* @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 @@ protected function __loadEnvironment($env) {
* @param string $here
* @return string
*/
- protected function __cachePath($here) {
+ protected function _cachePath($here) {
$path = $here;
if ($here == '/') {
$path = 'home';
4 lib/Cake/Test/Case/View/MediaViewTest.php
View
@@ -100,7 +100,7 @@ public function testRender() {
$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 @@ public function testRender() {
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);
}
2  lib/Cake/Test/test_app/Vendor/css/test_asset.css
View
@@ -1 +1 @@
-this is the test asset css file
+/* this is the test asset css file */
2  lib/Cake/Test/test_app/View/Themed/TestTheme/webroot/css/test_asset.css
View
@@ -1 +1 @@
-this is the test asset css file
+/* this is the test asset css file */
2  lib/Cake/Test/test_app/webroot/theme/test_theme/css/theme_webroot.css
View
@@ -1 +1 @@
-override the theme webroot css file
+/* override the theme webroot css file */
2  lib/Cake/Test/test_app/webroot/theme/test_theme/css/webroot_test.css
View
@@ -1 +1 @@
-this is the webroot test asset css file
+/* this is the webroot test asset css file */
Please sign in to comment.
Something went wrong with that request. Please try again.