From b1c89496c523061fae6685b0d8edb3efc3c90a55 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 21 Nov 2009 15:19:11 -0500 Subject: [PATCH] Fixing typo in Cache doc block. Updating formatting in Xcache doc block. Fixing Xcache test case so it passes when username and password are not user & password. --- cake/libs/cache.php | 2 +- cake/libs/cache/xcache.php | 7 ++++--- cake/tests/cases/libs/cache/xcache.test.php | 17 ++++++++++------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/cake/libs/cache.php b/cake/libs/cache.php index fca1c2607..fb221baab 100644 --- a/cake/libs/cache.php +++ b/cake/libs/cache.php @@ -468,7 +468,7 @@ class CacheEngine { var $settings = array(); /** - * Iitialize the cache engine + * Initialize the cache engine * * Called automatically by the cache frontend * diff --git a/cake/libs/cache/xcache.php b/cake/libs/cache/xcache.php index 42dc477f0..91fd9dad0 100644 --- a/cake/libs/cache/xcache.php +++ b/cake/libs/cache/xcache.php @@ -29,9 +29,10 @@ class XcacheEngine extends CacheEngine { /** - * settings - * PHP_AUTH_USER = xcache.admin.user, default cake - * PHP_AUTH_PW = xcache.admin.password, default cake + * Settings + * + * - PHP_AUTH_USER = xcache.admin.user, default cake + * - PHP_AUTH_PW = xcache.admin.password, default cake * * @var array * @access public diff --git a/cake/tests/cases/libs/cache/xcache.test.php b/cake/tests/cases/libs/cache/xcache.test.php index 5bc291e93..942504192 100644 --- a/cake/tests/cases/libs/cache/xcache.test.php +++ b/cake/tests/cases/libs/cache/xcache.test.php @@ -76,13 +76,16 @@ class XcacheEngineTest extends UnitTestCase { */ function testSettings() { $settings = Cache::settings(); - $expecting = array('prefix' => 'cake_', - 'duration'=> 3600, - 'probability' => 100, - 'engine' => 'Xcache', - 'PHP_AUTH_USER' => 'user', - 'PHP_AUTH_PW' => 'password', - ); + $expecting = array( + 'prefix' => 'cake_', + 'duration'=> 3600, + 'probability' => 100, + 'engine' => 'Xcache', + ); + $this->assertTrue(isset($settings['PHP_AUTH_USER'])); + $this->assertTrue(isset($settings['PHP_AUTH_PW'])); + + unset($settings['PHP_AUTH_USER'], $settings['PHP_AUTH_PW']); $this->assertEqual($settings, $expecting); }