mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
commit
2f2fba3b39
1 changed files with 4 additions and 0 deletions
|
@ -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_'));
|
||||||
|
|
Loading…
Reference in a new issue