Browse Source

Skip wincache tests if wincache.enablecli is off.

If wincache is disabled, skip the tests.
mark_story 12 years ago
parent
commit
02cb70eabd

+ 0 - 5
src/Cache/Engine/WincacheEngine.php

@@ -1,9 +1,5 @@
 <?php
 /**
- * Wincache storage engine for cache.
- *
- * Supports wincache 1.1.0 and higher.
- *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *
@@ -24,7 +20,6 @@ use Cake\Cache\CacheEngine;
  * Wincache storage engine for cache
  *
  * Supports wincache 1.1.0 and higher.
- *
  */
 class WincacheEngine extends CacheEngine {
 

+ 1 - 2
tests/TestCase/Cache/Engine/WincacheEngineTest.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * WincacheEngineTest file
- *
  * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *
@@ -34,6 +32,7 @@ class WincacheEngineTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 		$this->skipIf(!function_exists('wincache_ucache_set'), 'Wincache is not installed or configured properly.');
+		$this->skipIf(!ini_get('wincache.enablecli'), 'Wincache is not enabled on the CLI.');
 		Cache::enable();
 		$this->_configCache();
 	}