mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
update configuration of disabled resource tests
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
/*
|
/*
|
||||||
* Smarty PHPUnit Bootstrap
|
* Smarty PHPUnit Bootstrap
|
||||||
*/
|
*/
|
||||||
|
include_once __DIR__ . '/Config.php';
|
||||||
// Locate Autoloader or SmartyBC class and load it
|
// Locate Autoloader or SmartyBC class and load it
|
||||||
if (is_file(__DIR__ . '/../smarty/libs/Autoloader.php')) {
|
if (is_file(__DIR__ . '/../smarty/libs/Autoloader.php')) {
|
||||||
require_once __DIR__ . '/../smarty/libs/Autoloader.php';
|
require_once __DIR__ . '/../smarty/libs/Autoloader.php';
|
||||||
|
@@ -4,8 +4,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once __DIR__ . '/Config.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smarty Test Case Fixture
|
* Smarty Test Case Fixture
|
||||||
*/
|
*/
|
||||||
@@ -351,7 +349,8 @@ KEY `expire` (`expire`)
|
|||||||
case 'file':
|
case 'file':
|
||||||
case 'filetest':
|
case 'filetest':
|
||||||
if ($tpl instanceof Smarty) {
|
if ($tpl instanceof Smarty) {
|
||||||
return sha1($this->normalizePath($this->smarty->getTemplateDir(0) . $name) . $this->smarty->_joined_template_dir);
|
return sha1($this->normalizePath($this->smarty->getTemplateDir(0) . $name) .
|
||||||
|
$this->smarty->_joined_template_dir);
|
||||||
}
|
}
|
||||||
return sha1($tpl->source->filepath . $this->smarty->_joined_template_dir);
|
return sha1($tpl->source->filepath . $this->smarty->_joined_template_dir);
|
||||||
case 'mysqltest':
|
case 'mysqltest':
|
||||||
@@ -539,8 +538,8 @@ KEY `expire` (`expire`)
|
|||||||
$uid = $this->buildUid($tpl, $sp, $name, $type);
|
$uid = $this->buildUid($tpl, $sp, $name, $type);
|
||||||
$_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
|
$_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
|
||||||
$_cache_id = isset($cache_id) ? preg_replace('![^\w\|]+!', '_', $cache_id) : null;
|
$_cache_id = isset($cache_id) ? preg_replace('![^\w\|]+!', '_', $cache_id) : null;
|
||||||
return sha1($uid) . '#' . preg_replace('#[^\w\|]+#S', '_', $tpl->template_resource) . '#' .
|
return sha1($uid) . '#' . preg_replace('#[^\w\|]+#S', '_', $tpl->template_resource) . '#' . $_cache_id .
|
||||||
$_cache_id . '#' . $_compile_id;
|
'#' . $_compile_id;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Exception("Unhandled cache resource type '{$cacheType}'");
|
throw new Exception("Unhandled cache resource type '{$cacheType}'");
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package PHPunit
|
* @package PHPunit
|
||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
*/
|
*/
|
||||||
|
if (ApcCacheEnable == true) {
|
||||||
include_once __DIR__ . '/../Memcache/CacheResourceCustomMemcacheTest.php';
|
include_once __DIR__ . '/../Memcache/CacheResourceCustomMemcacheTest.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,4 +32,5 @@ class CacheResourceCustomApcTest extends CacheResourceCustomMemcacheTest
|
|||||||
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
* @package PHPunit
|
* @package PHPunit
|
||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
*/
|
*/
|
||||||
|
if (MemCacheEnable == true) {
|
||||||
|
|
||||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||||
|
|
||||||
@@ -46,3 +47,4 @@ class CacheResourceCustomMemcacheTest extends CacheResourceTestCommon
|
|||||||
$this->assertEquals(- 1, $b);
|
$this->assertEquals(- 1, $b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
* @package PHPunit
|
* @package PHPunit
|
||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
*/
|
*/
|
||||||
|
if (MysqlCacheEnable == true) {
|
||||||
|
|
||||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||||
|
|
||||||
@@ -37,4 +38,5 @@ class CacheResourceCustomMysqlTest extends CacheResourceTestCommon
|
|||||||
$this->initMysqlCache();
|
$this->initMysqlCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
* @package PHPunit
|
* @package PHPunit
|
||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
*/
|
*/
|
||||||
|
if (PdoCacheEnable == true) {
|
||||||
|
|
||||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||||
|
|
||||||
@@ -30,8 +31,10 @@ class CacheResourceCustomPDOTest extends CacheResourceTestCommon
|
|||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->smarty->setCachingType('pdo');
|
$this->smarty->setCachingType('pdo');
|
||||||
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
||||||
$this->assertTrue(false !== $this->smarty->loadPlugin('Smarty_CacheResource_Pdotest'), 'loadPlugin() could not load PDO cache resource');
|
$this->assertTrue(false !== $this->smarty->loadPlugin('Smarty_CacheResource_Pdotest'),
|
||||||
$this->smarty->registerCacheResource('pdo', new Smarty_CacheResource_Pdotest($this->getPDO(), 'output_cache'));
|
'loadPlugin() could not load PDO cache resource');
|
||||||
|
$this->smarty->registerCacheResource('pdo',
|
||||||
|
new Smarty_CacheResource_Pdotest($this->getPDO(), 'output_cache'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInit()
|
public function testInit()
|
||||||
@@ -40,4 +43,5 @@ class CacheResourceCustomPDOTest extends CacheResourceTestCommon
|
|||||||
$this->initMysqlCache();
|
$this->initMysqlCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
* @package PHPunit
|
* @package PHPunit
|
||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
*/
|
*/
|
||||||
|
if (PdoGzipCacheEnable == true) {
|
||||||
|
|
||||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||||
|
|
||||||
@@ -28,8 +29,10 @@ class CacheResourceCustomPDOGzipTest extends CacheResourceTestCommon
|
|||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->smarty->setCachingType('pdo');
|
$this->smarty->setCachingType('pdo');
|
||||||
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
$this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/');
|
||||||
$this->assertTrue(false !== $this->smarty->loadPlugin('Smarty_CacheResource_Pdo_Gziptest'), 'loadPlugin() could not load PDOGzip cache resource');
|
$this->assertTrue(false !== $this->smarty->loadPlugin('Smarty_CacheResource_Pdo_Gziptest'),
|
||||||
$this->smarty->registerCacheResource('pdo', new Smarty_CacheResource_Pdo_Gziptest($this->getPDO(), 'output_cache'));
|
'loadPlugin() could not load PDOGzip cache resource');
|
||||||
|
$this->smarty->registerCacheResource('pdo', new Smarty_CacheResource_Pdo_Gziptest($this->getPDO(),
|
||||||
|
'output_cache'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInit()
|
public function testInit()
|
||||||
@@ -38,4 +41,5 @@ class CacheResourceCustomPDOGzipTest extends CacheResourceTestCommon
|
|||||||
$this->initMysqlCache();
|
$this->initMysqlCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
* @package PHPunit
|
* @package PHPunit
|
||||||
* @author Uwe Tews
|
* @author Uwe Tews
|
||||||
*/
|
*/
|
||||||
|
if (MysqlCacheEnable == true) {
|
||||||
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,4 +40,5 @@ class CacheResourceCustomRegisteredTest extends CacheResourceTestCommon
|
|||||||
$this->initMysqlCache();
|
$this->initMysqlCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user