Merge pull request #1437 from Phally/master-apc-errors

Fixes errors in tests with APC installed but not enabled in CLI.
This commit is contained in:
Mark Story 2013-07-19 09:26:22 -07:00
commit 2f2fba3b39

View file

@ -36,6 +36,10 @@ class ApcEngineTest extends CakeTestCase {
parent::setUp(); parent::setUp();
$this->skipIf(!function_exists('apc_store'), 'Apc is not installed or configured properly.'); $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'); $this->_cacheDisable = Configure::read('Cache.disable');
Configure::write('Cache.disable', false); Configure::write('Cache.disable', false);
Cache::config('apc', array('engine' => 'Apc', 'prefix' => 'cake_')); Cache::config('apc', array('engine' => 'Apc', 'prefix' => 'cake_'));