Fixes errors in tests with APC installed but not enabled in CLI.

This commit is contained in:
Phally 2013-07-19 16:50:46 +02:00
parent f725779a17
commit 36cac116d0

View file

@ -36,6 +36,10 @@ class ApcEngineTest extends CakeTestCase {
parent::setUp();
$this->skipIf(!function_exists('apc_store'), 'Apc is not installed or configured properly.');
if (php_sapi_name() === 'cli') {
$this->skipIf(!ini_get('apc.enable_cli'), 'APC is not enabled for the CLI.');
}
$this->_cacheDisable = Configure::read('Cache.disable');
Configure::write('Cache.disable', false);
Cache::config('apc', array('engine' => 'Apc', 'prefix' => 'cake_'));