Files
smarty/tests/UnitTests/CacheResourceTests/PDO/CacheResourceCustomPDOTest.php

43 lines
965 B
PHP
Raw Normal View History

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