[BUGFIX] Skip APC tests if on cli and enable_cli is off 04/29904/2
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 6 May 2014 20:13:39 +0000 (22:13 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 6 May 2014 21:14:23 +0000 (23:14 +0200)
Resolves: #58451
Releases: 6.2
Change-Id: I296720fd83343ea0d82b4461aaae46c4c9a14932
Reviewed-on: https://review.typo3.org/29904
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/core/Tests/Unit/Cache/Backend/ApcBackendTest.php

index c3f774e..58fe5a6 100644 (file)
@@ -43,8 +43,8 @@ class ApcBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function setUp() {
                // Currently APCu identifies itself both as "apcu" and "apc" (for compatibility) although it doesn't provide the APC-opcache functionality
-               if (!extension_loaded('apc')) {
-                       $this->markTestSkipped('APC/APCu extension was not available');
+               if (!extension_loaded('apc') || ini_get('apc.enabled') == 0 || ini_get('apc.enable_cli') == 0) {
+                       $this->markTestSkipped('APC/APCu extension was not available, or it was disabled for CLI.');
                }
                if (ini_get('apc.slam_defense') == 1) {
                        $this->markTestSkipped('This testcase can only be executed with apc.slam_defense = Off');