Permalink
Browse files

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

  • Loading branch information...
1 parent f725779 commit 36cac116d081e380368e068d40a7e6da339d867e @Phally Phally committed Jul 19, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php
@@ -36,6 +36,10 @@ public function setUp() {
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_'));

0 comments on commit 36cac11

Please sign in to comment.