소스 검색

[Classloader] Fixed tests teardown when apc is not available

Dustin Whittle 14 년 전
부모
커밋
f86bab78ff
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      tests/Symfony/Tests/Component/ClassLoader/ApcUniversalClassLoaderTest.php

+ 7 - 3
tests/Symfony/Tests/Component/ClassLoader/ApcUniversalClassLoaderTest.php

@@ -25,13 +25,17 @@ class ApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase
         if (!(ini_get('apc.enabled') && ini_get('apc.enable_cli'))) {
             $this->markTestSkipped('The apc extension is available, but not enabled.');
         }
-
-        apc_clear_cache('user');
+        else
+        {
+            apc_clear_cache('user');
+        }
     }
 
 	protected function tearDown()
 	{
-        apc_clear_cache('user');
+        if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) {
+            apc_clear_cache('user');
+        }
 	}
 
     public function testConstructor()