Files

39 lines
894 B
PHP
Raw Permalink Normal View History

<?php
/**
* Smarty PHPunit tests for cache resource Pdo
*
2023-08-08 00:04:14 +02:00
* @author Uwe Tews
*/
2023-08-08 00:04:14 +02:00
include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
include_once __DIR__ . '/cacheresource.pdotest.php';
2023-08-08 00:04:14 +02:00
/**
* class for cache resource file tests
*
*
* @preserveGlobalState disabled
*
*/
class CacheResourceCustomPDOTest extends CacheResourceTestCommon
{
public function setUp($dir = null, $clear = true): void
{
2023-08-08 00:04:14 +02:00
if (PdoCacheEnable != true) {
$this->markTestSkipped('mysql Pdo tests are disabled');
}
2023-08-08 00:04:14 +02:00
if (self::$init) {
$this->getConnection();
}
2023-08-08 00:04:14 +02:00
$this->setUpSmarty(__DIR__);
$this->initMysqlCache();
2023-08-08 00:04:14 +02:00
parent::setUp();
$this->smarty->registerCacheResource('pdo',
new Smarty_CacheResource_Pdotest($this->getPDO(), 'output_cache'));
}
}