Browse Source

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

Fixes errors in tests with APC installed but not enabled in CLI.
Mark Story 12 years ago
parent
commit
2f2fba3b39
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php

+ 4 - 0
lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php

@@ -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_'));