From 70c7ee6fc7e45f6f70ea0dddee2ad44cceed5c7b Mon Sep 17 00:00:00 2001
From: Bart Visscher <bartv@thisnet.nl>
Date: Fri, 12 Oct 2012 19:08:47 +0200
Subject: [PATCH] Skip apc test when apc is not enabled for CLI

---
 tests/lib/cache/apc.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/lib/cache/apc.php b/tests/lib/cache/apc.php
index 0e0edcf58f..f68b97bcbd 100644
--- a/tests/lib/cache/apc.php
+++ b/tests/lib/cache/apc.php
@@ -22,10 +22,14 @@
 
 class Test_Cache_APC extends Test_Cache {
 	public function setUp() {
-		if(!function_exists('apc_store')){
+		if(!extension_loaded('apc')){
 			$this->markTestSkipped('The apc extension is not available.');
 			return;
 		}
+		if(!ini_get('apc.enable_cli') && OC::$CLI){
+			$this->markTestSkipped('apc not available in CLI.');
+			return;
+		}
 		$this->instance=new OC_Cache_APC();
 	}
 }
-- 
GitLab