Files
smarty/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php
T

45 lines
1.3 KiB
PHP
Raw Normal View History

2015-05-04 03:00:52 +02:00
<?php
/**
2015-05-18 05:36:37 +02:00
* Smarty PHPunit tests for cache resource registered
2015-05-04 03:00:52 +02:00
*
* @package PHPunit
* @author Uwe Tews
*/
if (MysqlCacheEnable == true) {
2015-12-31 05:36:00 +01:00
include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php';
2015-05-04 03:00:52 +02:00
/**
* class for cache resource file tests
*
* @runTestsInSeparateProcess
* @preserveGlobalState disabled
* @backupStaticAttributes enabled
*/
class CacheResourceCustomRegisteredTest extends CacheResourceTestCommon
2015-05-04 03:00:52 +02:00
{
public function setUp()
{
if (MysqlCacheEnable != true) {
$this->markTestSkipped('mysql tests are disabled');
}
if (self::$init) {
$this->getConnection();
}
2015-12-31 05:36:00 +01:00
$this->setUpSmarty(dirname(__FILE__));
parent::setUp();
if (!class_exists('Smarty_CacheResource_Mysqltest', false)) {
2015-12-31 05:36:00 +01:00
require_once(dirname(__FILE__) . "/../_shared/PHPunitplugins/cacheresource.mysqltest.php");
}
$this->smarty->setCachingType('foobar');
$this->smarty->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest());
2015-05-04 03:00:52 +02:00
}
public function testInit()
{
$this->cleanDirs();
$this->initMysqlCache();
}
2015-05-04 03:00:52 +02:00
}
}
2015-05-18 05:36:37 +02:00