mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Skiping memcache test if Memcache is not installed
This commit is contained in:
parent
53086635b3
commit
e89860e079
1 changed files with 1 additions and 14 deletions
15
cake/tests/cases/libs/cache/memcache.test.php
vendored
15
cake/tests/cases/libs/cache/memcache.test.php
vendored
|
@ -29,20 +29,6 @@ if (!class_exists('Cache')) {
|
||||||
*/
|
*/
|
||||||
class MemcacheEngineTest extends CakeTestCase {
|
class MemcacheEngineTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
|
||||||
* skip method
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function skip() {
|
|
||||||
$skip = true;
|
|
||||||
if (class_exists('Memcache')) {
|
|
||||||
$skip = false;
|
|
||||||
}
|
|
||||||
$this->skipIf($skip, '%s Memcache is not installed or configured properly.');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setUp method
|
* setUp method
|
||||||
*
|
*
|
||||||
|
@ -50,6 +36,7 @@ class MemcacheEngineTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function setUp() {
|
function setUp() {
|
||||||
|
$this->skipIf(!class_exists('Memcache'), '%s Apc is not installed or configured properly');
|
||||||
$this->_cacheDisable = Configure::read('Cache.disable');
|
$this->_cacheDisable = Configure::read('Cache.disable');
|
||||||
Configure::write('Cache.disable', false);
|
Configure::write('Cache.disable', false);
|
||||||
Cache::config('memcache', array(
|
Cache::config('memcache', array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue