summaryrefslogtreecommitdiff
path: root/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php
blob: a30f51262c9faacf007fb5cb491e179f37b4fd3f (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
39
40
<?php
/**
 * Smarty PHPunit tests for cache resource registered
 *

 * @author  Uwe Tews
 */
if (MysqlCacheEnable == true) {
    include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php';

    /**
     * class for cache resource file tests
     *
     * 
     * @preserveGlobalState    disabled
     * 
     */
    class CacheResourceCustomRegisteredTest extends CacheResourceTestCommon
    {
        public function setUp()
        {
            if (MysqlCacheEnable != true) {
                $this->markTestSkipped('mysql tests are disabled');
            }
            if (self::$init) {
                $this->getConnection();
            }
            $this->setUpSmarty(__DIR__);
            $this->initMysqlCache();
            parent::setUp();
            if (!class_exists('Smarty_CacheResource_Mysqltest', false)) {
                require_once(__DIR__ . "/../_shared/PHPunitplugins/cacheresource.mysqltest.php");
            }
            $this->smarty->setCachingType('foobar');
            $this->smarty->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest());
        }

    }
}