mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
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.
This commit is contained in:
parent
a33bd1d144
commit
b1c89496c5
3 changed files with 15 additions and 11 deletions
|
@ -468,7 +468,7 @@ class CacheEngine {
|
||||||
var $settings = array();
|
var $settings = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iitialize the cache engine
|
* Initialize the cache engine
|
||||||
*
|
*
|
||||||
* Called automatically by the cache frontend
|
* Called automatically by the cache frontend
|
||||||
*
|
*
|
||||||
|
|
7
cake/libs/cache/xcache.php
vendored
7
cake/libs/cache/xcache.php
vendored
|
@ -29,9 +29,10 @@
|
||||||
class XcacheEngine extends CacheEngine {
|
class XcacheEngine extends CacheEngine {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* settings
|
* Settings
|
||||||
* PHP_AUTH_USER = xcache.admin.user, default cake
|
*
|
||||||
* PHP_AUTH_PW = xcache.admin.password, default cake
|
* - PHP_AUTH_USER = xcache.admin.user, default cake
|
||||||
|
* - PHP_AUTH_PW = xcache.admin.password, default cake
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
* @access public
|
* @access public
|
||||||
|
|
17
cake/tests/cases/libs/cache/xcache.test.php
vendored
17
cake/tests/cases/libs/cache/xcache.test.php
vendored
|
@ -76,13 +76,16 @@ class XcacheEngineTest extends UnitTestCase {
|
||||||
*/
|
*/
|
||||||
function testSettings() {
|
function testSettings() {
|
||||||
$settings = Cache::settings();
|
$settings = Cache::settings();
|
||||||
$expecting = array('prefix' => 'cake_',
|
$expecting = array(
|
||||||
'duration'=> 3600,
|
'prefix' => 'cake_',
|
||||||
'probability' => 100,
|
'duration'=> 3600,
|
||||||
'engine' => 'Xcache',
|
'probability' => 100,
|
||||||
'PHP_AUTH_USER' => 'user',
|
'engine' => 'Xcache',
|
||||||
'PHP_AUTH_PW' => 'password',
|
);
|
||||||
);
|
$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);
|
$this->assertEqual($settings, $expecting);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue