summaryrefslogtreecommitdiff
path: root/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php
blob: d0bd2d660dc8b28e3265a8661455af336027f68a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
 * Smarty PHPunit tests for cache resource file
 *

 * @author  Uwe Tews
 */


include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';
include_once __DIR__ . '/cacheresource.pdo_gziptest.php';

/**
 * class for cache resource file tests
 *
 * 
 */
class CacheResourceCustomPDOGzipTest extends CacheResourceTestCommon
{

    public function setUp($dir = null, $clear = true): void
    {
        if (PdoGzipCacheEnable != true) {
            $this->markTestSkipped('mysql Pdo Gzip tests are disabled');
        }
        if (self::$init) {
            $this->getConnection();
        }
        $this->setUpSmarty(__DIR__);
        $this->initMysqlCache();
        parent::setUp();
        $this->smarty->setCachingType('pdo');
        $this->smarty->registerCacheResource('pdo', new Smarty_CacheResource_Pdo_Gziptest($this->getPDO(),
                                                                                          'output_cache'));
    }

}