diff options
353 files changed, 192 insertions, 1121 deletions
@@ -7,3 +7,5 @@ phpunit* .phpunit.result.cache vendor/* composer.lock + + diff --git a/changelog/1179.md b/changelog/1179.md new file mode 100644 index 00000000..ed13b417 --- /dev/null +++ b/changelog/1179.md @@ -0,0 +1 @@ +- Moved all unit test-generated output from inside the working tree to tmp files [#1178](https://github.com/smarty-php/smarty/issues/1178)
\ No newline at end of file diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 51704c3b..5a941d10 100644 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -15,4 +15,3 @@ if (!ini_get('date.timezone')) { } - diff --git a/tests/Config.php b/tests/Config.php index e2d66127..116c6832 100644 --- a/tests/Config.php +++ b/tests/Config.php @@ -6,7 +6,6 @@ /* * Smarty PHPUnit Config */ -define('individualFolders', true); define('MysqlCacheEnable', false); define('PdoCacheEnable', false); define('PdoGzipCacheEnable', false); diff --git a/tests/PHPUnit_Smarty.php b/tests/PHPUnit_Smarty.php index 39663c1f..90ace63e 100644 --- a/tests/PHPUnit_Smarty.php +++ b/tests/PHPUnit_Smarty.php @@ -50,6 +50,37 @@ class PHPUnit_Smarty extends PHPUnit\Framework\TestCase public static $cwd = null; /** + * Temp directory base for this test class (compile, cache, templates_tmp) + * + * @var string|null + */ + private static $tempBase = null; + + /** + * Unique token for the current test class's temp directory. + * Generated once per class. + * + * @var string|null + */ + private static $tempId = null; + + /** + * Return the temp directory base for the current test class. + * + * @return string + * @throws \LogicException If the temp directory base has not been initialized yet. + */ + public static function getTempBase(): string + { + if (self::$tempBase === null) { + throw new \LogicException( + 'Temp directory base has not been initialized. Call setUpSmarty() before using temp-path helpers.' + ); + } + return self::$tempBase; + } + + /** * PDO object for Mysql tests * * @var PDO @@ -75,8 +106,37 @@ class PHPUnit_Smarty extends PHPUnit\Framework\TestCase */ public static function tearDownAfterClass(): void { - //self::$pdo = null; - self::$testNumber = 0; + // Remove the unique temp directory for this test class unless the caller + // wants to inspect the artifacts (e.g. for debugging a failure). + if (!getenv('KEEP_SMARTY_TEST_ARTIFACTS') && self::$tempBase !== null && is_dir(self::$tempBase)) { + self::removeDir(self::$tempBase); + } + } + + /** + * Recursively remove a directory, silently ignoring any errors. + * + * @param string $dir + */ + private static function removeDir(string $dir): void + { + $dir = rtrim($dir, DIRECTORY_SEPARATOR); + $items = @scandir($dir); + if ($items === false) { + return; + } + foreach ($items as $item) { + if ($item === '.' || $item === '..') { + continue; + } + $path = $dir . DIRECTORY_SEPARATOR . $item; + if (is_dir($path) && !is_link($path)) { + self::removeDir($path); + } else { + @unlink($path); + } + } + @rmdir($dir); } /** @@ -89,60 +149,84 @@ class PHPUnit_Smarty extends PHPUnit\Framework\TestCase public function __construct($name = null, array $data = array(), $dataName = '') { date_default_timezone_set('Europe/Berlin'); - if (!defined('individualFolders')) { - define('individualFolders', true); - } parent::__construct($name, $data, $dataName); } /** + * Compute the temp directory base for a given test directory. + * + * Returns a path unique to this test class run under sys_get_temp_dir(), + * so that concurrent or sequential runs of different test classes never + * share compiled/cached output. The unique token is generated once per + * class lifetime and reset in tearDownAfterClass(). + * + * Example: + * /path/to/smarty/tests/UnitTests/TagTests/If + * → /tmp/smarty-tests/UnitTests/TagTests/If/<unique-id>/ + * + * @param string $dir absolute test directory + * @return string absolute temp base directory (with trailing separator) + */ + private static function getTempDir($dir) + { + // Lazily generate a unique token for this test class. + if (self::$tempId === null) { + self::$tempId = uniqid('', true); + } + $testsRoot = realpath(__DIR__); + $realDir = realpath($dir) ?: $dir; + // compute relative path from tests/ root + if (strpos($realDir, $testsRoot) === 0) { + $relative = substr($realDir, strlen($testsRoot)); + } else { + // fallback: use full path hash + $relative = DIRECTORY_SEPARATOR . md5($realDir); + } + return rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) + . DIRECTORY_SEPARATOR . 'smarty-tests' + . $relative + . DIRECTORY_SEPARATOR . self::$tempId + . DIRECTORY_SEPARATOR; + } + + /** * Setup Smarty instance called for each test * * @param null $dir working directory */ public function setUpSmarty($dir) { - static $s_dir; // set up current working directory chdir($dir); self::$cwd = getcwd(); + // compute temp base for this test directory + self::$tempBase = self::getTempDir($dir); // create missing folders for test if (self::$init) { - if (!is_dir($dir . '/templates')) { - mkdir($dir . '/templates'); - } - if (!is_dir($dir . '/configs')) { - mkdir($dir . '/configs'); - } - if (individualFolders != 'true') { - if (!isset($s_dir[ $dir ])) { - $this->cleanDir($dir . '/templates_c'); - $this->cleanDir($dir . '/cache'); - if (is_dir($dir . '/templates_tmp')) { - $this->cleanDir($dir . '/templates_tmp'); - } - $s_dir[ $dir ] = true; - } - $dir = __DIR__; - } - if (!is_dir($dir . '/templates_c')) { - mkdir($dir . '/templates_c'); + if (!is_dir(self::$tempBase . 'templates_c')) { + mkdir(self::$tempBase . 'templates_c', 0775, true); } - chmod($dir . '/templates_c', 0775); - if (!is_dir($dir . '/cache')) { - mkdir($dir . '/cache'); - chmod($dir . '/cache', 0775); + if (!is_dir(self::$tempBase . 'cache')) { + mkdir(self::$tempBase . 'cache', 0775, true); } + if (!is_dir(self::$tempBase . 'templates_tmp')) { + mkdir(self::$tempBase . 'templates_tmp', 0775, true); + } self::$init = false; } clearstatcache(); // instance Smarty class $this->smarty = new \Smarty\Smarty(); - if (individualFolders != 'true') { - $this->smarty->setCompileDir(__DIR__ . '/templates_c'); - $this->smarty->setCacheDir(__DIR__ . '/cache'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache'); + $this->smarty->addTemplateDir(self::getTempBase() . 'templates_tmp'); + + // Clean output dirs once at the start of each test class run + if (self::$testNumber === 0) { + $this->cleanDirs(); } + self::$testNumber++; } @@ -230,24 +314,24 @@ KEY `name` (`name`) { $this->cleanCompileDir(); $this->cleanCacheDir(); - if (is_dir(self::$cwd . '/templates_tmp')) { - $this->cleanDir(self::$cwd . '/templates_tmp'); + $templatesTmpDir = self::getTempBase() . 'templates_tmp'; + if (is_dir($templatesTmpDir)) { + $this->cleanDir($templatesTmpDir); } - $this->assertTrue(true); - } + } /** * Make temporary template file * */ - public function makeTemplateFile($name, $code) + protected function makeTemplateFile($name, $code) { - if (!is_dir(self::$cwd . '/templates_tmp')) { - mkdir(self::$cwd . '/templates_tmp'); - chmod(self::$cwd . '/templates_tmp', 0775); - } - $fileName = self::$cwd . '/templates_tmp/' . "{$name}"; - file_put_contents($fileName, $code); + file_put_contents(self::getTempBase() . 'templates_tmp' . '/' . $name, $code); + } + + protected function removeTemplateFile($name) + { + unlink(self::getTempBase() . 'templates_tmp' . '/' . $name); } /** diff --git a/tests/UnitTests/A_0/PathNormalization/TemlateDirNormalizationTest.php b/tests/UnitTests/A_0/PathNormalization/TemlateDirNormalizationTest.php index f13eb2ff..b1681a48 100644 --- a/tests/UnitTests/A_0/PathNormalization/TemlateDirNormalizationTest.php +++ b/tests/UnitTests/A_0/PathNormalization/TemlateDirNormalizationTest.php @@ -18,6 +18,7 @@ class TemplateNormalizationTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); + $this->smarty->setTemplateDir(__DIR__ . '/templates'); } public function testGetTemplateDir() diff --git a/tests/UnitTests/A_0/PathNormalization/cache/.gitignore b/tests/UnitTests/A_0/PathNormalization/cache/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_0/PathNormalization/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_0/PathNormalization/templates_c/.gitignore b/tests/UnitTests/A_0/PathNormalization/templates_c/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_0/PathNormalization/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_1/ProtectedFolderVars/cache/.gitignore b/tests/UnitTests/A_1/ProtectedFolderVars/cache/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_1/ProtectedFolderVars/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_2/UndefinedTemplateVar/UndefinedTemplateVarTest.php b/tests/UnitTests/A_2/UndefinedTemplateVar/UndefinedTemplateVarTest.php index e5c6446d..1ac04773 100644 --- a/tests/UnitTests/A_2/UndefinedTemplateVar/UndefinedTemplateVarTest.php +++ b/tests/UnitTests/A_2/UndefinedTemplateVar/UndefinedTemplateVarTest.php @@ -18,10 +18,6 @@ class UndefinedTemplateVarTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test Error suppression template fetched by Smarty object */ diff --git a/tests/UnitTests/A_2/UndefinedTemplateVar/cache/.gitignore b/tests/UnitTests/A_2/UndefinedTemplateVar/cache/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_2/UndefinedTemplateVar/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_2/UndefinedTemplateVar/templates_c/.gitignore b/tests/UnitTests/A_2/UndefinedTemplateVar/templates_c/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_2/UndefinedTemplateVar/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_Core/AutoEscape/cache/.gitignore b/tests/UnitTests/A_Core/AutoEscape/cache/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_Core/AutoEscape/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_Core/AutoEscape/templates_c/.gitignore b/tests/UnitTests/A_Core/AutoEscape/templates_c/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_Core/AutoEscape/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_Core/Filter/FilterTest.php b/tests/UnitTests/A_Core/Filter/FilterTest.php index ad005518..cf8f6712 100644 --- a/tests/UnitTests/A_Core/Filter/FilterTest.php +++ b/tests/UnitTests/A_Core/Filter/FilterTest.php @@ -21,10 +21,6 @@ class FilterTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test loaded filter diff --git a/tests/UnitTests/A_Core/Filter/cache/.gitignore b/tests/UnitTests/A_Core/Filter/cache/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_Core/Filter/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_Core/Filter/templates_c/.gitignore b/tests/UnitTests/A_Core/Filter/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/A_Core/Filter/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/A_Core/GetterSetter/GetterSetterTest.php b/tests/UnitTests/A_Core/GetterSetter/GetterSetterTest.php index 43d622b8..312ae1b8 100644 --- a/tests/UnitTests/A_Core/GetterSetter/GetterSetterTest.php +++ b/tests/UnitTests/A_Core/GetterSetter/GetterSetterTest.php @@ -20,10 +20,6 @@ class GetterSetterTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test setter on Smarty object diff --git a/tests/UnitTests/A_Core/GetterSetter/cache/.gitignore b/tests/UnitTests/A_Core/GetterSetter/cache/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_Core/GetterSetter/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_Core/GetterSetter/templates_c/.gitignore b/tests/UnitTests/A_Core/GetterSetter/templates_c/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_Core/GetterSetter/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php b/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php index 218cfab8..e04c5a21 100644 --- a/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php +++ b/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php @@ -24,10 +24,6 @@ class DefaultPluginHandlerTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } public function testDefaultFunctionScript() { $this->assertEquals("scriptfunction foo bar", $this->smarty->fetch('test_default_function_script.tpl')); diff --git a/tests/UnitTests/A_Core/LoadPlugin/cache/.gitignore b/tests/UnitTests/A_Core/LoadPlugin/cache/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_Core/LoadPlugin/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/A_Core/LoadPlugin/templates_c/.gitignore b/tests/UnitTests/A_Core/LoadPlugin/templates_c/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/UnitTests/A_Core/LoadPlugin/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php b/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php index 5ce70c11..5aedfdea 100644 --- a/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php +++ b/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php @@ -21,10 +21,6 @@ class HttpModifiedSinceTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * diff --git a/tests/UnitTests/CacheModify/ModifiedSince/cache/.gitignore b/tests/UnitTests/CacheModify/ModifiedSince/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/CacheModify/ModifiedSince/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/CacheModify/ModifiedSince/templates_c/.gitignore b/tests/UnitTests/CacheModify/ModifiedSince/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/CacheModify/ModifiedSince/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/CacheResourceTests/File/CacheResourceFileTest.php b/tests/UnitTests/CacheResourceTests/File/CacheResourceFileTest.php index 9161e3d0..86411e7d 100644 --- a/tests/UnitTests/CacheResourceTests/File/CacheResourceFileTest.php +++ b/tests/UnitTests/CacheResourceTests/File/CacheResourceFileTest.php @@ -25,11 +25,6 @@ class CacheResourceFileTest extends CacheResourceTestCommon } - public function testInit() - - { - $this->cleanDirs(); - } /** * test getCachedFilepath with configuration['useSubDirs'] enabled diff --git a/tests/UnitTests/CacheResourceTests/File/cache/.gitignore b/tests/UnitTests/CacheResourceTests/File/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/CacheResourceTests/File/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/CacheResourceTests/File/templates_c/.gitignore b/tests/UnitTests/CacheResourceTests/File/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/CacheResourceTests/File/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/CacheResourceTests/Memcache/CacheResourceCustomMemcacheTest.php b/tests/UnitTests/CacheResourceTests/Memcache/CacheResourceCustomMemcacheTest.php index 865f427d..5d9f92a0 100644 --- a/tests/UnitTests/CacheResourceTests/Memcache/CacheResourceCustomMemcacheTest.php +++ b/tests/UnitTests/CacheResourceTests/Memcache/CacheResourceCustomMemcacheTest.php @@ -32,10 +32,6 @@ class CacheResourceCustomMemcacheTest extends CacheResourceTestCommon $this->smarty->setCachingType('memcachetest'); } - public function testInit() - { - $this->cleanDirs(); - } protected function doClearCacheAssertion($a, $b) { diff --git a/tests/UnitTests/CacheResourceTests/Memcache/templates_c/.gitignore b/tests/UnitTests/CacheResourceTests/Memcache/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/CacheResourceTests/Memcache/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/CacheResourceTests/Mysql/CacheResourceCustomMysqlTest.php b/tests/UnitTests/CacheResourceTests/Mysql/CacheResourceCustomMysqlTest.php index c00a0282..0d1f5819 100644 --- a/tests/UnitTests/CacheResourceTests/Mysql/CacheResourceCustomMysqlTest.php +++ b/tests/UnitTests/CacheResourceTests/Mysql/CacheResourceCustomMysqlTest.php @@ -29,15 +29,11 @@ if (MysqlCacheEnable == true) { $this->getConnection(); } $this->setUpSmarty(__DIR__); + $this->initMysqlCache(); parent::setUp(); $this->smarty->setCachingType('mysqltest'); } - public function testInit() - { - $this->cleanDirs(); - $this->initMysqlCache(); - } } } diff --git a/tests/UnitTests/CacheResourceTests/Mysql/cache/.gitignore b/tests/UnitTests/CacheResourceTests/Mysql/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/CacheResourceTests/Mysql/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/CacheResourceTests/Mysql/templates_c/.gitignore b/tests/UnitTests/CacheResourceTests/Mysql/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/CacheResourceTests/Mysql/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/CacheResourceTests/PDO/CacheResourceCustomPDOTest.php b/tests/UnitTests/CacheResourceTests/PDO/CacheResourceCustomPDOTest.php index 2a372450..9a76afb1 100644 --- a/tests/UnitTests/CacheResourceTests/PDO/CacheResourceCustomPDOTest.php +++ b/tests/UnitTests/CacheResourceTests/PDO/CacheResourceCustomPDOTest.php @@ -28,15 +28,11 @@ class CacheResourceCustomPDOTest extends CacheResourceTestCommon $this->getConnection(); } $this->setUpSmarty(__DIR__); + $this->initMysqlCache(); parent::setUp(); $this->smarty->registerCacheResource('pdo', new Smarty_CacheResource_Pdotest($this->getPDO(), 'output_cache')); } - public function testInit() - { - $this->cleanDirs(); - $this->initMysqlCache(); - } } diff --git a/tests/UnitTests/CacheResourceTests/PDO/cacheresource.pdotest.php b/tests/UnitTests/CacheResourceTests/PDO/cacheresource.pdotest.php index 53ae840a..19feac79 100644 --- a/tests/UnitTests/CacheResourceTests/PDO/cacheresource.pdotest.php +++ b/tests/UnitTests/CacheResourceTests/PDO/cacheresource.pdotest.php @@ -2,7 +2,7 @@ use Smarty\Template\Cached; -require_once __DIR__ . '/../../__shared/cacheresources/cacheresource.pdo.php'; +require_once __DIR__ . '/../_shared/cacheresources/cacheresource.pdo.php'; class Smarty_CacheResource_Pdotest extends Smarty_CacheResource_Pdo { diff --git a/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php b/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php index bcd89b8d..d0bd2d66 100644 --- a/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php +++ b/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php @@ -27,16 +27,12 @@ class CacheResourceCustomPDOGzipTest extends CacheResourceTestCommon $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')); } - public function testInit() - { - $this->cleanDirs(); - $this->initMysqlCache(); - } } diff --git a/tests/UnitTests/CacheResourceTests/PDOgzip/cacheresource.pdo_gziptest.php b/tests/UnitTests/CacheResourceTests/PDOgzip/cacheresource.pdo_gziptest.php index 75745d60..68ba4504 100644 --- a/tests/UnitTests/CacheResourceTests/PDOgzip/cacheresource.pdo_gziptest.php +++ b/tests/UnitTests/CacheResourceTests/PDOgzip/cacheresource.pdo_gziptest.php @@ -2,7 +2,7 @@ use Smarty\Template\Cached; -require_once __DIR__ . '/../../__shared/cacheresources/cacheresource.pdo_gzip.php'; +require_once __DIR__ . '/../_shared/cacheresources/cacheresource.pdo_gzip.php'; class Smarty_CacheResource_Pdo_Gziptest extends Smarty_CacheResource_Pdo_Gzip { diff --git a/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php b/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php index 03acf270..a30f5126 100644 --- a/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php +++ b/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php @@ -26,6 +26,7 @@ if (MysqlCacheEnable == true) { $this->getConnection(); } $this->setUpSmarty(__DIR__); + $this->initMysqlCache(); parent::setUp(); if (!class_exists('Smarty_CacheResource_Mysqltest', false)) { require_once(__DIR__ . "/../_shared/PHPunitplugins/cacheresource.mysqltest.php"); @@ -34,11 +35,6 @@ if (MysqlCacheEnable == true) { $this->smarty->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest()); } - public function testInit() - { - $this->cleanDirs(); - $this->initMysqlCache(); - } } } diff --git a/tests/UnitTests/CacheResourceTests/Registered/templates_c/.gitignore b/tests/UnitTests/CacheResourceTests/Registered/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/CacheResourceTests/Registered/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/CacheResourceTests/_shared/PHPunitplugins/cacheresource.memcachetest.php b/tests/UnitTests/CacheResourceTests/_shared/PHPunitplugins/cacheresource.memcachetest.php index 77f9d5f9..c5a2cdee 100644 --- a/tests/UnitTests/CacheResourceTests/_shared/PHPunitplugins/cacheresource.memcachetest.php +++ b/tests/UnitTests/CacheResourceTests/_shared/PHPunitplugins/cacheresource.memcachetest.php @@ -3,7 +3,7 @@ use Smarty\Template; use Smarty\Template\Cached; -require_once __DIR__ . '/../../../__shared/cacheresources/cacheresource.memcache.php'; +require_once __DIR__ . '/../cacheresources/cacheresource.memcache.php'; class Smarty_CacheResource_Memcachetest extends Smarty_CacheResource_Memcache { diff --git a/tests/UnitTests/CacheResourceTests/_shared/PHPunitplugins/cacheresource.mysqltest.php b/tests/UnitTests/CacheResourceTests/_shared/PHPunitplugins/cacheresource.mysqltest.php index 5bc53bd1..7301bb33 100644 --- a/tests/UnitTests/CacheResourceTests/_shared/PHPunitplugins/cacheresource.mysqltest.php +++ b/tests/UnitTests/CacheResourceTests/_shared/PHPunitplugins/cacheresource.mysqltest.php @@ -3,7 +3,7 @@ use Smarty\Exception; use Smarty\Template\Cached; -require_once __DIR__ . '/../../../__shared/cacheresources/cacheresource.mysql.php'; +require_once __DIR__ . '/../cacheresources/cacheresource.mysql.php'; class Smarty_CacheResource_Mysqltest extends Smarty_CacheResource_Mysql { diff --git a/tests/UnitTests/__shared/cacheresources/cacheresource.memcache.php b/tests/UnitTests/CacheResourceTests/_shared/cacheresources/cacheresource.memcache.php index bc212a82..bc212a82 100644 --- a/tests/UnitTests/__shared/cacheresources/cacheresource.memcache.php +++ b/tests/UnitTests/CacheResourceTests/_shared/cacheresources/cacheresource.memcache.php diff --git a/tests/UnitTests/__shared/cacheresources/cacheresource.mysql.php b/tests/UnitTests/CacheResourceTests/_shared/cacheresources/cacheresource.mysql.php index 9b51c272..9b51c272 100644 --- a/tests/UnitTests/__shared/cacheresources/cacheresource.mysql.php +++ b/tests/UnitTests/CacheResourceTests/_shared/cacheresources/cacheresource.mysql.php diff --git a/tests/UnitTests/__shared/cacheresources/cacheresource.pdo.php b/tests/UnitTests/CacheResourceTests/_shared/cacheresources/cacheresource.pdo.php index 8be18ec9..8be18ec9 100644 --- a/tests/UnitTests/__shared/cacheresources/cacheresource.pdo.php +++ b/tests/UnitTests/CacheResourceTests/_shared/cacheresources/cacheresource.pdo.php diff --git a/tests/UnitTests/__shared/cacheresources/cacheresource.pdo_gzip.php b/tests/UnitTests/CacheResourceTests/_shared/cacheresources/cacheresource.pdo_gzip.php index 89818abb..89818abb 100644 --- a/tests/UnitTests/__shared/cacheresources/cacheresource.pdo_gzip.php +++ b/tests/UnitTests/CacheResourceTests/_shared/cacheresources/cacheresource.pdo_gzip.php diff --git a/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php b/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php index ba747981..06f6862f 100644 --- a/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php +++ b/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php @@ -20,10 +20,6 @@ class CompileCompilerPluginTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test compiler plugin tag in template file diff --git a/tests/UnitTests/Compiler/CompilerPlugin/cache/.gitignore b/tests/UnitTests/Compiler/CompilerPlugin/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/Compiler/CompilerPlugin/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/Compiler/CompilerPlugin/templates_c/.gitignore b/tests/UnitTests/Compiler/CompilerPlugin/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/Compiler/CompilerPlugin/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/Compiler/Delimiter/AutoLiteralTest.php b/tests/UnitTests/Compiler/Delimiter/AutoLiteralTest.php index 40d21653..65cd5cc7 100644 --- a/tests/UnitTests/Compiler/Delimiter/AutoLiteralTest.php +++ b/tests/UnitTests/Compiler/Delimiter/AutoLiteralTest.php @@ -17,13 +17,9 @@ class AutoliteralTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../__shared/PHPunitplugins/"); + $this->smarty->addPluginsDir("./plugins/"); } - public function testInit() - { - $this->cleanDirs(); - } /** * test '{ ' delimiter diff --git a/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php b/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php index 4092d9fb..d3d489ee 100644 --- a/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php +++ b/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php @@ -20,10 +20,6 @@ class DelimiterTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test <{ }> delimiter diff --git a/tests/UnitTests/Compiler/Delimiter/UserLiteralTest.php b/tests/UnitTests/Compiler/Delimiter/UserLiteralTest.php index 33a17eea..23e0ed0c 100644 --- a/tests/UnitTests/Compiler/Delimiter/UserLiteralTest.php +++ b/tests/UnitTests/Compiler/Delimiter/UserLiteralTest.php @@ -24,10 +24,6 @@ class UserliteralTest extends PHPUnit_Smarty } } - public function testInit() - { - $this->cleanDirs(); - } public function testUserLiteral() { diff --git a/tests/UnitTests/Compiler/Delimiter/cache/.gitignore b/tests/UnitTests/Compiler/Delimiter/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/Compiler/Delimiter/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/__shared/PHPunitplugins/block.dummyblock.php b/tests/UnitTests/Compiler/Delimiter/plugins/block.dummyblock.php index b20ca8ec..b20ca8ec 100644 --- a/tests/UnitTests/__shared/PHPunitplugins/block.dummyblock.php +++ b/tests/UnitTests/Compiler/Delimiter/plugins/block.dummyblock.php diff --git a/tests/UnitTests/Compiler/Delimiter/templates_c/.gitignore b/tests/UnitTests/Compiler/Delimiter/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/Compiler/Delimiter/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ConfigFileTests/defaultHandler/templates_c/.gitignore b/tests/UnitTests/ConfigFileTests/defaultHandler/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ConfigFileTests/defaultHandler/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ConfigFileTests/file/ConfigVarTest.php b/tests/UnitTests/ConfigFileTests/file/ConfigVarTest.php index d555df72..3b3662b0 100644 --- a/tests/UnitTests/ConfigFileTests/file/ConfigVarTest.php +++ b/tests/UnitTests/ConfigFileTests/file/ConfigVarTest.php @@ -28,10 +28,6 @@ class ConfigVarTest extends PHPUnit_Smarty /** * empty templat_c and cache folders */ - public function testInit() - { - $this->cleanDirs(); - } /** * test number config variable diff --git a/tests/UnitTests/ConfigFileTests/file/templates_c/.gitignore b/tests/UnitTests/ConfigFileTests/file/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ConfigFileTests/file/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php b/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php index 610d8de3..d5413031 100644 --- a/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php +++ b/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php @@ -25,10 +25,6 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty // Smarty::$_resource_cache = array(); } - public function testInit() - { - $this->cleanDirs(); - } protected function relative($path) { diff --git a/tests/UnitTests/ResourceTests/Custom/Ambiguous/cache/.gitignore b/tests/UnitTests/ResourceTests/Custom/Ambiguous/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Custom/Ambiguous/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Custom/Ambiguous/templates_c/.gitignore b/tests/UnitTests/ResourceTests/Custom/Ambiguous/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Custom/Ambiguous/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/ResourceExtendsAllPluginTest.php b/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/ResourceExtendsAllPluginTest.php index 0cbbfce0..2d586922 100644 --- a/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/ResourceExtendsAllPluginTest.php +++ b/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/ResourceExtendsAllPluginTest.php @@ -6,7 +6,7 @@ * @author Uwe Tews */ -require_once __DIR__ . '/../../../__shared/resources/resource.extendsall.php'; +require_once __DIR__ . '/resources/resource.extendsall.php'; /** * class for demo resource plugin extendsall tests @@ -22,10 +22,6 @@ class ResourceExtendsAllPluginTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test extendsall diff --git a/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/cache/.gitignore b/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/__shared/resources/resource.extendsall.php b/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/resources/resource.extendsall.php index 14d37908..14d37908 100644 --- a/tests/UnitTests/__shared/resources/resource.extendsall.php +++ b/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/resources/resource.extendsall.php diff --git a/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/templates_c/.gitignore b/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/ResourceMysqlPluginTest.php b/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/ResourceMysqlPluginTest.php index 16d85489..2c98fae4 100644 --- a/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/ResourceMysqlPluginTest.php +++ b/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/ResourceMysqlPluginTest.php @@ -24,17 +24,9 @@ if (MysqlResourceEnable == true) { $this->getConnection(); } $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("./PHPunitplugins/"); - } - - /** - * - */ - public function testInit() - { - $this->cleanDirs(); $this->initMysqlResource(); PHPUnit_Smarty::$pdo->exec("REPLACE INTO templates (name, source) VALUES ('test.tpl', '{\$x = \'hello world\'}{\$x}')"); + $this->smarty->addPluginsDir("./PHPunitplugins/"); } /** diff --git a/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/cache/.gitignore b/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/templates_c/.gitignore b/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/DefaultHandler/DefaultTemplateHandlerTest.php b/tests/UnitTests/ResourceTests/DefaultHandler/DefaultTemplateHandlerTest.php index f2073507..ecd7d81b 100644 --- a/tests/UnitTests/ResourceTests/DefaultHandler/DefaultTemplateHandlerTest.php +++ b/tests/UnitTests/ResourceTests/DefaultHandler/DefaultTemplateHandlerTest.php @@ -23,10 +23,6 @@ class DefaultTemplateHandlerTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test error on unknow template */ diff --git a/tests/UnitTests/ResourceTests/DefaultHandler/cache/.gitignore b/tests/UnitTests/ResourceTests/DefaultHandler/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/DefaultHandler/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/DefaultHandler/templates_c/.gitignore b/tests/UnitTests/ResourceTests/DefaultHandler/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/DefaultHandler/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Eval/EvalResourceTest.php b/tests/UnitTests/ResourceTests/Eval/EvalResourceTest.php index f4bad162..faea5d2d 100644 --- a/tests/UnitTests/ResourceTests/Eval/EvalResourceTest.php +++ b/tests/UnitTests/ResourceTests/Eval/EvalResourceTest.php @@ -21,10 +21,6 @@ class EvalResourceTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test template eval exits */ diff --git a/tests/UnitTests/ResourceTests/Eval/cache/.gitignore b/tests/UnitTests/ResourceTests/Eval/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Eval/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Eval/templates_c/.gitignore b/tests/UnitTests/ResourceTests/Eval/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Eval/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php b/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php index 2ef17719..26edeac7 100644 --- a/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php +++ b/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php @@ -20,10 +20,6 @@ class ExtendsResourceTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } public function compiledPrefilter($text, Template $tpl) { diff --git a/tests/UnitTests/ResourceTests/Extends/cache/.gitignore b/tests/UnitTests/ResourceTests/Extends/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Extends/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Extends/templates_c/.gitignore b/tests/UnitTests/ResourceTests/Extends/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Extends/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/File/FileResourceTest.php b/tests/UnitTests/ResourceTests/File/FileResourceTest.php index 44201d4b..acf522d2 100644 --- a/tests/UnitTests/ResourceTests/File/FileResourceTest.php +++ b/tests/UnitTests/ResourceTests/File/FileResourceTest.php @@ -23,10 +23,6 @@ class FileResourceTest extends PHPUnit_Smarty $this->smarty->enableSecurity(); } - public function testInit() - { - $this->cleanDirs(); - } protected function relative($path) { @@ -171,8 +167,7 @@ class FileResourceTest extends PHPUnit_Smarty $tpl->fetch(); $timestamp = $tpl->getCached()->timestamp; - - $this->smarty = new \Smarty\Smarty(); + $this->setUpSmarty(__DIR__); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; @@ -271,8 +266,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); chdir(__DIR__ . '/templates/sub/'); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array( __DIR__ . '/does-not-exist/', )); @@ -292,8 +287,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); chdir(__DIR__ . '/templates/sub/'); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array( __DIR__ . '/does-not-exist/', )); @@ -348,8 +343,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array($dn . '/templates/relativity/theory/',)); $map = array('foo.tpl' => 'theory', './foo.tpl' => 'theory', '././foo.tpl' => 'theory', @@ -367,8 +362,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array( @@ -399,8 +394,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); chdir($dn . '/templates/relativity/theory/'); $this->smarty->setTemplateDir(array( $dn . '/templates/', @@ -428,8 +423,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array($dn . '/templates/relativity/theory/einstein/',)); $map = array('foo.tpl' => 'einstein', './foo.tpl' => 'einstein', '././foo.tpl' => 'einstein', @@ -448,8 +443,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array( $dn . '/templates/relativity/theory/einstein/', )); @@ -479,8 +474,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array('../..',)); $map = array('foo.tpl' => 'relativity', './foo.tpl' => 'relativity', '././foo.tpl' => 'relativity',); @@ -497,8 +492,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array('../..',)); $map = @@ -516,8 +511,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array( '../..', )); @@ -549,8 +544,8 @@ class FileResourceTest extends PHPUnit_Smarty $cwd = getcwd(); $dn = __DIR__; - $this->smarty->setCompileDir($dn . '/templates_c/'); - $this->smarty->setCacheDir($dn . '/cache/'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/'); + $this->smarty->setCacheDir(self::getTempBase() . 'cache/'); $this->smarty->setTemplateDir(array( '..', )); diff --git a/tests/UnitTests/ResourceTests/File/cache/.gitignore b/tests/UnitTests/ResourceTests/File/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/File/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/File/templates_c/.gitignore b/tests/UnitTests/ResourceTests/File/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/File/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/FileIndexed/FileResourceIndexedTest.php b/tests/UnitTests/ResourceTests/FileIndexed/FileResourceIndexedTest.php index 4bba6a27..45205fed 100644 --- a/tests/UnitTests/ResourceTests/FileIndexed/FileResourceIndexedTest.php +++ b/tests/UnitTests/ResourceTests/FileIndexed/FileResourceIndexedTest.php @@ -14,16 +14,13 @@ class FileResourceIndexedTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); + $this->smarty->setTemplateDir(__DIR__ . '/templates'); $this->smarty->addTemplateDir(__DIR__ . '/templates_2'); // note that 10 is a string! $this->smarty->addTemplateDir(__DIR__ . '/templates_3', '10'); $this->smarty->addTemplateDir(__DIR__ . '/templates_4', 'foo'); } - public function testInit() - { - $this->cleanDirs(); - } public function testFetch() { diff --git a/tests/UnitTests/ResourceTests/FileIndexed/cache/.gitignore b/tests/UnitTests/ResourceTests/FileIndexed/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/FileIndexed/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/FileIndexed/templates_c/.gitignore b/tests/UnitTests/ResourceTests/FileIndexed/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/FileIndexed/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Registered/RegisteredResourceTest.php b/tests/UnitTests/ResourceTests/Registered/RegisteredResourceTest.php index 407aa461..20300ccf 100644 --- a/tests/UnitTests/ResourceTests/Registered/RegisteredResourceTest.php +++ b/tests/UnitTests/ResourceTests/Registered/RegisteredResourceTest.php @@ -26,10 +26,6 @@ class RegisteredResourceTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test resource plugin rendering */ diff --git a/tests/UnitTests/ResourceTests/Registered/cache/.gitignore b/tests/UnitTests/ResourceTests/Registered/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Registered/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Registered/templates_c/.gitignore b/tests/UnitTests/ResourceTests/Registered/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Registered/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/ResourcePlugins/ResourcePluginTest.php b/tests/UnitTests/ResourceTests/ResourcePlugins/ResourcePluginTest.php index 5b1b3854..3a67ef21 100644 --- a/tests/UnitTests/ResourceTests/ResourcePlugins/ResourcePluginTest.php +++ b/tests/UnitTests/ResourceTests/ResourcePlugins/ResourcePluginTest.php @@ -20,10 +20,6 @@ class ResourcePluginTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test resource plugin rendering diff --git a/tests/UnitTests/ResourceTests/ResourcePlugins/cache/.gitignore b/tests/UnitTests/ResourceTests/ResourcePlugins/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/ResourcePlugins/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/ResourcePlugins/templates_c/.gitignore b/tests/UnitTests/ResourceTests/ResourcePlugins/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/ResourcePlugins/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Stream/StreamResourceTest.php b/tests/UnitTests/ResourceTests/Stream/StreamResourceTest.php index e2a8ff70..dbb14285 100644 --- a/tests/UnitTests/ResourceTests/Stream/StreamResourceTest.php +++ b/tests/UnitTests/ResourceTests/Stream/StreamResourceTest.php @@ -27,10 +27,6 @@ class StreamResourceTest extends PHPUnit_Smarty fclose($fp); } - public function testInit() - { - $this->cleanDirs(); - } public function tearDown(): void { parent::tearDown(); diff --git a/tests/UnitTests/ResourceTests/Stream/cache/.gitignore b/tests/UnitTests/ResourceTests/Stream/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Stream/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/Stream/templates_c/.gitignore b/tests/UnitTests/ResourceTests/Stream/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/Stream/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/String/StringResourceTest.php b/tests/UnitTests/ResourceTests/String/StringResourceTest.php index a048d8b8..16a9c88b 100644 --- a/tests/UnitTests/ResourceTests/String/StringResourceTest.php +++ b/tests/UnitTests/ResourceTests/String/StringResourceTest.php @@ -21,10 +21,6 @@ class StringResourceTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } protected function relative($path) { diff --git a/tests/UnitTests/ResourceTests/String/cache/.gitignore b/tests/UnitTests/ResourceTests/String/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/String/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/ResourceTests/String/templates_c/.gitignore b/tests/UnitTests/ResourceTests/String/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/ResourceTests/String/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SecurityTests/FunctionTest.php b/tests/UnitTests/SecurityTests/FunctionTest.php index 3ef09b15..0559a3dc 100644 --- a/tests/UnitTests/SecurityTests/FunctionTest.php +++ b/tests/UnitTests/SecurityTests/FunctionTest.php @@ -20,10 +20,6 @@ class FunctionTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test unknown function error diff --git a/tests/UnitTests/SecurityTests/SecurityTest.php b/tests/UnitTests/SecurityTests/SecurityTest.php index 9996f225..393c8f54 100644 --- a/tests/UnitTests/SecurityTests/SecurityTest.php +++ b/tests/UnitTests/SecurityTests/SecurityTest.php @@ -20,10 +20,6 @@ class SecurityTest extends PHPUnit_Smarty $this->smarty->setForceCompile(true); $this->smarty->enableSecurity(); } - public function testInit() - { - $this->cleanDirs(); - } /** * test that security is loaded diff --git a/tests/UnitTests/SecurityTests/cache/.gitignore b/tests/UnitTests/SecurityTests/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SecurityTests/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SecurityTests/templates_c/.gitignore b/tests/UnitTests/SecurityTests/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SecurityTests/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/Append/AppendTest.php b/tests/UnitTests/SmartyMethodsTests/Append/AppendTest.php index 43736d01..c59fef81 100644 --- a/tests/UnitTests/SmartyMethodsTests/Append/AppendTest.php +++ b/tests/UnitTests/SmartyMethodsTests/Append/AppendTest.php @@ -21,10 +21,6 @@ class AppendTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test append */ diff --git a/tests/UnitTests/SmartyMethodsTests/Append/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/Append/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/Append/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/Append/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/Append/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/Append/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php b/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php index e8ae92b7..ec16526a 100644 --- a/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php +++ b/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php @@ -21,10 +21,6 @@ class AssignTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test simple assign */ diff --git a/tests/UnitTests/SmartyMethodsTests/Assign/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/Assign/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/Assign/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/Assign/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/Assign/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/Assign/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignTest.php b/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignTest.php index f9caa8a6..e1298e4b 100644 --- a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignTest.php +++ b/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignTest.php @@ -25,10 +25,6 @@ class ClearAllAssignTest extends PHPUnit_Smarty $this->_tpl->assign('blar', 'blar'); } - public function testInit() - { - $this->cleanDirs(); - } /** * test all variables accessable */ diff --git a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/ClearAssign/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/ClearAssign/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/ClearAssign/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/ClearAssign/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/ClearAssign/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/ClearAssign/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledTest.php b/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledTest.php index 8e638d98..dd5c4f97 100644 --- a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledTest.php +++ b/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledTest.php @@ -19,14 +19,11 @@ class ClearCompiledTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addTemplateDir('./templates_2/'); + $this->smarty->setTemplateDir('./templates/'); + $this->smarty->addTemplateDir('./templates_2/'); } - public function testInit() - { - $this->cleanDirs(); - } // helpers /** * clear $smarty->compile_dir diff --git a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/CompileCheck/CompileCheckTest.php b/tests/UnitTests/SmartyMethodsTests/CompileCheck/CompileCheckTest.php index 2c401b5e..0a55ff4c 100644 --- a/tests/UnitTests/SmartyMethodsTests/CompileCheck/CompileCheckTest.php +++ b/tests/UnitTests/SmartyMethodsTests/CompileCheck/CompileCheckTest.php @@ -7,7 +7,6 @@ class CompileCheckTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addTemplateDir('./templates_tmp'); $this->cleanDirs(); } @@ -16,18 +15,18 @@ class CompileCheckTest extends PHPUnit_Smarty */ protected function makeFiles() { - file_put_contents('./templates_tmp/t1.tpl', 'TPL1'); - file_put_contents('./templates_tmp/t2.tpl', 'TPL2'); - file_put_contents('./templates_tmp/base.tpl', '{include file="t1.tpl"}{include file="t2.tpl"}'); + $this->makeTemplateFile('t1.tpl', 'TPL1'); + $this->makeTemplateFile('t2.tpl', 'TPL2'); + $this->makeTemplateFile('base.tpl', '{include file="t1.tpl"}{include file="t2.tpl"}'); } /** * remove generated templates */ protected function removeFiles() { - unlink('./templates_tmp/t1.tpl'); - unlink('./templates_tmp/t2.tpl'); - unlink('./templates_tmp/base.tpl'); + $this->removeTemplateFile('t1.tpl'); + $this->removeTemplateFile('t2.tpl'); + $this->removeTemplateFile('base.tpl'); } /** @@ -35,8 +34,7 @@ class CompileCheckTest extends PHPUnit_Smarty * @return void */ private function softResetSmarty() { - $this->smarty = new \Smarty\Smarty(); - $this->smarty->addTemplateDir('./templates_tmp'); + $this->setUpSmarty(__DIR__); } /** @@ -64,7 +62,7 @@ class CompileCheckTest extends PHPUnit_Smarty $this->softResetSmarty(); $this->smarty->setCompileCheck(\Smarty\Smarty::COMPILECHECK_ON); - unlink('./templates_tmp/base.tpl'); + $this->removeTemplateFile('base.tpl'); sleep(1); $this->expectException(\Smarty\Exception::class); @@ -83,7 +81,7 @@ class CompileCheckTest extends PHPUnit_Smarty $this->smarty->setCompileCheck(\Smarty\Smarty::COMPILECHECK_ON); sleep(1); - file_put_contents('./templates_tmp/base.tpl', 'hello'); + $this->makeTemplateFile('base.tpl', 'hello'); $this->assertEquals('hello', $this->smarty->fetch('base.tpl')); } @@ -113,7 +111,7 @@ class CompileCheckTest extends PHPUnit_Smarty $this->softResetSmarty(); $this->smarty->setCompileCheck(\Smarty\Smarty::COMPILECHECK_OFF); - unlink('./templates_tmp/base.tpl'); + $this->removeTemplateFile('base.tpl'); sleep(1); $this->assertEquals('TPL1TPL2', $this->smarty->fetch('base.tpl')); @@ -131,7 +129,7 @@ class CompileCheckTest extends PHPUnit_Smarty $this->smarty->setCompileCheck(\Smarty\Smarty::COMPILECHECK_OFF); sleep(1); - file_put_contents('./templates_tmp/base.tpl', 'hello'); + $this->makeTemplateFile('base.tpl', 'hello'); $this->assertEquals('TPL1TPL2', $this->smarty->fetch('base.tpl')); } diff --git a/tests/UnitTests/SmartyMethodsTests/CompileCheck/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/CompileCheck/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/CompileCheck/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/CompileCheck/templates_tmp/.gitignore b/tests/UnitTests/SmartyMethodsTests/CompileCheck/templates_tmp/.gitignore deleted file mode 100644 index a0f57452..00000000 --- a/tests/UnitTests/SmartyMethodsTests/CompileCheck/templates_tmp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Ignore anything in here, but keep this directory -* - diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php index 3dc8c0a7..631ae351 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php @@ -25,10 +25,6 @@ class RegisterBlockTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test registerPlugin method for block function */ diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterBlock/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterBlock/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionTest.php index ec2287ad..e6d3ddf1 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionTest.php @@ -23,10 +23,6 @@ class RegisterCompilerFunctionTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test register->compilerFunction method for function */ diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php index 7bfe1a59..552bd3f8 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php @@ -23,10 +23,6 @@ class RegisterFunctionTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test registerPlugin method for function diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierFirstClassCallablesTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierFirstClassCallablesTest.php index 18e3fa36..50fdb9a0 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierFirstClassCallablesTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierFirstClassCallablesTest.php @@ -17,10 +17,6 @@ if (PHP_VERSION_ID >= 80100) { } - public function testInit() - { - $this->cleanDirs(); - } public function testRegisterFirstClassCallable() { diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierTest.php index 1d422d03..dfaf09c3 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierTest.php @@ -21,10 +21,6 @@ class RegisterModifierTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test register->modifier method for function */ diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterModifier/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterModifier/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterObject/CompileRegisteredObjectFunctionTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterObject/CompileRegisteredObjectFunctionTest.php index 9aca31fd..d8ec2b00 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterObject/CompileRegisteredObjectFunctionTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterObject/CompileRegisteredObjectFunctionTest.php @@ -32,10 +32,6 @@ class CompileRegisteredObjectFunctionTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test resgistered object as function */ diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterObject/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterObject/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterObject/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterObject/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/RegisterObject/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/RegisterObject/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/TemplateExist/TemplateExistsTest.php b/tests/UnitTests/SmartyMethodsTests/TemplateExist/TemplateExistsTest.php index 2917982a..da5bbb6b 100644 --- a/tests/UnitTests/SmartyMethodsTests/TemplateExist/TemplateExistsTest.php +++ b/tests/UnitTests/SmartyMethodsTests/TemplateExist/TemplateExistsTest.php @@ -21,10 +21,6 @@ class TemplateExistsTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test $smarty->templateExists true */ diff --git a/tests/UnitTests/SmartyMethodsTests/TemplateExist/cache/.gitignore b/tests/UnitTests/SmartyMethodsTests/TemplateExist/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/TemplateExist/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/TemplateExist/templates_c/.gitignore b/tests/UnitTests/SmartyMethodsTests/TemplateExist/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/SmartyMethodsTests/TemplateExist/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/SmartyMethodsTests/TemplateVars/GetTemplateVarsTest.php b/tests/UnitTests/SmartyMethodsTests/TemplateVars/GetTemplateVarsTest.php index db60b822..74141343 100644 --- a/tests/UnitTests/SmartyMethodsTests/TemplateVars/GetTemplateVarsTest.php +++ b/tests/UnitTests/SmartyMethodsTests/TemplateVars/GetTemplateVarsTest.php @@ -9,10 +9,6 @@ class GetTemplateVarsTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test root getTemplateVars single value */ diff --git a/tests/UnitTests/SmartyMethodsTests/TemplateVars/HasVariableTest.php b/tests/UnitTests/SmartyMethodsTests/TemplateVars/HasVariableTest.php index 047af7b9..68c5fb38 100644 --- a/tests/UnitTests/SmartyMethodsTests/TemplateVars/HasVariableTest.php +++ b/tests/UnitTests/SmartyMethodsTests/TemplateVars/HasVariableTest.php @@ -11,10 +11,6 @@ class HasVariableTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } public function testSimpleTrue() { diff --git a/tests/UnitTests/TemplateSource/Comments/CommentsTest.php b/tests/UnitTests/TemplateSource/Comments/CommentsTest.php index 443ac39e..b399d592 100644 --- a/tests/UnitTests/TemplateSource/Comments/CommentsTest.php +++ b/tests/UnitTests/TemplateSource/Comments/CommentsTest.php @@ -20,10 +20,6 @@ class CommentsTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test comments @@ -36,7 +32,6 @@ class CommentsTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "testComments_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->assertEquals($result, $this->smarty->fetch($file), $file); diff --git a/tests/UnitTests/TemplateSource/Comments/cache/.gitignore b/tests/UnitTests/TemplateSource/Comments/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/Comments/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/Comments/templates_c/.gitignore b/tests/UnitTests/TemplateSource/Comments/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/Comments/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/Spacing/SpacingTest.php b/tests/UnitTests/TemplateSource/Spacing/SpacingTest.php index 098d9eb8..eeb4477b 100644 --- a/tests/UnitTests/TemplateSource/Spacing/SpacingTest.php +++ b/tests/UnitTests/TemplateSource/Spacing/SpacingTest.php @@ -20,10 +20,6 @@ class SpacingTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test spacings @@ -37,7 +33,6 @@ class SpacingTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('file', $file); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, diff --git a/tests/UnitTests/TemplateSource/Spacing/cache/.gitignore b/tests/UnitTests/TemplateSource/Spacing/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/Spacing/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/Spacing/templates_c/.gitignore b/tests/UnitTests/TemplateSource/Spacing/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/Spacing/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/Spacing/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/Spacing/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/Spacing/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/StaticClass/StaticClassAccessTest.php b/tests/UnitTests/TemplateSource/StaticClass/StaticClassAccessTest.php index b3c231ac..ac506f93 100644 --- a/tests/UnitTests/TemplateSource/StaticClass/StaticClassAccessTest.php +++ b/tests/UnitTests/TemplateSource/StaticClass/StaticClassAccessTest.php @@ -22,10 +22,6 @@ class StaticClassAccessTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test static class variable */ diff --git a/tests/UnitTests/TemplateSource/StaticClass/cache/.gitignore b/tests/UnitTests/TemplateSource/StaticClass/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/StaticClass/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/StaticClass/templates_c/.gitignore b/tests/UnitTests/TemplateSource/StaticClass/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/StaticClass/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Append/CompileAppendTest.php b/tests/UnitTests/TemplateSource/TagTests/Append/CompileAppendTest.php index dc99abcf..c53e0fa6 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Append/CompileAppendTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Append/CompileAppendTest.php @@ -18,16 +18,9 @@ class CompileAppendTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); - $this->smarty->addTemplateDir("../../../__shared/templates/"); - $this->smarty->addTemplateDir("./templates_tmp"); $this->smarty->registerPlugin('modifier', 'var_export', 'var_export'); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test {append} tags @@ -79,7 +72,6 @@ class CompileAppendTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), @@ -98,7 +90,6 @@ class CompileAppendTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('1'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar',true); $this->assertEquals($result, $this->smarty->fetch($file), @@ -117,7 +108,6 @@ class CompileAppendTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('1'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar',true); $this->assertEquals($result, diff --git a/tests/UnitTests/TemplateSource/TagTests/Append/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Append/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Append/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Append/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Append/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Append/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Append/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Append/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Append/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Assign/CompileAssignTest.php b/tests/UnitTests/TemplateSource/TagTests/Assign/CompileAssignTest.php index e654efa2..eca94e4e 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Assign/CompileAssignTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Assign/CompileAssignTest.php @@ -18,16 +18,9 @@ class CompileAssignTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); - $this->smarty->addTemplateDir("../../../__shared/templates/"); - $this->smarty->addTemplateDir("./templates_tmp"); $this->smarty->registerPlugin('modifier', 'var_export', 'var_export'); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test assign tags @@ -102,7 +95,6 @@ class CompileAssignTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), @@ -121,7 +113,6 @@ class CompileAssignTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('1'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar',true); $this->assertEquals($result, $this->smarty->fetch($file), @@ -140,7 +131,6 @@ class CompileAssignTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('1'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'foo',true); $this->assertEquals(str_replace('bar','foo',$result), $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/TagTests/Assign/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Assign/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Assign/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Assign/templates/test_scope_assignbar.tpl b/tests/UnitTests/TemplateSource/TagTests/Assign/templates/test_scope_assignbar.tpl deleted file mode 100644 index c0be3a40..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Assign/templates/test_scope_assignbar.tpl +++ /dev/null @@ -1 +0,0 @@ -{$foo = $bar scope=global}{checkvar var=foo nocache}
\ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Assign/templates/test_scope_assignnocache.tpl b/tests/UnitTests/TemplateSource/TagTests/Assign/templates/test_scope_assignnocache.tpl deleted file mode 100644 index 4bde90af..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Assign/templates/test_scope_assignnocache.tpl +++ /dev/null @@ -1 +0,0 @@ -{$foo = $buh scope=global nocache}{checkvar var=foo nocache}
\ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Assign/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Assign/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Assign/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Assign/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Assign/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Assign/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php b/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php index 328cd4c1..525d3aad 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php @@ -22,10 +22,6 @@ class CompileBlockPluginTest extends PHPUnit_Smarty $this->smarty->disableSecurity(); } - public function testInit() - { - $this->cleanDirs(); - } /** * test block plugin tag @@ -251,7 +247,6 @@ class CompileBlockPluginTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "testSpacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), @@ -290,7 +285,6 @@ class CompileBlockPluginTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "testSpacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->registerDefaultPluginHandler('my_block_plugin_handler'); $this->smarty->setCompileId('default'); $this->smarty->assign('foo', 'bar'); @@ -334,7 +328,6 @@ class CompileBlockPluginTest extends PHPUnit_Smarty $this->makeTemplateFile($file, $code); $this->smarty->setCompileId('nocache'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('bar', 'bar',true); $this->assertEquals($result, $this->smarty->fetch($file), @@ -351,7 +344,6 @@ class CompileBlockPluginTest extends PHPUnit_Smarty $file = "Nocache_{$name}.tpl"; $this->smarty->setCompileId('nocache'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('bar', 'foo',true); $this->assertEquals(str_replace('bar','foo',$result), $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php index 6f0a798f..a8c896d3 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php @@ -24,10 +24,6 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty return str_replace('#', $tpl->getTemplateVars('test'), $text); } - public function testInit() - { - $this->cleanDirs(); - } /** * test block default outout @@ -563,7 +559,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $this->smarty->assign('parent', 'parent'); $this->smarty->assign('child', 'child', true); $this->smarty->assign('grand', 'grand', true); - $this->smarty->setCompileDir('./templates_c/mustcompile'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/mustcompile'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl = $this->smarty->createTemplate('021_grand.tpl', $this->smarty); @@ -589,7 +585,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty */ public function testCompileBlockGrandChildMustCompile_021_12() { - $this->smarty->setCompileDir('./templates_c/mustcompile'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/mustcompile'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $this->smarty->assign('parent', 'parent3'); @@ -611,7 +607,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $this->smarty->assign('parent', 'parent4'); $this->smarty->assign('child', 'child4', true); $this->smarty->assign('grand', 'grand4', true); - $this->smarty->setCompileDir('./templates_c/mustcompile'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/mustcompile'); sleep(2); touch($this->smarty->getTemplateDir(0) . '021_grand.tpl'); clearstatcache(); @@ -625,7 +621,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $this->smarty->assign('parent', 'parent5'); $this->smarty->assign('child', 'child5', true); $this->smarty->assign('grand', 'grand5', true); - $this->smarty->setCompileDir('./templates_c/mustcompile'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/mustcompile'); $tpl2 = $this->smarty->createTemplate('021_grand.tpl', $this->smarty); $this->assertTrue($tpl2->isCached()); $result = $this->smarty->fetch($tpl2); @@ -642,7 +638,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $this->smarty->assign('parent', 'parent6'); $this->smarty->assign('child', 'child6', true); $this->smarty->assign('grand', 'grand6', true); - $this->smarty->setCompileDir('./templates_c/mustcompile'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/mustcompile'); sleep(2); touch($this->smarty->getTemplateDir(0) . '021_child.tpl'); clearstatcache(); @@ -667,7 +663,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $this->smarty->assign('parent', 'parent7'); $this->smarty->assign('child', 'child7', true); $this->smarty->assign('grand', 'grand7', true); - $this->smarty->setCompileDir('./templates_c/mustcompile'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/mustcompile'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl2 = $this->smarty->createTemplate('021_grand.tpl', $this->smarty); @@ -686,7 +682,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $this->smarty->assign('parent', 'parent8'); $this->smarty->assign('child', 'child8', true); $this->smarty->assign('grand', 'grand8', true); - $this->smarty->setCompileDir('./templates_c/mustcompile'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/mustcompile'); sleep(2); touch($this->smarty->getTemplateDir(0) . '021_parent.tpl'); clearstatcache(); @@ -711,7 +707,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $this->smarty->assign('parent', 'parent9'); $this->smarty->assign('child', 'child9', true); $this->smarty->assign('grand', 'grand9', true); - $this->smarty->setCompileDir('./templates_c/mustcompile'); + $this->smarty->setCompileDir(self::getTempBase() . 'templates_c/mustcompile'); $this->smarty->caching = true; $this->smarty->cache_lifetime = 1000; $tpl2 = $this->smarty->createTemplate('021_grand.tpl', $this->smarty); @@ -1023,7 +1019,6 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), @@ -1042,7 +1037,6 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('VarNocache'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar',true); $this->assertEquals($result, $this->smarty->fetch($file), @@ -1061,7 +1055,6 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('VarNocache'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'foo',true); $this->assertEquals(str_replace('bar','foo',$result), $this->smarty->fetch($file), @@ -1103,7 +1096,6 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $child .= preg_replace(array('/A/','/C/','/[$]foo/','/\s*[{][$]smarty[.]block[.]child[}]\s*/'),array('G','H','$bar','{$bar}'),$code); $file = "Spacing_Child{$name}.tpl"; $this->makeTemplateFile($file, $child); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'foo'); $this->smarty->assign('bar', 'bar'); $this->assertEquals($result, @@ -1149,7 +1141,6 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $this->makeTemplateFile($file, $code); $this->smarty->setCompileId('BlockNocache'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), @@ -1167,7 +1158,6 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty $file = "blockNocache_{$name}.tpl"; $this->smarty->setCompileId('BlockNocache'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'foo'); $this->assertEquals(str_replace('bar','foo',$result), $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/BockExtend/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_c/mustcompile/.gitignore b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_c/mustcompile/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_c/mustcompile/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Capture/CompileCaptureTest.php b/tests/UnitTests/TemplateSource/TagTests/Capture/CompileCaptureTest.php index 97a3c54f..ecdded10 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Capture/CompileCaptureTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Capture/CompileCaptureTest.php @@ -18,13 +18,6 @@ class CompileCaptureTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addTemplateDir("./templates_tmp"); - } - - - public function testInit() - { - $this->cleanDirs(); } /** @@ -116,7 +109,6 @@ class CompileCaptureTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/TagTests/Capture/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Capture/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Capture/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Capture/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Capture/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Capture/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Capture/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Capture/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Capture/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/CompilerPluginTest.php b/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/CompilerPluginTest.php index 78efeb9b..e026f8a4 100644 --- a/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/CompilerPluginTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/CompilerPluginTest.php @@ -17,10 +17,6 @@ class CompilerPluginTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test compiler plugin */ diff --git a/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php index 5a402028..090f1321 100644 --- a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php @@ -23,18 +23,11 @@ class CompileConfigLoadTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); - $this->smarty->addTemplateDir("../../../__shared/templates/"); - $this->smarty->addTemplateDir("./templates_tmp"); } /** * empty template_c and cache folders */ - public function testInit() - { - $this->cleanDirs(); - } /** * diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php b/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php index 4a90c535..4aeaee68 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php @@ -21,10 +21,6 @@ class CompileDelimiterTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test delimiter tag test diff --git a/tests/UnitTests/TemplateSource/TagTests/Delimiter/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Delimiter/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Delimiter/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Delimiter/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Delimiter/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Delimiter/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Eval/CompileEvalTest.php b/tests/UnitTests/TemplateSource/TagTests/Eval/CompileEvalTest.php index 1c2ad006..734475b2 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Eval/CompileEvalTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Eval/CompileEvalTest.php @@ -21,10 +21,6 @@ class CompileEvalTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test eval tag */ diff --git a/tests/UnitTests/TemplateSource/TagTests/Eval/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Eval/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Eval/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Eval/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Eval/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Eval/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/For/CompileForTest.php b/tests/UnitTests/TemplateSource/TagTests/For/CompileForTest.php index 21d997d6..2aa5f7ef 100644 --- a/tests/UnitTests/TemplateSource/TagTests/For/CompileForTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/For/CompileForTest.php @@ -21,10 +21,6 @@ class CompileForTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * Test For @@ -38,7 +34,6 @@ class CompileForTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "For_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->assertEquals($result, $this->smarty->fetch($file), $file); @@ -162,7 +157,6 @@ class CompileForTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('buh', 'buh'); $this->assertEquals($result, $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/TagTests/For/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/For/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/For/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/For/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/For/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/For/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/For/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/For/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/For/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php b/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php index 3e39d5e2..7370de5b 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php @@ -18,13 +18,6 @@ class CompileForeachTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); - $this->smarty->addTemplateDir("./templates_tmp"); - } - - public function testInit() - { - $this->cleanDirs(); } /** @@ -312,7 +305,6 @@ class CompileForeachTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', array(1,2)); $this->assertEquals($result, $this->smarty->fetch($file), @@ -356,7 +348,6 @@ class CompileForeachTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_Else_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', array()); $this->smarty->assign('buh', 'buh'); $this->assertEquals($result, diff --git a/tests/UnitTests/TemplateSource/TagTests/Foreach/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Foreach/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Foreach/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Foreach/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Foreach/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Foreach/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Foreach/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Foreach/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Foreach/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionObjectChain/FunctionObjectChainTest.php b/tests/UnitTests/TemplateSource/TagTests/FunctionObjectChain/FunctionObjectChainTest.php index c1e34bdd..44f6b25d 100644 --- a/tests/UnitTests/TemplateSource/TagTests/FunctionObjectChain/FunctionObjectChainTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/FunctionObjectChain/FunctionObjectChainTest.php @@ -92,10 +92,6 @@ class FunctionObjectChainTest extends PHPUnit_Smarty $this->smarty->registerPlugin(\Smarty\Smarty::PLUGIN_MODIFIER, 'create_object', 'smarty_modifier_create_object'); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test the NEW feature: function call followed by method chain diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php index fd62a5ef..5e23772c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php @@ -18,15 +18,8 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); } - public function testInit() - { - $this->cleanDirs(); - } - - /** * test function plugin tag in compiled template file */ diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl deleted file mode 100644 index 9134519a..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates/functionplugintestnocache.tpl +++ /dev/null @@ -1 +0,0 @@ -{getvar var=foo nocache}
\ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php b/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php index 4384aa41..fbb20201 100644 --- a/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php @@ -18,16 +18,9 @@ class CompileIfTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); - $this->smarty->addTemplateDir("../../../__shared/templates/"); - $this->smarty->addTemplateDir("./templates_tmp"); $this->smarty->registerPlugin('modifier', 'var_export', 'var_export'); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test if tags @@ -249,7 +242,6 @@ class CompileIfTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('bar', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/TagTests/If/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/If/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/If/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/__shared/templates/run_code.tpl b/tests/UnitTests/TemplateSource/TagTests/If/templates/run_code.tpl index f2db3620..f2db3620 100644 --- a/tests/UnitTests/__shared/templates/run_code.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/If/templates/run_code.tpl diff --git a/tests/UnitTests/__shared/templates/run_code_caching.tpl b/tests/UnitTests/TemplateSource/TagTests/If/templates/run_code_caching.tpl index 421be584..421be584 100644 --- a/tests/UnitTests/__shared/templates/run_code_caching.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/If/templates/run_code_caching.tpl diff --git a/tests/UnitTests/TemplateSource/TagTests/If/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/If/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/If/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/If/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/If/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/If/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php b/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php index bd6eeaf4..00b67bdf 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php @@ -18,14 +18,6 @@ class CompileIncludeTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); - $this->smarty->addTemplateDir("./templates_tmp"); - } - - - public function testInit() - { - $this->cleanDirs(); } /** @@ -265,7 +257,6 @@ class CompileIncludeTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->addTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), @@ -284,7 +275,6 @@ class CompileIncludeTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('1'); $this->smarty->setCaching(1); - $this->smarty->addTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar',true); $this->assertEquals($result, $this->smarty->fetch($file), @@ -303,7 +293,6 @@ class CompileIncludeTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('1'); $this->smarty->setCaching(1); - $this->smarty->addTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'foo',true); $this->assertEquals(str_replace('bar','foo',$result), $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Include/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Include/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope.tpl b/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope.tpl deleted file mode 100644 index bfb1e6cb..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope.tpl +++ /dev/null @@ -1 +0,0 @@ -{include $file} diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope_assign.tpl b/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope_assign.tpl deleted file mode 100644 index ae7268d8..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope_assign.tpl +++ /dev/null @@ -1 +0,0 @@ -{$foo = 'newvar'}{checkvar var=foo}
\ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope_pluginassign.tpl b/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope_pluginassign.tpl deleted file mode 100644 index e19a560a..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope_pluginassign.tpl +++ /dev/null @@ -1 +0,0 @@ -{pluginassign var=foo value='newvar'}{checkvar var=foo}
\ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Include/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Include/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Include/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Include/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Literal/LiteralTest.php b/tests/UnitTests/TemplateSource/TagTests/Literal/LiteralTest.php index b71ed781..c44251e9 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Literal/LiteralTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Literal/LiteralTest.php @@ -21,10 +21,6 @@ class LiteralTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /* * Test literal tag */ diff --git a/tests/UnitTests/TemplateSource/TagTests/Literal/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Literal/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Literal/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Literal/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Literal/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Literal/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Nocache/CompileNocacheTest.php b/tests/UnitTests/TemplateSource/TagTests/Nocache/CompileNocacheTest.php index 9efd5329..03eb7974 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Nocache/CompileNocacheTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Nocache/CompileNocacheTest.php @@ -21,10 +21,6 @@ class CompileNocacheTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test nocache tag caching disabled */ diff --git a/tests/UnitTests/TemplateSource/TagTests/Nocache/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Nocache/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Nocache/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Nocache/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Nocache/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Nocache/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginBlock/PluginBlockTextformatTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginBlock/PluginBlockTextformatTest.php index d6dc3cd6..11907167 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginBlock/PluginBlockTextformatTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginBlock/PluginBlockTextformatTest.php @@ -22,10 +22,6 @@ class PluginBlockTextformatTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } public function testDefault() { diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginBlock/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/PluginBlock/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/PluginBlock/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginBlock/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/PluginBlock/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/PluginBlock/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionFetchTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionFetchTest.php index 5c3aa45e..0a2a5f6e 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionFetchTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionFetchTest.php @@ -10,10 +10,6 @@ class PluginFunctionFetchTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test {fetch} from local file diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountSentencesTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountSentencesTest.php index caec7630..a6d8cf4a 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountSentencesTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountSentencesTest.php @@ -20,10 +20,6 @@ class PluginModifierCountSentencesTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } public function testDefault() { diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php b/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php index b2bc2a48..1ace1817 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php @@ -21,10 +21,6 @@ class CompileSectionTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test {section} tag */ @@ -74,7 +70,6 @@ class CompileSectionTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', array(1,2)); $this->assertEquals($result, $this->smarty->fetch($file), @@ -118,7 +113,6 @@ class CompileSectionTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_Else_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', array()); $this->smarty->assign('bar', 'bar'); $this->assertEquals($result, diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Section/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Section/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Section/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Section/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Section/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Section/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php b/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php index cdc27e40..fe5bc1e6 100644 --- a/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php @@ -21,10 +21,6 @@ class CompileSetfilterTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * @run * InSeparateProcess diff --git a/tests/UnitTests/TemplateSource/TagTests/SetFilter/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/SetFilter/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/SetFilter/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/SetFilter/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/SetFilter/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/SetFilter/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Strip/CompileStripTest.php b/tests/UnitTests/TemplateSource/TagTests/Strip/CompileStripTest.php index 35b2eaac..7b417e43 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Strip/CompileStripTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Strip/CompileStripTest.php @@ -18,13 +18,6 @@ class CompileStripTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); - $this->smarty->addTemplateDir("./templates_tmp"); - } - - public function testInit() - { - $this->cleanDirs(); } /** diff --git a/tests/UnitTests/TemplateSource/TagTests/Strip/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Strip/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Strip/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/Strip/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/Strip/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/Strip/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php index 16892ed0..0d3cddca 100644 --- a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php @@ -23,10 +23,6 @@ class CompileFunctionTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * * @@ -359,7 +355,6 @@ class CompileFunctionTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->addTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), @@ -378,7 +373,6 @@ class CompileFunctionTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('VarNocache'); $this->smarty->setCaching(1); - $this->smarty->addTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar',true); $this->assertEquals($result, $this->smarty->fetch($file), @@ -397,7 +391,6 @@ class CompileFunctionTest extends PHPUnit_Smarty $file = "Spacing_{$name}.tpl"; $this->smarty->setCompileId('VarNocache'); $this->smarty->setCaching(1); - $this->smarty->addTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'foo',true); $this->assertEquals(str_replace('bar','foo',$result), $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/While/CompileWhileTest.php b/tests/UnitTests/TemplateSource/TagTests/While/CompileWhileTest.php index eaabf29b..84e24f1a 100644 --- a/tests/UnitTests/TemplateSource/TagTests/While/CompileWhileTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/While/CompileWhileTest.php @@ -21,10 +21,6 @@ class CompileWhileTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test {while 'condition'} tag */ @@ -55,7 +51,6 @@ class CompileWhileTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 3); $this->assertEquals($result, $this->smarty->fetch($file), @@ -113,7 +108,6 @@ class CompileWhileTest extends PHPUnit_Smarty $this->makeTemplateFile($file, $code); } $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', $value, $nocache); $this->assertEquals($result, $this->smarty->fetch($file), "{$file} - {$testNumber}"); diff --git a/tests/UnitTests/TemplateSource/TagTests/While/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/While/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/While/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/While/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/While/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/While/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/While/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/While/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/While/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/_Attributes/AttributeTest.php b/tests/UnitTests/TemplateSource/TagTests/_Attributes/AttributeTest.php index 9beb5d09..dc5419bc 100644 --- a/tests/UnitTests/TemplateSource/TagTests/_Attributes/AttributeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/_Attributes/AttributeTest.php @@ -18,14 +18,10 @@ class AttributeTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); + $this->smarty->addPluginsDir("./plugins/"); } - public function testInit() - { - $this->cleanDirs(); - } /** * test required attribute diff --git a/tests/UnitTests/TemplateSource/TagTests/_Attributes/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/_Attributes/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/_Attributes/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/__shared/PHPunitplugins/function.getparams.php b/tests/UnitTests/TemplateSource/TagTests/_Attributes/plugins/function.getparams.php index 41075800..41075800 100644 --- a/tests/UnitTests/__shared/PHPunitplugins/function.getparams.php +++ b/tests/UnitTests/TemplateSource/TagTests/_Attributes/plugins/function.getparams.php diff --git a/tests/UnitTests/TemplateSource/TagTests/_Attributes/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/_Attributes/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/_Attributes/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/_Error/CompileErrorTest.php b/tests/UnitTests/TemplateSource/TagTests/_Error/CompileErrorTest.php index e3c3191b..a65eca55 100644 --- a/tests/UnitTests/TemplateSource/TagTests/_Error/CompileErrorTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/_Error/CompileErrorTest.php @@ -20,10 +20,6 @@ class CompileErrorTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test none existing template file error diff --git a/tests/UnitTests/TemplateSource/TagTests/_Error/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/_Error/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/_Error/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/_Error/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/_Error/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/_Error/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/_Print/PrintTest.php b/tests/UnitTests/TemplateSource/TagTests/_Print/PrintTest.php index f10af7da..095eada5 100644 --- a/tests/UnitTests/TemplateSource/TagTests/_Print/PrintTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/_Print/PrintTest.php @@ -21,10 +21,6 @@ class PrintTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * Test Output spacings * @@ -37,7 +33,6 @@ class PrintTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "testSpacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, $this->smarty->fetch($file), @@ -56,7 +51,6 @@ class PrintTest extends PHPUnit_Smarty $file = "testSpacing_{$name}.tpl"; $this->smarty->setCompileId('1'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'bar',true); $this->assertEquals($result, $this->smarty->fetch($file), @@ -75,7 +69,6 @@ class PrintTest extends PHPUnit_Smarty $file = "testSpacing_{$name}.tpl"; $this->smarty->setCompileId('1'); $this->smarty->setCaching(1); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 'foo',true); $this->assertEquals(str_replace('bar','foo',$result), $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/TagTests/_Print/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/_Print/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/_Print/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/_Print/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/_Print/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/_Print/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/_Print/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/TagTests/_Print/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/_Print/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/break/CompileBreakTest.php b/tests/UnitTests/TemplateSource/TagTests/break/CompileBreakTest.php index 85e9aaaf..cf3a589a 100644 --- a/tests/UnitTests/TemplateSource/TagTests/break/CompileBreakTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/break/CompileBreakTest.php @@ -21,10 +21,6 @@ class CompileBreakTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test {break} in foreach */ diff --git a/tests/UnitTests/TemplateSource/TagTests/break/cache/.gitignore b/tests/UnitTests/TemplateSource/TagTests/break/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/break/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/TagTests/break/templates_c/.gitignore b/tests/UnitTests/TemplateSource/TagTests/break/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/TagTests/break/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php b/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php index 096a38c7..2a133327 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php @@ -20,10 +20,6 @@ class ArrayTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test array access * @@ -36,7 +32,6 @@ class ArrayTest extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Array_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('foo', 3); $this->assertEquals($result, $this->smarty->fetch($file), diff --git a/tests/UnitTests/TemplateSource/ValueTests/Array/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Array/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Array/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Array/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Array/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Array/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Array/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Array/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Array/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/BooleanNullTest.php b/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/BooleanNullTest.php index 41b5a10c..82ec3938 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/BooleanNullTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/BooleanNullTest.php @@ -20,10 +20,6 @@ class BooleanNullTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test true * diff --git a/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/BoolenNull/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/ConstantsTest.php b/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/ConstantsTest.php index f85acafb..4b6042bb 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/ConstantsTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/ConstantsTest.php @@ -25,10 +25,6 @@ class ConstantsTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test constants */ diff --git a/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/DoubleQuotedStringTest.php b/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/DoubleQuotedStringTest.php index 688afb2e..d3ea8e5c 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/DoubleQuotedStringTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/DoubleQuotedStringTest.php @@ -18,14 +18,6 @@ class DoubleQuotedStringTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../../__shared/PHPunitplugins/"); - $this->smarty->addTemplateDir("../../../__shared/templates/"); - $this->smarty->addTemplateDir("./templates_tmp"); - } - - public function testInit() - { - $this->cleanDirs(); } /** diff --git a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php b/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php index 4f38c161..bcf1aaa0 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php @@ -21,10 +21,6 @@ class MathTest extends PHPUnit_Smarty $this->smarty->registerPlugin('modifier', 'sin', 'sin'); } - public function testInit() - { - $this->cleanDirs(); - } /** * test PHP function as modifier diff --git a/tests/UnitTests/TemplateSource/ValueTests/Math/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Math/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Math/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Math/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Math/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Math/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Modifier/ModifierTest.php b/tests/UnitTests/TemplateSource/ValueTests/Modifier/ModifierTest.php index 2895ad97..ad83b941 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Modifier/ModifierTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Modifier/ModifierTest.php @@ -18,13 +18,8 @@ class ModifierTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addTemplateDir("./templates_tmp"); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test modifier diff --git a/tests/UnitTests/TemplateSource/ValueTests/Modifier/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Modifier/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Modifier/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Modifier/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Modifier/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Modifier/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Modifier/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Modifier/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Modifier/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Objects/ObjectVariableTest.php b/tests/UnitTests/TemplateSource/ValueTests/Objects/ObjectVariableTest.php index 9be49105..ff5c3e5e 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Objects/ObjectVariableTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Objects/ObjectVariableTest.php @@ -22,10 +22,6 @@ class ObjectVariableTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test simple object variable */ diff --git a/tests/UnitTests/TemplateSource/ValueTests/Objects/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Objects/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Objects/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Objects/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Objects/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Objects/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Operators/MatchesOperatorTest.php b/tests/UnitTests/TemplateSource/ValueTests/Operators/MatchesOperatorTest.php index 206b67ce..40c91638 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Operators/MatchesOperatorTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Operators/MatchesOperatorTest.php @@ -8,10 +8,6 @@ class MatchesOperatorTest extends PHPUnit_Smarty { $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test basic regex matching functionality diff --git a/tests/UnitTests/TemplateSource/ValueTests/Operators/OperatorsTest.php b/tests/UnitTests/TemplateSource/ValueTests/Operators/OperatorsTest.php index ea88e4bd..ea66108b 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Operators/OperatorsTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Operators/OperatorsTest.php @@ -6,10 +6,6 @@ class OperatorsTest extends PHPUnit_Smarty { $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * @group issue861 diff --git a/tests/UnitTests/TemplateSource/ValueTests/Operators/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Operators/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Operators/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/PhpFunctionTest.php b/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/PhpFunctionTest.php index e2a38862..63767abd 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/PhpFunctionTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/PhpFunctionTest.php @@ -22,10 +22,6 @@ class PhpFunctionTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test PHP empty() on variables true diff --git a/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/SingleQuotedStringTest.php b/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/SingleQuotedStringTest.php index e9f3333f..d719e973 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/SingleQuotedStringTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/SingleQuotedStringTest.php @@ -20,10 +20,6 @@ class SingleQuotedStringTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test simple single quoted string diff --git a/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/SmartyConstantTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/SmartyConstantTest.php index 26ba767e..b3b73e23 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/SmartyConstantTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/SmartyConstantTest.php @@ -20,10 +20,6 @@ class SmartyConstantTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test {$smarty.constant.foo} * diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/CookieTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/CookieTest.php index f54cd12c..603b1ce3 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/CookieTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/CookieTest.php @@ -20,10 +20,6 @@ class CookieTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test cookies * diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/SmartyDelimiterTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/SmartyDelimiterTest.php index 47304b0d..4f761d69 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/SmartyDelimiterTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/SmartyDelimiterTest.php @@ -20,10 +20,6 @@ class SmartyDelimiterTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test {$smarty.ldelim} {$smarty.rdelim} * diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/SmartyErrorTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/SmartyErrorTest.php index baf805a6..8657003b 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/SmartyErrorTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/SmartyErrorTest.php @@ -20,10 +20,6 @@ class SmartyErrorTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test undefined Smarty special variable */ diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php index 32116a7c..16940d13 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php @@ -20,10 +20,6 @@ class SmartyNowTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test {$smarty.now} * diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/PostTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/PostTest.php index 92bfea4a..63d4ada1 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/PostTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/PostTest.php @@ -20,10 +20,6 @@ class PostTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test $_POST * diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/SmartyTemplateObjectTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/SmartyTemplateObjectTest.php index 1ee56beb..8064b585 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/SmartyTemplateObjectTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/SmartyTemplateObjectTest.php @@ -20,10 +20,6 @@ class SmartyTemplateObjectTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test {$smarty.template_objects} * diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/SmartyVersionTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/SmartyVersionTest.php index efbc2dd6..cb704f80 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/SmartyVersionTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/SmartyVersionTest.php @@ -20,10 +20,6 @@ class SmartyVersionTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test {$smarty.version} * diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/StreamVariableTest.php b/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/StreamVariableTest.php index 500dcc62..b6a80389 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/StreamVariableTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/StreamVariableTest.php @@ -26,10 +26,6 @@ class StreamVariableTest extends PHPUnit_Smarty fclose($fp); } - public function testInit() - { - $this->cleanDirs(); - } protected function tearDown(): void { diff --git a/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/VariableVariableTest.php b/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/VariableVariableTest.php index 997a342a..98f5621b 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/VariableVariableTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/VariableVariableTest.php @@ -20,10 +20,6 @@ class VariableVariableTest extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * test variable name in variable diff --git a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/cache/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/templates_c/.gitignore b/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php b/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php index 3999538e..152d8da3 100644 --- a/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php +++ b/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php @@ -18,15 +18,9 @@ class ScopeTest extends PHPUnit_Smarty public function setUp(): void { $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir("../../__shared/PHPunitplugins/"); - $this->smarty->addTemplateDir("../../__shared/templates/"); - $this->smarty->addTemplateDir("./templates_tmp"); + $this->smarty->addPluginsDir("./plugins/"); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test scope diff --git a/tests/UnitTests/TemplateSource/X_Scopes/cache/.gitignore b/tests/UnitTests/TemplateSource/X_Scopes/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/X_Scopes/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/__shared/PHPunitplugins/function.checkconfigvar.php b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.checkconfigvar.php index 94fcc2c9..94fcc2c9 100644 --- a/tests/UnitTests/__shared/PHPunitplugins/function.checkconfigvar.php +++ b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.checkconfigvar.php diff --git a/tests/UnitTests/__shared/PHPunitplugins/function.checkvar.php b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.checkvar.php index 71740902..71740902 100644 --- a/tests/UnitTests/__shared/PHPunitplugins/function.checkvar.php +++ b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.checkvar.php diff --git a/tests/UnitTests/__shared/PHPunitplugins/function.pluginassign.php b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.pluginassign.php index 7786b742..7786b742 100644 --- a/tests/UnitTests/__shared/PHPunitplugins/function.pluginassign.php +++ b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.pluginassign.php diff --git a/tests/UnitTests/__shared/templates/scope_include.tpl b/tests/UnitTests/TemplateSource/X_Scopes/templates/scope_include.tpl index bfb1e6cb..bfb1e6cb 100644 --- a/tests/UnitTests/__shared/templates/scope_include.tpl +++ b/tests/UnitTests/TemplateSource/X_Scopes/templates/scope_include.tpl diff --git a/tests/UnitTests/__shared/templates/scope_tag.tpl b/tests/UnitTests/TemplateSource/X_Scopes/templates/scope_tag.tpl index 734ebb7b..734ebb7b 100644 --- a/tests/UnitTests/__shared/templates/scope_tag.tpl +++ b/tests/UnitTests/TemplateSource/X_Scopes/templates/scope_tag.tpl diff --git a/tests/UnitTests/TemplateSource/X_Scopes/templates_c/.gitignore b/tests/UnitTests/TemplateSource/X_Scopes/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/X_Scopes/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/X_Scopes/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/X_Scopes/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/X_Scopes/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/Xml/XmlTest.php b/tests/UnitTests/TemplateSource/Xml/XmlTest.php index fe7de221..8f279a48 100644 --- a/tests/UnitTests/TemplateSource/Xml/XmlTest.php +++ b/tests/UnitTests/TemplateSource/Xml/XmlTest.php @@ -23,10 +23,6 @@ class XmlTest extends PHPUnit_Smarty } - public function testInit() - { - $this->cleanDirs(); - } /** * test standard xml */ diff --git a/tests/UnitTests/TemplateSource/Xml/cache/.gitignore b/tests/UnitTests/TemplateSource/Xml/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/Xml/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/Xml/templates_c/.gitignore b/tests/UnitTests/TemplateSource/Xml/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/Xml/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/327/ModifierIssue327Test.php b/tests/UnitTests/TemplateSource/_Issues/327/ModifierIssue327Test.php index c9ba0d26..b75dd7ff 100644 --- a/tests/UnitTests/TemplateSource/_Issues/327/ModifierIssue327Test.php +++ b/tests/UnitTests/TemplateSource/_Issues/327/ModifierIssue327Test.php @@ -21,10 +21,6 @@ class ModifierIssue327Test extends PHPUnit_Smarty $this->smarty->registerPlugin('modifier', 'substr', 'substr'); } - public function testInit() - { - $this->cleanDirs(); - } public function testModifier327() { diff --git a/tests/UnitTests/TemplateSource/_Issues/327/cache/.gitignore b/tests/UnitTests/TemplateSource/_Issues/327/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/327/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/327/templates_c/.gitignore b/tests/UnitTests/TemplateSource/_Issues/327/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/327/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/419/ExtendsIssue419Test.php b/tests/UnitTests/TemplateSource/_Issues/419/ExtendsIssue419Test.php index 9f6d8164..2a5f3ae2 100644 --- a/tests/UnitTests/TemplateSource/_Issues/419/ExtendsIssue419Test.php +++ b/tests/UnitTests/TemplateSource/_Issues/419/ExtendsIssue419Test.php @@ -20,10 +20,6 @@ class ExtendsIssue419Test extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } public function testextends419() { diff --git a/tests/UnitTests/TemplateSource/_Issues/419/cache/.gitignore b/tests/UnitTests/TemplateSource/_Issues/419/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/419/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/419/templates_c/.gitignore b/tests/UnitTests/TemplateSource/_Issues/419/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/419/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/422/NestedLoopIssue422Test.php b/tests/UnitTests/TemplateSource/_Issues/422/NestedLoopIssue422Test.php index 03a48e1f..ccdadcfd 100644 --- a/tests/UnitTests/TemplateSource/_Issues/422/NestedLoopIssue422Test.php +++ b/tests/UnitTests/TemplateSource/_Issues/422/NestedLoopIssue422Test.php @@ -22,10 +22,6 @@ class NestedLoopIssue422Test extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } public function testnested422() { diff --git a/tests/UnitTests/TemplateSource/_Issues/422/cache/.gitignore b/tests/UnitTests/TemplateSource/_Issues/422/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/422/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/422/templates_c/.gitignore b/tests/UnitTests/TemplateSource/_Issues/422/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/422/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/428/SectionPropertiesShortSyntaxIssue428Test.php b/tests/UnitTests/TemplateSource/_Issues/428/SectionPropertiesShortSyntaxIssue428Test.php index c880bcb2..ada6c39e 100644 --- a/tests/UnitTests/TemplateSource/_Issues/428/SectionPropertiesShortSyntaxIssue428Test.php +++ b/tests/UnitTests/TemplateSource/_Issues/428/SectionPropertiesShortSyntaxIssue428Test.php @@ -22,10 +22,6 @@ class SectionPropertiesShortSyntaxIssue428Test extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } public function testSection_001() { diff --git a/tests/UnitTests/TemplateSource/_Issues/428/cache/.gitignore b/tests/UnitTests/TemplateSource/_Issues/428/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/428/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/428/templates_c/.gitignore b/tests/UnitTests/TemplateSource/_Issues/428/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/428/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/549/cache/.gitignore b/tests/UnitTests/TemplateSource/_Issues/549/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/549/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/549/templates_c/.gitignore b/tests/UnitTests/TemplateSource/_Issues/549/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/549/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/TooManyShorthandAttributes949Test.php b/tests/UnitTests/TemplateSource/_Issues/TooManyShorthandAttributes949Test.php index cfe55752..50f16a28 100644 --- a/tests/UnitTests/TemplateSource/_Issues/TooManyShorthandAttributes949Test.php +++ b/tests/UnitTests/TemplateSource/_Issues/TooManyShorthandAttributes949Test.php @@ -4,12 +4,12 @@ class TooManyShorthandAttributes949Test extends PHPUnit_Smarty { public function testPregMatchAll() { - $smarty = new \Smarty\Smarty(); - $smarty->registerPlugin('modifier', 'var_dump', 'var_dump'); + $this->setUpSmarty(__DIR__); + $this->smarty->registerPlugin('modifier', 'var_dump', 'var_dump'); $templateStr = "eval:{\$a = 'blah'}{\$b = array()}{if var_dump('', \$a, \$b, 2)|noprint}blah{else}nah{/if}"; $this->assertEquals( 'nah', - $smarty->fetch($templateStr) + $this->smarty->fetch($templateStr) ); } diff --git a/tests/UnitTests/TemplateSource/_Issues/topic26878/NewlineSpacing.php b/tests/UnitTests/TemplateSource/_Issues/topic26878/NewlineSpacing.php index 6de26639..f394b68a 100644 --- a/tests/UnitTests/TemplateSource/_Issues/topic26878/NewlineSpacing.php +++ b/tests/UnitTests/TemplateSource/_Issues/topic26878/NewlineSpacing.php @@ -20,10 +20,6 @@ class NewlineSpacing extends PHPUnit_Smarty $this->setUpSmarty(__DIR__); } - public function testInit() - { - $this->cleanDirs(); - } /** * Test spacings @@ -37,7 +33,6 @@ class NewlineSpacing extends PHPUnit_Smarty $name = empty($testName) ? $testNumber : $testName; $file = "Spacing_{$name}.tpl"; $this->makeTemplateFile($file, $code); - $this->smarty->setTemplateDir('./templates_tmp'); $this->smarty->assign('file', $file); $this->smarty->assign('foo', 'bar'); $this->assertEquals($result, diff --git a/tests/UnitTests/TemplateSource/_Issues/topic26878/cache/.gitignore b/tests/UnitTests/TemplateSource/_Issues/topic26878/cache/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/topic26878/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/topic26878/templates_c/.gitignore b/tests/UnitTests/TemplateSource/_Issues/topic26878/templates_c/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/topic26878/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/TemplateSource/_Issues/topic26878/templates_tmp/.gitignore b/tests/UnitTests/TemplateSource/_Issues/topic26878/templates_tmp/.gitignore deleted file mode 100644 index d88cc144..00000000 --- a/tests/UnitTests/TemplateSource/_Issues/topic26878/templates_tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -* diff --git a/tests/UnitTests/__shared/PHPunitplugins/compiler.getparamsshort.php b/tests/UnitTests/__shared/PHPunitplugins/compiler.getparamsshort.php deleted file mode 100644 index 9fb80a89..00000000 --- a/tests/UnitTests/__shared/PHPunitplugins/compiler.getparamsshort.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php -/** - * Smarty plugin params - * - - - */ - -use Smarty\Compile\Base; - -/** - * Smarty {getparams} - * - * @param array $params parameter array - * @param object $template template object - * - * @return string - */ -class smarty_compiler_getparamsshort extends Base -{ - /** - * Attribute definition: Overwrites base class. - * - * @var array - * @see Base - */ - public $required_attributes = array(); - - /** - * Attribute definition: Overwrites base class. - * - * @var array - * @see Base - */ - public $optional_attributes = array('_any'); - /** - * Attribute definition: Overwrites base class. - * - * @var array - * @see Base - */ - public $shorttag_order = array('s1', 's2', 's3'); - - public function compile($args, \Smarty\Compiler\Template $compiler, $parameter = [], $tag = null, $function = null): string - { - $_attr = $this->getAttributes($compiler, $args); - $output = '<?php echo "array('; - foreach ($_attr as $key => $value) { - $output .= "'{$key}'=>\" . "; - $output .= is_string($value) ? "({$value})" : ("'" . var_export($value, true). "'"); - $output .= ' . ",'; - - } - - $output .= ")\";?>\n"; - return $output; - } -} diff --git a/tests/UnitTests/__shared/PHPunitplugins/function.getvar.php b/tests/UnitTests/__shared/PHPunitplugins/function.getvar.php deleted file mode 100644 index c1b0756b..00000000 --- a/tests/UnitTests/__shared/PHPunitplugins/function.getvar.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -/** - * Smarty plugin getvar - * - - - */ - -use Smarty\Template; - -/** - * Smarty {getvar} - * - * @param array $params parameter array - * @param object $template template object - * - * @return string - */ -function smarty_function_getvar($params, Template $template) -{ - if (isset($params[ 'assign' ])) { - $template->assign($params[ 'assign' ], $template->getTemplateVars($params[ 'var' ])); - } else { - return $template->getTemplateVars($params[ 'var' ]); - } -} diff --git a/tests/cache/.gitignore b/tests/cache/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/cache/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file diff --git a/tests/templates_c/.gitignore b/tests/templates_c/.gitignore deleted file mode 100644 index 1d34e205..00000000 --- a/tests/templates_c/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore anything in here, but keep this directory -*
\ No newline at end of file |
