2015-05-04 03:00:52 +02:00
|
|
|
<?php
|
|
|
|
|
/**
|
2015-05-18 05:36:37 +02:00
|
|
|
* Smarty PHPunit tests for cache resource Apc
|
2015-05-04 03:00:52 +02:00
|
|
|
*
|
|
|
|
|
* @package PHPunit
|
|
|
|
|
* @author Uwe Tews
|
|
|
|
|
*/
|
2015-12-30 21:14:22 +01:00
|
|
|
if (ApcCacheEnable == true) {
|
2015-12-31 05:36:00 +01:00
|
|
|
include_once dirname(__FILE__) . '/../Memcache/CacheResourceCustomMemcacheTest.php';
|
2015-05-04 03:00:52 +02:00
|
|
|
|
2015-12-30 21:14:22 +01:00
|
|
|
/**
|
|
|
|
|
* class for cache resource file tests
|
|
|
|
|
*
|
|
|
|
|
* @runTestsInSeparateProcess
|
|
|
|
|
* @preserveGlobalState disabled
|
|
|
|
|
* @backupStaticAttributes enabled
|
|
|
|
|
*/
|
|
|
|
|
class CacheResourceCustomApcTest extends CacheResourceCustomMemcacheTest
|
2015-05-04 03:00:52 +02:00
|
|
|
{
|
2015-12-30 21:14:22 +01:00
|
|
|
public function setUp()
|
|
|
|
|
{
|
|
|
|
|
if (ApcCacheEnable != true) {
|
|
|
|
|
$this->markTestSkipped('Apc tests are disabled');
|
|
|
|
|
} else {
|
|
|
|
|
if (!function_exists('apc_cache_info') || ini_get('apc.enable_cli')) {
|
|
|
|
|
$this->markTestSkipped('APC cache not available');
|
|
|
|
|
}
|
2015-05-04 03:00:52 +02:00
|
|
|
}
|
2015-12-31 05:36:00 +01:00
|
|
|
$this->setUpSmarty(dirname(__FILE__));
|
2015-12-30 21:14:22 +01:00
|
|
|
parent::setUp();
|
|
|
|
|
$this->smarty->setCachingType('apc');
|
|
|
|
|
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
2015-05-04 03:00:52 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-05-18 05:36:37 +02:00
|
|
|
|