diff options
| author | Simon Wisselink <wisskid@users.noreply.github.com> | 2020-04-13 15:30:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-13 15:30:52 +0200 |
| commit | 17d4d43624f9cd183ae0395854f4409c410e3ce9 (patch) | |
| tree | e0e6e3a63b8012267e02240e259da56542e1a911 /tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php | |
| parent | 61e741280786d6dbe106fc14690a00d87019de96 (diff) | |
| download | smarty-17d4d43624f9cd183ae0395854f4409c410e3ce9.tar.gz smarty-17d4d43624f9cd183ae0395854f4409c410e3ce9.tar.bz2 smarty-17d4d43624f9cd183ae0395854f4409c410e3ce9.zip | |
Feature/merge smarty-phpunit into tests subfolder (#580)
* Removed unneeded files and replace dummy.txt with .gitignore files
* Synced unit tests with master codebase, noted TODO's, fixed phpunit scripts and travis config
* fix php7.4 deprecation and remove php7.4 from travis allow_failures since php7.4 is current stable
Co-authored-by: Uwe Tews <uwe.tews@googlemail.com>
Co-authored-by: Uwe Tews <uwe.tews@gmail.com>
Co-authored-by: AnrDaemon <anrdaemon@yandex.ru>
Diffstat (limited to 'tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php')
| -rw-r--r-- | tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php b/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php new file mode 100644 index 00000000..8b03e7b3 --- /dev/null +++ b/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php @@ -0,0 +1,44 @@ +<?php +/** + * Smarty PHPunit tests for cache resource registered + * + * @package PHPunit + * @author Uwe Tews + */ +if (MysqlCacheEnable == true) { + include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php'; + + /** + * class for cache resource file tests + * + * @runTestsInSeparateProcess + * @preserveGlobalState disabled + * @backupStaticAttributes enabled + */ + class CacheResourceCustomRegisteredTest extends CacheResourceTestCommon + { + public function setUp() + { + if (MysqlCacheEnable != true) { + $this->markTestSkipped('mysql tests are disabled'); + } + if (self::$init) { + $this->getConnection(); + } + $this->setUpSmarty(dirname(__FILE__)); + parent::setUp(); + if (!class_exists('Smarty_CacheResource_Mysqltest', false)) { + require_once(dirname(__FILE__) . "/../_shared/PHPunitplugins/cacheresource.mysqltest.php"); + } + $this->smarty->setCachingType('foobar'); + $this->smarty->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest()); + } + + public function testInit() + { + $this->cleanDirs(); + $this->initMysqlCache(); + } + } +} + |
