Files
smarty/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php

43 lines
1.1 KiB
PHP
Raw Normal View History

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