diff options
| author | Lester Caine <lester@lsces.uk> | 2026-05-09 20:22:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-09 20:22:12 +0100 |
| commit | 83d593730b8cc305da96552307afb1d0c4e58883 (patch) | |
| tree | 643997400b6beeace5f90cddedbbfb4137c7873a /tests/UnitTests/TemplateSource | |
| parent | dd391e1e8bada3f98c685f5e43289adc28ef684f (diff) | |
| parent | c139883770b12f92c9b21f69c35ad600d34f39e8 (diff) | |
| download | smarty-83d593730b8cc305da96552307afb1d0c4e58883.tar.gz smarty-83d593730b8cc305da96552307afb1d0c4e58883.tar.bz2 smarty-83d593730b8cc305da96552307afb1d0c4e58883.zip | |
Merge pull request #2 from smarty-php/master
Sync with master
Diffstat (limited to 'tests/UnitTests/TemplateSource')
211 files changed, 153 insertions, 606 deletions
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/TemplateSource/TagTests/If/templates/run_code.tpl b/tests/UnitTests/TemplateSource/TagTests/If/templates/run_code.tpl new file mode 100644 index 00000000..f2db3620 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/If/templates/run_code.tpl @@ -0,0 +1 @@ +{include $file}
\ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/If/templates/run_code_caching.tpl b/tests/UnitTests/TemplateSource/TagTests/If/templates/run_code_caching.tpl new file mode 100644 index 00000000..421be584 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/If/templates/run_code_caching.tpl @@ -0,0 +1 @@ +{include $file caching}
\ No newline at end of file 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_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/TemplateSource/TagTests/_Attributes/plugins/function.getparams.php b/tests/UnitTests/TemplateSource/TagTests/_Attributes/plugins/function.getparams.php new file mode 100644 index 00000000..41075800 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/_Attributes/plugins/function.getparams.php @@ -0,0 +1,22 @@ +<?php +/** + * Smarty plugin params + * + + + */ + +use Smarty\Template; + +/** + * Smarty {gatparams} + * + * @param array $params parameter array + * @param object $template template object + * + * @return string + */ +function smarty_function_getparams($params, Template $template) +{ + return var_export($params, true); +} 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/TemplateSource/X_Scopes/plugins/function.checkconfigvar.php b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.checkconfigvar.php new file mode 100644 index 00000000..94fcc2c9 --- /dev/null +++ b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.checkconfigvar.php @@ -0,0 +1,47 @@ +<?php +/** + * Smarty plugin for testing scopes in config vars + * + + + */ + +use Smarty\Template; + +/** + * Smarty {checkconfigvar} + * + * @param array $params parameter array + * @param object $template template object + * + * @return string + */ +function smarty_function_checkconfigvar($params, $template) +{ + $output = ''; + $types = array('template', 'data', 'global'); + if (isset($params['types'])) { + $types = (array)$params['types']; + } + $var = $params['var']; + $ptr = $template; + while ($ptr) { + if (in_array('template', $types) && $ptr instanceof Template) { + $output .= "#{$ptr->getSource()->name}:\${$var} ="; + $output .= $ptr->hasConfigVariable($var) ? preg_replace('/\s/', '', var_export($ptr->getConfigVariable($var), true)) : 'null'; + $ptr = $ptr->parent; + } elseif (in_array('data', $types) && !($ptr instanceof Template || $ptr instanceof \Smarty\Smarty)) { + $output .= "#data:\${$var} ="; + $output .= $ptr->hasConfigVariable($var) ? preg_replace('/\s/', '', var_export($ptr->getConfigVariable($var), true)) : 'null'; + $ptr = $ptr->parent; + } else { + $ptr = null; + } + } + if (in_array('global', $types)) { + $output .= "#global:\${$var} ="; + $output .= $template->getSmarty()->hasConfigVariable($var) ? + preg_replace('/\s/', '', var_export($template->getSmarty()->getConfigVariable($var), true)) : 'null'; + } + return $output; +} diff --git a/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.checkvar.php b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.checkvar.php new file mode 100644 index 00000000..71740902 --- /dev/null +++ b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.checkvar.php @@ -0,0 +1,47 @@ +<?php +/** + * Smarty plugin for testing scopes + * + + + */ + +use Smarty\Template; + +/** + * Smarty {checkvar} + * + * @param array $params parameter array + * @param Template $template template object + * + * @return string + */ +function smarty_function_checkvar($params, \Smarty\Template $template) +{ + $output = ''; + $types = ['template', 'data', 'global']; + if (isset($params['types'])) { + $types = (array)$params['types']; + } + $var = $params['var']; + $ptr = $template; + while ($ptr) { + if (in_array('template', $types) && $ptr instanceof Template) { + $output .= "#{$ptr->getSource()->name}:\${$var} ="; + $output .= $ptr->hasVariable($var) ? preg_replace('/\s/', '', var_export($ptr->getValue($var), true)) : '>unassigned<'; + $ptr = $ptr->parent; + } elseif (in_array('data', $types) && !($ptr instanceof Template || $ptr instanceof \Smarty\Smarty)) { + $output .= "#data:\${$var} ="; + $output .= $ptr->hasVariable($var) ? preg_replace('/\s/', '', var_export($ptr->getValue($var), true)) : '>unassigned<'; + $ptr = $ptr->parent; + } else { + $ptr = null; + } + } + if (in_array('global', $types)) { + $output .= "#global:\${$var} ="; + $output .= $template->getSmarty()->hasVariable($var) ? + preg_replace('/\s/', '', var_export($template->getSmarty()->getValue($var), true)) : '>unassigned<'; + } + return $output; +} diff --git a/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.pluginassign.php b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.pluginassign.php new file mode 100644 index 00000000..7786b742 --- /dev/null +++ b/tests/UnitTests/TemplateSource/X_Scopes/plugins/function.pluginassign.php @@ -0,0 +1,21 @@ +<?php +/** + * Smarty plugin for assign + * + + + */ + +/** + * Smarty {pluginassign} + * + * @param array $params parameter array + * @param object $template template object + * + * @return string + */ +function smarty_function_pluginassign($params, $template) +{ + $template->assign($params[ 'var' ], $params[ 'value' ]); + return ''; +} diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope.tpl b/tests/UnitTests/TemplateSource/X_Scopes/templates/scope_include.tpl index bfb1e6cb..bfb1e6cb 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Include/templates/test_scope.tpl +++ b/tests/UnitTests/TemplateSource/X_Scopes/templates/scope_include.tpl diff --git a/tests/UnitTests/TemplateSource/X_Scopes/templates/scope_tag.tpl b/tests/UnitTests/TemplateSource/X_Scopes/templates/scope_tag.tpl new file mode 100644 index 00000000..734ebb7b --- /dev/null +++ b/tests/UnitTests/TemplateSource/X_Scopes/templates/scope_tag.tpl @@ -0,0 +1 @@ +{include 'scope_include.tpl'}
\ No newline at end of file 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 -* |
