From cc425a5e0a4ad1ddfbadc944eaff0ca7a2378528 Mon Sep 17 00:00:00 2001 From: DarkAngelBGE Date: Wed, 24 Sep 2008 11:52:29 +0000 Subject: [PATCH] adding a couple whitespace corrections (trailing tabs, newlines, ..) git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7654 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/cache.php | 1 + cake/libs/configure.php | 2 +- cake/libs/view/helpers/cache.php | 4 ++-- cake/tests/cases/libs/cache.test.php | 2 -- cake/tests/cases/libs/cache/file.test.php | 3 --- cake/tests/lib/test_manager.php | 1 - .../test_app/controllers/tests_apps_posts_controller.php | 4 ++-- 7 files changed, 6 insertions(+), 11 deletions(-) diff --git a/cake/libs/cache.php b/cake/libs/cache.php index 18f8e4a8c..b4138f734 100644 --- a/cake/libs/cache.php +++ b/cake/libs/cache.php @@ -268,6 +268,7 @@ class Cache extends Object { if ($duration < 1) { return false; } + $success = $_this->_Engine[$engine]->write($settings['prefix'] . $key, $value, $duration); $settings = $_this->set(); return $success; diff --git a/cake/libs/configure.php b/cake/libs/configure.php index 0eeca704a..2b3206753 100644 --- a/cake/libs/configure.php +++ b/cake/libs/configure.php @@ -1135,7 +1135,7 @@ class App extends Object { * @access private */ function __destruct() { - $_this = & App::getInstance(); + $_this =& App::getInstance(); if ($_this->__cache) { $core = Configure::corePaths('cake'); diff --git a/cake/libs/view/helpers/cache.php b/cake/libs/view/helpers/cache.php index 07b96b2f9..23277543c 100644 --- a/cake/libs/view/helpers/cache.php +++ b/cake/libs/view/helpers/cache.php @@ -168,12 +168,12 @@ class CacheHelper extends AppHelper { $index = array_search($element, $this->__match); if ($index !== false) { array_splice($oresult[0], $k, 1); - } + } } } if (!empty($result['0'])) { - $count = 0; + $count = 0; foreach ($result['0'] as $block) { if (isset($oresult['0'][$count])) { $this->__replace[] = $block; diff --git a/cake/tests/cases/libs/cache.test.php b/cake/tests/cases/libs/cache.test.php index 1d17d607e..1ed04ad6f 100644 --- a/cake/tests/cases/libs/cache.test.php +++ b/cake/tests/cases/libs/cache.test.php @@ -86,9 +86,7 @@ class CacheTest extends CakeTestCase { * @return void */ function testWritingWithConfig() { - Cache::config('sessions'); - Cache::write('test_somthing', 'this is the test data', 'tests'); $expected = array( diff --git a/cake/tests/cases/libs/cache/file.test.php b/cake/tests/cases/libs/cache/file.test.php index 5b7aad411..d247eef7e 100644 --- a/cake/tests/cases/libs/cache/file.test.php +++ b/cake/tests/cases/libs/cache/file.test.php @@ -98,11 +98,8 @@ class FileEngineTest extends CakeTestCase { $data = 'this is a test of the emergency broadcasting system'; $result = Cache::write('test', $data, 1); - - $this->assertTrue($result); $this->assertTrue(file_exists(CACHE . 'cake_test')); - $result = Cache::read('test'); $expecting = $data; $this->assertEqual($result, $expecting); diff --git a/cake/tests/lib/test_manager.php b/cake/tests/lib/test_manager.php index 0266c1a4a..99f631789 100644 --- a/cake/tests/lib/test_manager.php +++ b/cake/tests/lib/test_manager.php @@ -78,7 +78,6 @@ class TestManager { $manager =& new TestManager(); $testCases =& $manager->_getTestFileList($manager->_getTestsPath()); - if ($manager->appTest) { $test =& new GroupTest('All App Tests'); } else if ($manager->pluginTest) { diff --git a/cake/tests/test_app/controllers/tests_apps_posts_controller.php b/cake/tests/test_app/controllers/tests_apps_posts_controller.php index cc2d73c80..4ec42b046 100644 --- a/cake/tests/test_app/controllers/tests_apps_posts_controller.php +++ b/cake/tests/test_app/controllers/tests_apps_posts_controller.php @@ -36,10 +36,10 @@ class TestsAppsPostsController extends AppController { 'Post' => array( 'title' => 'Test article', 'body' => 'Body of article.' - ) + ) ); $this->Post->save($data); - + $this->set('posts', $this->Post->find('all')); $this->render('index'); }