From 83e7c90c20a56e917122229529eada846bf76c33 Mon Sep 17 00:00:00 2001 From: uwetews Date: Thu, 31 Dec 2015 05:36:00 +0100 Subject: [PATCH] replace __DIR__ --- .../PathNormalizationTest.php | 2 +- .../ProtectedFolderVarsTest.php | 2 +- .../UndefinedTemplateVarTest.php | 2 +- .../A_Core/AutoEscape/AutoEscapeTest.php | 2 +- tests/UnitTests/A_Core/Filter/FilterTest.php | 13 +++++ .../A_Core/Filter/LoadFilterTest.php | 2 +- .../A_Core/Filter/RegisterFilterTest.php | 2 +- .../A_Core/GetterSetter/GetterSetterTest.php | 2 +- .../LoadPlugin/DefaultPluginHandlerTest.php | 2 +- .../A_Core/LoadPlugin/IncludePathTest.php | 4 +- .../A_Core/LoadPlugin/LoadPluginTest.php | 2 +- .../MuteExpectedErrorsTest.php | 6 +-- .../OutputFilterTrimWhitespaceTest.php | 2 +- .../PluginTests/PluginChainedLoadTest.php | 4 +- .../Shared/SharedFunctionsTest.php | 2 +- .../A_Core/SmartyBC/SmartyBcTest.php | 2 +- .../ModifiedSince/HttpModifiedSinceTest.php | 2 +- .../Apc/CacheResourceCustomApcTest.php | 4 +- .../File/CacheResourceFileTest.php | 4 +- .../CacheResourceCustomMemcacheTest.php | 4 +- .../Mysql/CacheResourceCustomMysqlTest.php | 4 +- .../PDO/CacheResourceCustomPDOTest.php | 4 +- .../CacheResourceCustomPDOGzipTest.php | 4 +- .../CacheResourceCustomRegisteredTest.php | 6 +-- .../Registered/templates_c/dummy.txt | 0 .../_shared/CacheResourceTestCommon.php | 8 +-- .../CompileCompilerPluginTest.php | 2 +- .../Compiler/Delimiter/DelimiterTest.php | 2 +- .../ConfigFileTests/ConfigVarTest.php | 50 +++++++++---------- .../DefaultConfigHandlerTest.php | 2 +- .../Ambiguous/CustomResourceAmbiguousTest.php | 8 +-- .../Custom/Ambiguous/resource.tpl | 0 .../ResourceExtendsAllPluginTest.php | 4 +- .../ResourceMysqlPluginTest.php | 2 +- .../DefaultTemplateHandlerTest.php | 2 +- .../ResourceTests/Eval/EvalResourceTest.php | 2 +- .../Extends/ExtendsResourceTest.php | 2 +- .../ResourceTests/File/FileResourceTest.php | 2 +- .../FileIncludePath/FileIncludePathTest.php | 4 +- .../FileIndexed/FileResourceIndexedTest.php | 8 +-- .../ResourceTests/Php/PhpResourceTest.php | 12 ++--- .../Registered/RegisteredResourceTest.php | 2 +- .../ResourcePlugins/ResourcePluginTest.php | 2 +- .../Stream/StreamResourceTest.php | 2 +- .../String/StringResourceTest.php | 2 +- .../UnitTests/SecurityTests/FunctionTest.php | 2 +- .../UnitTests/SecurityTests/SecurityTest.php | 6 +-- .../SmartyMethodsTests/Append/AppendTest.php | 2 +- .../AppendByRef/AppendByRefBCTest.php | 2 +- .../AppendByRef/AppendByRefTest.php | 2 +- .../SmartyMethodsTests/Assign/AssignTest.php | 2 +- .../AssignByRef/AssignByRefBCTest.php | 2 +- .../AssignByRef/AssignByRefTest.php | 2 +- .../AssignGlobal/AssignGlobalTest.php | 2 +- .../ClearAllAssign/ClearAllAssignBCTest.php | 2 +- .../ClearAllAssign/ClearAllAssignTest.php | 2 +- .../ClearAssign/ClearAssignBCTest.php | 2 +- .../ClearAssign/ClearAssignTest.php | 2 +- .../ClearCompiledBCTest.php | 2 +- .../ClearCompiledTest.php | 2 +- .../GetTemplateVars/GetTemplateVarsBCTest.php | 2 +- .../GetTemplateVars/GetTemplateVarsTest.php | 2 +- .../RegisterBlock/RegisterBlockTest.php | 2 +- .../RegisterCompilerFunctionBCTest.php | 2 +- .../RegisterCompilerFunctionTest.php | 2 +- .../RegisterFunctionBCTest.php | 2 +- .../RegisterFunction/RegisterFunctionTest.php | 2 +- .../RegisterModifier/RegisterModifierTest.php | 2 +- .../CompileRegisteredObjectFunctionTest.php | 2 +- .../TemplateExist/TemplateExistsTest.php | 2 +- .../TemplateSource/Comments/CommentsTest.php | 2 +- .../TemplateSource/Spacing/SpacingTest.php | 2 +- .../StaticClass/StaticClassAccessTest.php | 2 +- .../TagTests/Append/CompileAppendTest.php | 2 +- .../TagTests/Assign/CompileAssignTest.php | 2 +- .../BlockPlugin/CompileBlockPluginTest.php | 10 ++-- .../BockExtend/CompileBlockExtendsTest.php | 2 +- .../TagTests/Capture/CompileCaptureTest.php | 4 +- .../CompilerPlugin/CompilerPluginTest.php | 2 +- .../ConfigLoad/CompileConfigLoadTest.php | 22 ++++---- .../Delimiter/CompileDelimiterTest.php | 2 +- .../TagTests/Eval/CompileEvalTest.php | 2 +- .../TagTests/For/CompileForTest.php | 8 +-- .../TagTests/Foreach/CompileForeachTest.php | 2 +- .../CompileFunctionPluginTest.php | 2 +- .../TagTests/If/CompileIfTest.php | 2 +- .../TagTests/Include/CompileIncludeTest.php | 2 +- .../IncludePhp/CompileIncludePhpTest.php | 2 +- .../TagTests/Insert/CompileInsertTest.php | 20 ++++---- .../TagTests/Literal/LiteralTest.php | 2 +- .../TagTests/Nocache/CompileNocacheTest.php | 4 +- .../TagTests/Php/CompilePhpTest.php | 2 +- .../PluginBlock/PluginBlockTextformatTest.php | 2 +- .../PluginFunctionFetchTest.php | 2 +- .../PluginFunctionHtmlCheckboxesTest.php | 2 +- .../PluginFunctionHtmlImageTest.php | 2 +- .../PluginFunctionHtmlOptionsTest.php | 2 +- .../PluginFunctionHtmlRadiosTest.php | 2 +- .../PluginFunctionHtmlSelectDateTest.php | 2 +- .../PluginFunctionHtmlSelectTimeTest.php | 2 +- .../PluginFunctionMailtoTest.php | 2 +- .../PluginModifierCapitalizeTest.php | 2 +- .../PluginModifierCharsetTest.php | 2 +- .../PluginModifierCountCharactersTest.php | 2 +- .../PluginModifierCountSentencesTest.php | 2 +- .../PluginModifierCountWordsTest.php | 2 +- .../PluginModifierEscapeTest.php | 2 +- .../PluginModifierLowerTest.php | 2 +- .../PluginModifierRegexReplaceTest.php | 2 +- .../PluginModifierSpacifyTest.php | 2 +- .../PluginModifierStripTest.php | 2 +- .../PluginModifierTruncateTest.php | 2 +- .../PluginModifierUnescapeTest.php | 2 +- .../PluginModifierUpperTest.php | 2 +- .../PluginModifierWordwrapTest.php | 2 +- .../TagTests/Section/CompileSectionTest.php | 42 +++++++--------- .../Section/templates/001_section.tpl | 1 + .../Section/templates/002_section.tpl | 1 + .../Section/templates/003_section.tpl | 1 + .../Section/templates/004_section.tpl | 1 + .../Section/templates/006_section.tpl | 1 + .../Section/templates/007_section.tpl | 1 + .../SetFilter/CompileSetfilterTest.php | 2 +- .../TagTests/Strip/CompileStripTest.php | 2 +- .../TemplateFunction/CompileFunctionTest.php | 2 +- .../TagTests/While/CompileWhileTest.php | 2 +- .../TagTests/_Attributes/AttributeTest.php | 2 +- .../TagTests/_Error/CompileErrorTest.php | 2 +- .../TagTests/_Print/PrintNocacheTest.php | 4 +- .../ValueTests/Array/ArrayTest.php | 2 +- .../ConstantTests/ConstantsTest.php | 2 +- .../DoubleQuoted/DoubleQuotedStringTest.php | 2 +- .../ValueTests/Math/MathTest.php | 2 +- .../ValueTests/Modifier/ModifierTest.php | 2 +- .../ValueTests/Objects/ObjectVariableTest.php | 2 +- .../SingleQouted/SingleQuotedStringTest.php | 2 +- .../Constant/SmartyConstantTest.php | 2 +- .../SmartySpecialVars/Cookie/CookieTest.php | 2 +- .../Delimiter/SmartyDelimiterTest.php | 2 +- .../Error/SmartyErrorTest.php | 2 +- .../SmartySpecialVars/Now/SmartyNowTest.php | 2 +- .../SmartySpecialVars/Post/PostTest.php | 2 +- .../SmartyTemplateObjectTest.php | 2 +- .../Version/SmartyVersionTest.php | 2 +- .../Variables/Stream/StreamVariableTest.php | 2 +- .../VariableScope/VariableScopeTest.php | 2 +- .../VariableVariable/VariableVariableTest.php | 2 +- .../UnitTests/TemplateSource/Xml/XmlTest.php | 2 +- 148 files changed, 258 insertions(+), 245 deletions(-) create mode 100644 tests/UnitTests/CacheResourceTests/Registered/templates_c/dummy.txt create mode 100644 tests/UnitTests/ResourceTests/Custom/Ambiguous/resource.tpl create mode 100644 tests/UnitTests/TemplateSource/TagTests/Section/templates/001_section.tpl create mode 100644 tests/UnitTests/TemplateSource/TagTests/Section/templates/002_section.tpl create mode 100644 tests/UnitTests/TemplateSource/TagTests/Section/templates/003_section.tpl create mode 100644 tests/UnitTests/TemplateSource/TagTests/Section/templates/004_section.tpl create mode 100644 tests/UnitTests/TemplateSource/TagTests/Section/templates/006_section.tpl create mode 100644 tests/UnitTests/TemplateSource/TagTests/Section/templates/007_section.tpl diff --git a/tests/UnitTests/A_0/PathNormalization/PathNormalizationTest.php b/tests/UnitTests/A_0/PathNormalization/PathNormalizationTest.php index 08721bf5..d1c6d8d4 100644 --- a/tests/UnitTests/A_0/PathNormalization/PathNormalizationTest.php +++ b/tests/UnitTests/A_0/PathNormalization/PathNormalizationTest.php @@ -17,7 +17,7 @@ class PathNormalizationTest extends PHPUnit_Smarty */ public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testNormalizeToAbsolute() { diff --git a/tests/UnitTests/A_1/ProtectedFolderVars/ProtectedFolderVarsTest.php b/tests/UnitTests/A_1/ProtectedFolderVars/ProtectedFolderVarsTest.php index a3df4e06..e635740a 100644 --- a/tests/UnitTests/A_1/ProtectedFolderVars/ProtectedFolderVarsTest.php +++ b/tests/UnitTests/A_1/ProtectedFolderVars/ProtectedFolderVarsTest.php @@ -17,7 +17,7 @@ class ProtectedFolderVarsTest extends PHPUnit_Smarty */ public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } /* diff --git a/tests/UnitTests/A_2/UndefinedTemplateVar/UndefinedTemplateVarTest.php b/tests/UnitTests/A_2/UndefinedTemplateVar/UndefinedTemplateVarTest.php index 2e2fc065..c65ef2ff 100644 --- a/tests/UnitTests/A_2/UndefinedTemplateVar/UndefinedTemplateVarTest.php +++ b/tests/UnitTests/A_2/UndefinedTemplateVar/UndefinedTemplateVarTest.php @@ -15,7 +15,7 @@ class UndefinedTemplateVarTest extends PHPUnit_Smarty */ public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); error_reporting(E_ALL | E_STRICT); } diff --git a/tests/UnitTests/A_Core/AutoEscape/AutoEscapeTest.php b/tests/UnitTests/A_Core/AutoEscape/AutoEscapeTest.php index bc303532..733c7226 100644 --- a/tests/UnitTests/A_Core/AutoEscape/AutoEscapeTest.php +++ b/tests/UnitTests/A_Core/AutoEscape/AutoEscapeTest.php @@ -17,7 +17,7 @@ class AutoEscapeTest extends PHPUnit_Smarty */ public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->setEscapeHtml(true); } diff --git a/tests/UnitTests/A_Core/Filter/FilterTest.php b/tests/UnitTests/A_Core/Filter/FilterTest.php index cfbee3b7..92a796f5 100644 --- a/tests/UnitTests/A_Core/Filter/FilterTest.php +++ b/tests/UnitTests/A_Core/Filter/FilterTest.php @@ -96,6 +96,19 @@ class FilterTest extends PHPUnit_Smarty $this->assertEquals("bar hello world", $this->smarty->fetch($tpl)); } + /** + * test registered pre filter closure + */ + public function testRegisteredPreFilterClosure() + { + if (version_compare(PHP_VERSION, '5.2', '<=')) { + $this->markTestSkipped('closure not available'); + } + $this->smarty->registerFilter(Smarty::FILTER_PRE, function($input) {return '{$foo}' . $input;}); + $tpl = $this->smarty->createTemplate('eval:{" hello world"}'); + $tpl->assign('foo', 'buh'); + $this->assertEquals("buh hello world", $this->smarty->fetch($tpl)); + } /** * test registered pre filter class diff --git a/tests/UnitTests/A_Core/Filter/LoadFilterTest.php b/tests/UnitTests/A_Core/Filter/LoadFilterTest.php index e463be32..f99719ab 100644 --- a/tests/UnitTests/A_Core/Filter/LoadFilterTest.php +++ b/tests/UnitTests/A_Core/Filter/LoadFilterTest.php @@ -17,7 +17,7 @@ class LoadFilterTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } /** diff --git a/tests/UnitTests/A_Core/Filter/RegisterFilterTest.php b/tests/UnitTests/A_Core/Filter/RegisterFilterTest.php index 158a7f48..9bd0f0e3 100644 --- a/tests/UnitTests/A_Core/Filter/RegisterFilterTest.php +++ b/tests/UnitTests/A_Core/Filter/RegisterFilterTest.php @@ -17,7 +17,7 @@ class RegisterFilterTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } /** diff --git a/tests/UnitTests/A_Core/GetterSetter/GetterSetterTest.php b/tests/UnitTests/A_Core/GetterSetter/GetterSetterTest.php index 99485ac5..e2d46fcf 100644 --- a/tests/UnitTests/A_Core/GetterSetter/GetterSetterTest.php +++ b/tests/UnitTests/A_Core/GetterSetter/GetterSetterTest.php @@ -17,7 +17,7 @@ class GetterSetterTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php b/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php index 74b75e62..effbf613 100644 --- a/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php +++ b/tests/UnitTests/A_Core/LoadPlugin/DefaultPluginHandlerTest.php @@ -17,7 +17,7 @@ class DefaultPluginHandlerTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->setForceCompile(true); $this->smarty->disableSecurity(); $this->smarty->registerDefaultPluginHandler('my_plugin_handler'); diff --git a/tests/UnitTests/A_Core/LoadPlugin/IncludePathTest.php b/tests/UnitTests/A_Core/LoadPlugin/IncludePathTest.php index 35ad3147..3dc4ab5f 100644 --- a/tests/UnitTests/A_Core/LoadPlugin/IncludePathTest.php +++ b/tests/UnitTests/A_Core/LoadPlugin/IncludePathTest.php @@ -13,12 +13,12 @@ class IncludePathTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->use_include_path = true; $this->smarty->setPluginsDir(array('./include','./include1')); $this->smarty->enableSecurity(); $ds = DS; - set_include_path($this->smarty->_realpath(__DIR__ . "{$ds}..{$ds}..{$ds}..{$ds}Include_Path{$ds}Plugins{$ds}", true) . PATH_SEPARATOR . get_include_path()); + set_include_path($this->smarty->_realpath(dirname(__FILE__) . "{$ds}..{$ds}..{$ds}..{$ds}Include_Path{$ds}Plugins{$ds}", true) . PATH_SEPARATOR . get_include_path()); } /** diff --git a/tests/UnitTests/A_Core/LoadPlugin/LoadPluginTest.php b/tests/UnitTests/A_Core/LoadPlugin/LoadPluginTest.php index 8e25af4a..0b9a918a 100644 --- a/tests/UnitTests/A_Core/LoadPlugin/LoadPluginTest.php +++ b/tests/UnitTests/A_Core/LoadPlugin/LoadPluginTest.php @@ -17,7 +17,7 @@ class LoadPluginTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } /** diff --git a/tests/UnitTests/A_Core/MuteExpectedErrors/MuteExpectedErrorsTest.php b/tests/UnitTests/A_Core/MuteExpectedErrors/MuteExpectedErrorsTest.php index 9840b19b..2c39bdfb 100644 --- a/tests/UnitTests/A_Core/MuteExpectedErrors/MuteExpectedErrorsTest.php +++ b/tests/UnitTests/A_Core/MuteExpectedErrors/MuteExpectedErrorsTest.php @@ -19,7 +19,7 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } @@ -74,7 +74,7 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -99,7 +99,7 @@ class MuteExpectedErrorsTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ diff --git a/tests/UnitTests/A_Core/PluginTests/OutputFilterTrimWhitespaceTest.php b/tests/UnitTests/A_Core/PluginTests/OutputFilterTrimWhitespaceTest.php index 8b5ed4f4..09c949b8 100644 --- a/tests/UnitTests/A_Core/PluginTests/OutputFilterTrimWhitespaceTest.php +++ b/tests/UnitTests/A_Core/PluginTests/OutputFilterTrimWhitespaceTest.php @@ -17,7 +17,7 @@ class OutputFilterTrimWhitespaceTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->loadFilter('output', 'trimwhitespace'); } diff --git a/tests/UnitTests/A_Core/PluginTests/PluginChainedLoadTest.php b/tests/UnitTests/A_Core/PluginTests/PluginChainedLoadTest.php index e51312e6..d0f68809 100644 --- a/tests/UnitTests/A_Core/PluginTests/PluginChainedLoadTest.php +++ b/tests/UnitTests/A_Core/PluginTests/PluginChainedLoadTest.php @@ -17,7 +17,7 @@ class PluginChainedLoadTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() @@ -27,7 +27,7 @@ class PluginChainedLoadTest extends PHPUnit_Smarty public function testPluginChainedLoad() { - $this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); + $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/"); $this->assertContains('from chain3', $this->smarty->fetch('test_plugin_chained_load.tpl')); } } diff --git a/tests/UnitTests/A_Core/PluginTests/Shared/SharedFunctionsTest.php b/tests/UnitTests/A_Core/PluginTests/Shared/SharedFunctionsTest.php index 35349413..2ecafd32 100644 --- a/tests/UnitTests/A_Core/PluginTests/Shared/SharedFunctionsTest.php +++ b/tests/UnitTests/A_Core/PluginTests/Shared/SharedFunctionsTest.php @@ -13,7 +13,7 @@ class SharedFunctionsTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } /** diff --git a/tests/UnitTests/A_Core/SmartyBC/SmartyBcTest.php b/tests/UnitTests/A_Core/SmartyBC/SmartyBcTest.php index 07699b43..8933639b 100644 --- a/tests/UnitTests/A_Core/SmartyBC/SmartyBcTest.php +++ b/tests/UnitTests/A_Core/SmartyBC/SmartyBcTest.php @@ -19,7 +19,7 @@ class SmartyBcTest extends PHPUnit_Smarty public $loadSmarty = false; public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php b/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php index 595540d3..d59577c5 100644 --- a/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php +++ b/tests/UnitTests/CacheModify/ModifiedSince/HttpModifiedSinceTest.php @@ -19,7 +19,7 @@ class HttpModifiedSinceTest extends PHPUnit_Smarty public function setUp() { $this->markTestSkipped('modified since tests are disabled'); - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/CacheResourceTests/Apc/CacheResourceCustomApcTest.php b/tests/UnitTests/CacheResourceTests/Apc/CacheResourceCustomApcTest.php index 4f957ae6..3032a91e 100644 --- a/tests/UnitTests/CacheResourceTests/Apc/CacheResourceCustomApcTest.php +++ b/tests/UnitTests/CacheResourceTests/Apc/CacheResourceCustomApcTest.php @@ -6,7 +6,7 @@ * @author Uwe Tews */ if (ApcCacheEnable == true) { - include_once __DIR__ . '/../Memcache/CacheResourceCustomMemcacheTest.php'; + include_once dirname(__FILE__) . '/../Memcache/CacheResourceCustomMemcacheTest.php'; /** * class for cache resource file tests @@ -26,7 +26,7 @@ if (ApcCacheEnable == true) { $this->markTestSkipped('APC cache not available'); } } - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); parent::setUp(); $this->smarty->setCachingType('apc'); $this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/'); diff --git a/tests/UnitTests/CacheResourceTests/File/CacheResourceFileTest.php b/tests/UnitTests/CacheResourceTests/File/CacheResourceFileTest.php index acdbfa0d..dda616a8 100644 --- a/tests/UnitTests/CacheResourceTests/File/CacheResourceFileTest.php +++ b/tests/UnitTests/CacheResourceTests/File/CacheResourceFileTest.php @@ -6,7 +6,7 @@ * @author Uwe Tews */ -include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; +include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php'; /** * class for cache resource file tests @@ -20,7 +20,7 @@ class CacheResourceFileTest extends CacheResourceTestCommon public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); parent::setUp(); $this->smarty->setCachingType('filetest'); } diff --git a/tests/UnitTests/CacheResourceTests/Memcache/CacheResourceCustomMemcacheTest.php b/tests/UnitTests/CacheResourceTests/Memcache/CacheResourceCustomMemcacheTest.php index 9d94ddc9..51731b8d 100644 --- a/tests/UnitTests/CacheResourceTests/Memcache/CacheResourceCustomMemcacheTest.php +++ b/tests/UnitTests/CacheResourceTests/Memcache/CacheResourceCustomMemcacheTest.php @@ -7,7 +7,7 @@ */ if (MemCacheEnable == true) { - include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; + include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php'; /** * class for cache resource memcache tests @@ -28,7 +28,7 @@ if (MemCacheEnable == true) { if (MemCacheEnable != true) { $this->markTestSkipped('Memcache tests are disabled'); } - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); parent::setUp(); $this->smarty->setCachingType('memcachetest'); } diff --git a/tests/UnitTests/CacheResourceTests/Mysql/CacheResourceCustomMysqlTest.php b/tests/UnitTests/CacheResourceTests/Mysql/CacheResourceCustomMysqlTest.php index 0b500d1c..5329c406 100644 --- a/tests/UnitTests/CacheResourceTests/Mysql/CacheResourceCustomMysqlTest.php +++ b/tests/UnitTests/CacheResourceTests/Mysql/CacheResourceCustomMysqlTest.php @@ -7,7 +7,7 @@ */ if (MysqlCacheEnable == true) { - include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; + include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php'; /** * class for cache resource file tests @@ -27,7 +27,7 @@ if (MysqlCacheEnable == true) { if (self::$init) { $this->getConnection(); } - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); parent::setUp(); $this->smarty->setCachingType('mysqltest'); } diff --git a/tests/UnitTests/CacheResourceTests/PDO/CacheResourceCustomPDOTest.php b/tests/UnitTests/CacheResourceTests/PDO/CacheResourceCustomPDOTest.php index fc9d0afd..cd025d6b 100644 --- a/tests/UnitTests/CacheResourceTests/PDO/CacheResourceCustomPDOTest.php +++ b/tests/UnitTests/CacheResourceTests/PDO/CacheResourceCustomPDOTest.php @@ -7,7 +7,7 @@ */ if (PdoCacheEnable == true) { - include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; + include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php'; /** * class for cache resource file tests @@ -27,7 +27,7 @@ if (PdoCacheEnable == true) { if (self::$init) { $this->getConnection(); } - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); parent::setUp(); $this->smarty->setCachingType('pdo'); $this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/'); diff --git a/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php b/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php index 5df30e25..3017232c 100644 --- a/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php +++ b/tests/UnitTests/CacheResourceTests/PDOgzip/CacheResourceCustomPDOGzipTest.php @@ -7,7 +7,7 @@ */ if (PdoGzipCacheEnable == true) { - include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; + include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php'; /** * class for cache resource file tests @@ -25,7 +25,7 @@ if (PdoGzipCacheEnable == true) { if (self::$init) { $this->getConnection(); } - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); parent::setUp(); $this->smarty->setCachingType('pdo'); $this->smarty->addPluginsDir(SMARTY_DIR . '../demo/plugins/'); diff --git a/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php b/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php index 8bd34941..8b03e7b3 100644 --- a/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php +++ b/tests/UnitTests/CacheResourceTests/Registered/CacheResourceCustomRegisteredTest.php @@ -6,7 +6,7 @@ * @author Uwe Tews */ if (MysqlCacheEnable == true) { - include_once __DIR__ . '/../_shared/CacheResourceTestCommon.php'; + include_once dirname(__FILE__) . '/../_shared/CacheResourceTestCommon.php'; /** * class for cache resource file tests @@ -25,10 +25,10 @@ if (MysqlCacheEnable == true) { if (self::$init) { $this->getConnection(); } - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); parent::setUp(); if (!class_exists('Smarty_CacheResource_Mysqltest', false)) { - require_once(__DIR__ . "/../_shared/PHPunitplugins/cacheresource.mysqltest.php"); + require_once(dirname(__FILE__) . "/../_shared/PHPunitplugins/cacheresource.mysqltest.php"); } $this->smarty->setCachingType('foobar'); $this->smarty->registerCacheResource('foobar', new Smarty_CacheResource_Mysqltest()); diff --git a/tests/UnitTests/CacheResourceTests/Registered/templates_c/dummy.txt b/tests/UnitTests/CacheResourceTests/Registered/templates_c/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/UnitTests/CacheResourceTests/_shared/CacheResourceTestCommon.php b/tests/UnitTests/CacheResourceTests/_shared/CacheResourceTestCommon.php index e58fb63b..1c79a4bd 100644 --- a/tests/UnitTests/CacheResourceTests/_shared/CacheResourceTestCommon.php +++ b/tests/UnitTests/CacheResourceTests/_shared/CacheResourceTestCommon.php @@ -17,8 +17,8 @@ class CacheResourceTestCommon extends PHPUnit_Smarty public function setUp() { - $this->smarty->setTemplateDir(__DIR__ . '/../_shared/templates'); - $this->smarty->addPluginsDir(__DIR__ . '/../_shared/PHPunitplugins'); + $this->smarty->setTemplateDir(dirname(__FILE__) . '/../_shared/templates'); + $this->smarty->addPluginsDir(dirname(__FILE__) . '/../_shared/PHPunitplugins'); $this->smarty->registerFilter('pre', array($this, 'compiledPrefilter')); } @@ -514,9 +514,9 @@ class CacheResourceTestCommon extends PHPUnit_Smarty { $this->smarty->setCaching(true); if ($folder == 0) { - $this->smarty->setTemplateDir(array(__DIR__ . '/../_shared/templates', __DIR__ . '/../_shared/templates/a')); + $this->smarty->setTemplateDir(array(dirname(__FILE__) . '/../_shared/templates', dirname(__FILE__) . '/../_shared/templates/a')); } else { - $this->smarty->setTemplateDir(array(__DIR__ . '/../_shared/templates', __DIR__ . '/../_shared/templates/b')); + $this->smarty->setTemplateDir(array(dirname(__FILE__) . '/../_shared/templates', dirname(__FILE__) . '/../_shared/templates/b')); } if ($merge) { $this->smarty->setCompileId(1); diff --git a/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php b/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php index c201ad9e..589aa29c 100644 --- a/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php +++ b/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php @@ -17,7 +17,7 @@ class CompileCompilerPluginTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php b/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php index 40b20f49..a062f546 100644 --- a/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php +++ b/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php @@ -17,7 +17,7 @@ class DelimiterTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/ConfigFileTests/ConfigVarTest.php b/tests/UnitTests/ConfigFileTests/ConfigVarTest.php index f0ccacd1..e722ad68 100644 --- a/tests/UnitTests/ConfigFileTests/ConfigVarTest.php +++ b/tests/UnitTests/ConfigFileTests/ConfigVarTest.php @@ -22,7 +22,7 @@ class ConfigVarTest extends PHPUnit_Smarty */ public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } /** @@ -43,7 +43,7 @@ class ConfigVarTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test string config variable @@ -55,7 +55,7 @@ class ConfigVarTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test line string config variable @@ -67,7 +67,7 @@ class ConfigVarTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test config variables in global sections @@ -79,7 +79,7 @@ class ConfigVarTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test config variables loading section2 @@ -91,7 +91,7 @@ class ConfigVarTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test config variables loading section special char @@ -103,7 +103,7 @@ class ConfigVarTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test config variables loading section foo/bar @@ -115,7 +115,7 @@ class ConfigVarTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test config variables loaded in different scopes from different sections (Smarty and template) @@ -133,7 +133,7 @@ class ConfigVarTest extends PHPUnit_Smarty * test config variables of hidden sections * shall display variables from hidden section * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableHidden() @@ -147,7 +147,7 @@ class ConfigVarTest extends PHPUnit_Smarty * test config variables of disabled hidden sections * shall display not variables from hidden section * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableHiddenDisable() @@ -161,7 +161,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test getConfigVars * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigGetSingleConfigVar() @@ -173,7 +173,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test getConfigVars return all variables * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigGetAllConfigVars() @@ -188,7 +188,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test clearConfig for single variable * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigClearSingleConfigVar() @@ -201,7 +201,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test clearConfig for all variables * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigClearConfigAll() @@ -216,7 +216,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test config vars on data object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigTextData() @@ -229,7 +229,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test getConfigVars on data object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigGetSingleConfigVarData() @@ -242,7 +242,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test getConfigVars return all variables on data object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigGetAllConfigVarsData() @@ -258,7 +258,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test clearConfig for single variable on data object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigClearSingleConfigVarData() @@ -273,7 +273,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test clearConfig for all variables on data object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigClearConfigAllData() @@ -289,7 +289,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test config vars on template object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigTextTemplate() @@ -302,7 +302,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test getConfigVars on template object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigGetSingleConfigVarTemplate() @@ -315,7 +315,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test getConfigVars return all variables on template object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigGetAllConfigVarsTemplate() @@ -331,7 +331,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test clearConfig for single variable on template object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigClearSingleConfigVarTemplate() @@ -346,7 +346,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test clearConfig for all variables on template object * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigClearConfigAllTemplate() @@ -362,7 +362,7 @@ class ConfigVarTest extends PHPUnit_Smarty /** * test config variables loading from absolute file path * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigAbsolutePath() diff --git a/tests/UnitTests/ConfigFileTests/DefaultConfigHandlerTest.php b/tests/UnitTests/ConfigFileTests/DefaultConfigHandlerTest.php index 8a7433a7..e267ab03 100644 --- a/tests/UnitTests/ConfigFileTests/DefaultConfigHandlerTest.php +++ b/tests/UnitTests/ConfigFileTests/DefaultConfigHandlerTest.php @@ -23,7 +23,7 @@ class DefaultConfigHandlerTest extends PHPUnit_Smarty */ public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->setForceCompile(true); } diff --git a/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php b/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php index 943a5f48..8a72d45b 100644 --- a/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php +++ b/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php @@ -19,7 +19,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); require_once dirname(__FILE__) . '/PHPunitplugins/resource.ambiguous.php'; // empty the template dir @@ -57,7 +57,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -77,7 +77,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -97,7 +97,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ diff --git a/tests/UnitTests/ResourceTests/Custom/Ambiguous/resource.tpl b/tests/UnitTests/ResourceTests/Custom/Ambiguous/resource.tpl new file mode 100644 index 00000000..e69de29b diff --git a/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/ResourceExtendsAllPluginTest.php b/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/ResourceExtendsAllPluginTest.php index 0cd1f919..8cfb3c44 100644 --- a/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/ResourceExtendsAllPluginTest.php +++ b/tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/ResourceExtendsAllPluginTest.php @@ -17,7 +17,7 @@ class ResourceExtendsAllPluginTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() @@ -118,7 +118,7 @@ class ResourceExtendsAllPluginTest extends PHPUnit_Smarty } /** * test extendsall special application - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testResourcePluginExtendsallSpecialApplication5() diff --git a/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/ResourceMysqlPluginTest.php b/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/ResourceMysqlPluginTest.php index f80c63e3..c99fbc43 100644 --- a/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/ResourceMysqlPluginTest.php +++ b/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/ResourceMysqlPluginTest.php @@ -23,7 +23,7 @@ if (MysqlResourceEnable == true) { if (self::$init) { $this->getConnection(); } - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/ResourceTests/DefaultHandler/DefaultTemplateHandlerTest.php b/tests/UnitTests/ResourceTests/DefaultHandler/DefaultTemplateHandlerTest.php index 3e4b1f7f..9bf0b3b6 100644 --- a/tests/UnitTests/ResourceTests/DefaultHandler/DefaultTemplateHandlerTest.php +++ b/tests/UnitTests/ResourceTests/DefaultHandler/DefaultTemplateHandlerTest.php @@ -17,7 +17,7 @@ class DefaultTemplateHandlerTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->setForceCompile(true); $this->smarty->disableSecurity(); } diff --git a/tests/UnitTests/ResourceTests/Eval/EvalResourceTest.php b/tests/UnitTests/ResourceTests/Eval/EvalResourceTest.php index c4f1f77e..cc73cc59 100644 --- a/tests/UnitTests/ResourceTests/Eval/EvalResourceTest.php +++ b/tests/UnitTests/ResourceTests/Eval/EvalResourceTest.php @@ -17,7 +17,7 @@ class EvalResourceTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php b/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php index cdf566ca..2be211b8 100644 --- a/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php +++ b/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php @@ -17,7 +17,7 @@ class ExtendsResourceTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/ResourceTests/File/FileResourceTest.php b/tests/UnitTests/ResourceTests/File/FileResourceTest.php index b0c4801a..e7f33369 100644 --- a/tests/UnitTests/ResourceTests/File/FileResourceTest.php +++ b/tests/UnitTests/ResourceTests/File/FileResourceTest.php @@ -17,7 +17,7 @@ class FileResourceTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/ResourceTests/FileIncludePath/FileIncludePathTest.php b/tests/UnitTests/ResourceTests/FileIncludePath/FileIncludePathTest.php index dc3c2ba0..f92c46c9 100644 --- a/tests/UnitTests/ResourceTests/FileIncludePath/FileIncludePathTest.php +++ b/tests/UnitTests/ResourceTests/FileIncludePath/FileIncludePathTest.php @@ -13,12 +13,12 @@ class FileIncludePathTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->use_include_path = true; $this->smarty->setTemplateDir(array('./templates', './templates_2', './include')); $this->smarty->enableSecurity(); $ds = DS; - set_include_path($this->smarty->_realpath(__DIR__ . "{$ds}..{$ds}..{$ds}..{$ds}Include_Path{$ds}Tpl{$ds}", true) . PATH_SEPARATOR . get_include_path()); + set_include_path($this->smarty->_realpath(dirname(__FILE__) . "{$ds}..{$ds}..{$ds}..{$ds}Include_Path{$ds}Tpl{$ds}", true) . PATH_SEPARATOR . get_include_path()); } /** diff --git a/tests/UnitTests/ResourceTests/FileIndexed/FileResourceIndexedTest.php b/tests/UnitTests/ResourceTests/FileIndexed/FileResourceIndexedTest.php index b94883dd..9a1cf606 100644 --- a/tests/UnitTests/ResourceTests/FileIndexed/FileResourceIndexedTest.php +++ b/tests/UnitTests/ResourceTests/FileIndexed/FileResourceIndexedTest.php @@ -13,11 +13,11 @@ class FileResourceIndexedTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); - $this->smarty->addTemplateDir(__DIR__ . '/templates_2'); + $this->setUpSmarty(dirname(__FILE__)); + $this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_2'); // note that 10 is a string! - $this->smarty->addTemplateDir(__DIR__ . '/templates_3', '10'); - $this->smarty->addTemplateDir(__DIR__ . '/templates_4', 'foo'); + $this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_3', '10'); + $this->smarty->addTemplateDir(dirname(__FILE__) . '/templates_4', 'foo'); } public function testInit() diff --git a/tests/UnitTests/ResourceTests/Php/PhpResourceTest.php b/tests/UnitTests/ResourceTests/Php/PhpResourceTest.php index 6f0e49e2..a0a07b43 100644 --- a/tests/UnitTests/ResourceTests/Php/PhpResourceTest.php +++ b/tests/UnitTests/ResourceTests/Php/PhpResourceTest.php @@ -17,7 +17,7 @@ class PhpResourceTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } @@ -133,7 +133,7 @@ class PhpResourceTest extends PHPUnit_Smarty /** * test getCachedTimestamp caching enabled * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -150,7 +150,7 @@ class PhpResourceTest extends PHPUnit_Smarty /** * test isCached * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -176,7 +176,7 @@ class PhpResourceTest extends PHPUnit_Smarty /** * test isCached on touched source * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -190,7 +190,7 @@ class PhpResourceTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -244,7 +244,7 @@ class PhpResourceTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ diff --git a/tests/UnitTests/ResourceTests/Registered/RegisteredResourceTest.php b/tests/UnitTests/ResourceTests/Registered/RegisteredResourceTest.php index ee78bb1d..d55a1852 100644 --- a/tests/UnitTests/ResourceTests/Registered/RegisteredResourceTest.php +++ b/tests/UnitTests/ResourceTests/Registered/RegisteredResourceTest.php @@ -18,7 +18,7 @@ class RegisteredResourceTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->registerResource("rr", array("rr_get_template", "rr_get_timestamp", diff --git a/tests/UnitTests/ResourceTests/ResourcePlugins/ResourcePluginTest.php b/tests/UnitTests/ResourceTests/ResourcePlugins/ResourcePluginTest.php index afc8f474..ba8d9162 100644 --- a/tests/UnitTests/ResourceTests/ResourcePlugins/ResourcePluginTest.php +++ b/tests/UnitTests/ResourceTests/ResourcePlugins/ResourcePluginTest.php @@ -17,7 +17,7 @@ class ResourcePluginTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/ResourceTests/Stream/StreamResourceTest.php b/tests/UnitTests/ResourceTests/Stream/StreamResourceTest.php index 55d71f72..122a8b22 100644 --- a/tests/UnitTests/ResourceTests/Stream/StreamResourceTest.php +++ b/tests/UnitTests/ResourceTests/Stream/StreamResourceTest.php @@ -17,7 +17,7 @@ class StreamResourceTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->assign('foo', 'bar'); stream_wrapper_register("global", "ResourceStream") diff --git a/tests/UnitTests/ResourceTests/String/StringResourceTest.php b/tests/UnitTests/ResourceTests/String/StringResourceTest.php index 8a00ba04..83e5d30f 100644 --- a/tests/UnitTests/ResourceTests/String/StringResourceTest.php +++ b/tests/UnitTests/ResourceTests/String/StringResourceTest.php @@ -17,7 +17,7 @@ class StringResourceTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SecurityTests/FunctionTest.php b/tests/UnitTests/SecurityTests/FunctionTest.php index cde55bfb..0706f23b 100644 --- a/tests/UnitTests/SecurityTests/FunctionTest.php +++ b/tests/UnitTests/SecurityTests/FunctionTest.php @@ -17,7 +17,7 @@ class FunctionTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/SecurityTests/SecurityTest.php b/tests/UnitTests/SecurityTests/SecurityTest.php index f0011bd4..307f09ab 100644 --- a/tests/UnitTests/SecurityTests/SecurityTest.php +++ b/tests/UnitTests/SecurityTests/SecurityTest.php @@ -18,7 +18,7 @@ class SecurityTest extends PHPUnit_Smarty public $loadSmartyBC = true; public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->setForceCompile(true); $this->smarty->enableSecurity(); @@ -280,12 +280,12 @@ class SecurityTest extends PHPUnit_Smarty */ public function testNotTrustedDirectory() { - $this->smarty->security_policy->secure_dir = array(str_replace('\\', '/', __DIR__ . '/templates_3/')); + $this->smarty->security_policy->secure_dir = array(str_replace('\\', '/', dirname(__FILE__) . '/templates_3/')); try { $this->smarty->fetch('eval:{include file="templates_2/hello.tpl"}'); } catch (Exception $e) { - $this->assertContains(str_replace('\\', '/', __DIR__ . "/templates_2/hello.tpl' not allowed by security setting"), str_replace('\\', '/', $e->getMessage())); + $this->assertContains(str_replace('\\', '/', dirname(__FILE__) . "/templates_2/hello.tpl' not allowed by security setting"), str_replace('\\', '/', $e->getMessage())); return; } diff --git a/tests/UnitTests/SmartyMethodsTests/Append/AppendTest.php b/tests/UnitTests/SmartyMethodsTests/Append/AppendTest.php index 574a34bb..4955b7d7 100644 --- a/tests/UnitTests/SmartyMethodsTests/Append/AppendTest.php +++ b/tests/UnitTests/SmartyMethodsTests/Append/AppendTest.php @@ -17,7 +17,7 @@ class AppendTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SmartyMethodsTests/AppendByRef/AppendByRefBCTest.php b/tests/UnitTests/SmartyMethodsTests/AppendByRef/AppendByRefBCTest.php index c832259d..0c8a759e 100644 --- a/tests/UnitTests/SmartyMethodsTests/AppendByRef/AppendByRefBCTest.php +++ b/tests/UnitTests/SmartyMethodsTests/AppendByRef/AppendByRefBCTest.php @@ -19,7 +19,7 @@ class AppendByRefBCTest extends PHPUnit_Smarty public $loadSmarty = false; public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/SmartyMethodsTests/AppendByRef/AppendByRefTest.php b/tests/UnitTests/SmartyMethodsTests/AppendByRef/AppendByRefTest.php index 510b36a3..7a52d700 100644 --- a/tests/UnitTests/SmartyMethodsTests/AppendByRef/AppendByRefTest.php +++ b/tests/UnitTests/SmartyMethodsTests/AppendByRef/AppendByRefTest.php @@ -17,7 +17,7 @@ class AppendByRefTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } /** diff --git a/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php b/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php index f9808839..cc45a5c9 100644 --- a/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php +++ b/tests/UnitTests/SmartyMethodsTests/Assign/AssignTest.php @@ -17,7 +17,7 @@ class AssignTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SmartyMethodsTests/AssignByRef/AssignByRefBCTest.php b/tests/UnitTests/SmartyMethodsTests/AssignByRef/AssignByRefBCTest.php index 1f635001..902d27ac 100644 --- a/tests/UnitTests/SmartyMethodsTests/AssignByRef/AssignByRefBCTest.php +++ b/tests/UnitTests/SmartyMethodsTests/AssignByRef/AssignByRefBCTest.php @@ -19,7 +19,7 @@ class AssignByRefBCTest extends PHPUnit_Smarty public $loadSmarty = false; public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SmartyMethodsTests/AssignByRef/AssignByRefTest.php b/tests/UnitTests/SmartyMethodsTests/AssignByRef/AssignByRefTest.php index c96d05e4..6c393d86 100644 --- a/tests/UnitTests/SmartyMethodsTests/AssignByRef/AssignByRefTest.php +++ b/tests/UnitTests/SmartyMethodsTests/AssignByRef/AssignByRefTest.php @@ -17,7 +17,7 @@ class AssignByRefTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } /** diff --git a/tests/UnitTests/SmartyMethodsTests/AssignGlobal/AssignGlobalTest.php b/tests/UnitTests/SmartyMethodsTests/AssignGlobal/AssignGlobalTest.php index 7483e3f6..ecd4130b 100644 --- a/tests/UnitTests/SmartyMethodsTests/AssignGlobal/AssignGlobalTest.php +++ b/tests/UnitTests/SmartyMethodsTests/AssignGlobal/AssignGlobalTest.php @@ -17,7 +17,7 @@ class AssignGlobalTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignBCTest.php b/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignBCTest.php index c1f7049d..5f87bcae 100644 --- a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignBCTest.php +++ b/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignBCTest.php @@ -22,7 +22,7 @@ class ClearAllAssignBCTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smartyBC->assign('foo', 'foo'); $this->_dataBC = new Smarty_Data($this->smartyBC); diff --git a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignTest.php b/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignTest.php index 8766f286..b3c66483 100644 --- a/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignTest.php +++ b/tests/UnitTests/SmartyMethodsTests/ClearAllAssign/ClearAllAssignTest.php @@ -20,7 +20,7 @@ class ClearAllAssignTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->assign('foo', 'foo'); $this->_data = new Smarty_Data($this->smarty); diff --git a/tests/UnitTests/SmartyMethodsTests/ClearAssign/ClearAssignBCTest.php b/tests/UnitTests/SmartyMethodsTests/ClearAssign/ClearAssignBCTest.php index 7bc6784a..17a0ed5f 100644 --- a/tests/UnitTests/SmartyMethodsTests/ClearAssign/ClearAssignBCTest.php +++ b/tests/UnitTests/SmartyMethodsTests/ClearAssign/ClearAssignBCTest.php @@ -19,7 +19,7 @@ class ClearAssignBCTest extends PHPUnit_Smarty public $loadSmarty = false; public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smartyBC->assign('foo', 'foo'); $this->smartyBC->assign('bar', 'bar'); diff --git a/tests/UnitTests/SmartyMethodsTests/ClearAssign/ClearAssignTest.php b/tests/UnitTests/SmartyMethodsTests/ClearAssign/ClearAssignTest.php index f619a6da..d47e9da6 100644 --- a/tests/UnitTests/SmartyMethodsTests/ClearAssign/ClearAssignTest.php +++ b/tests/UnitTests/SmartyMethodsTests/ClearAssign/ClearAssignTest.php @@ -17,7 +17,7 @@ class ClearAssignTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->assign('foo', 'foo'); $this->smarty->assign('bar', 'bar'); $this->smarty->assign('blar', 'blar'); diff --git a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledBCTest.php b/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledBCTest.php index 57760770..4814f682 100644 --- a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledBCTest.php +++ b/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledBCTest.php @@ -21,7 +21,7 @@ class ClearCompiledBCTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smartyBC->addTemplateDir('./templates_2/'); } diff --git a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledTest.php b/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledTest.php index 5ac3c021..194d9e15 100644 --- a/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledTest.php +++ b/tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/ClearCompiledTest.php @@ -18,7 +18,7 @@ class ClearCompiledTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->addTemplateDir('./templates_2/'); } diff --git a/tests/UnitTests/SmartyMethodsTests/GetTemplateVars/GetTemplateVarsBCTest.php b/tests/UnitTests/SmartyMethodsTests/GetTemplateVars/GetTemplateVarsBCTest.php index 62c0ccc6..816c9f50 100644 --- a/tests/UnitTests/SmartyMethodsTests/GetTemplateVars/GetTemplateVarsBCTest.php +++ b/tests/UnitTests/SmartyMethodsTests/GetTemplateVars/GetTemplateVarsBCTest.php @@ -20,7 +20,7 @@ class get_template_varsBCTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SmartyMethodsTests/GetTemplateVars/GetTemplateVarsTest.php b/tests/UnitTests/SmartyMethodsTests/GetTemplateVars/GetTemplateVarsTest.php index fe8d5945..fff0c375 100644 --- a/tests/UnitTests/SmartyMethodsTests/GetTemplateVars/GetTemplateVarsTest.php +++ b/tests/UnitTests/SmartyMethodsTests/GetTemplateVars/GetTemplateVarsTest.php @@ -17,7 +17,7 @@ class GetTemplateVarsTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php index 1109cb8f..5d5f845f 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php @@ -18,7 +18,7 @@ class RegisterBlockTest extends PHPUnit_Smarty public $loadSmartyBC = true; public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->disableSecurity(); $this->smartyBC->disableSecurity(); } diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionBCTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionBCTest.php index 5783e13c..3dee8b1e 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionBCTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionBCTest.php @@ -20,7 +20,7 @@ class RegisterCompilerFunctionBCTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionTest.php index 80294b1f..54db28a6 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterCompiler/RegisterCompilerFunctionTest.php @@ -17,7 +17,7 @@ class RegisterCompilerFunctionTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionBCTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionBCTest.php index 72ececfc..ca53ab24 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionBCTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionBCTest.php @@ -22,7 +22,7 @@ class RegisterFunctionBCTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php index 9ac2224f..01fabf3e 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterFunction/RegisterFunctionTest.php @@ -18,7 +18,7 @@ class RegisterFunctionTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierTest.php index 526b2a39..6b768984 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterModifier/RegisterModifierTest.php @@ -17,7 +17,7 @@ class RegisterModifierTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterObject/CompileRegisteredObjectFunctionTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterObject/CompileRegisteredObjectFunctionTest.php index 85fab00a..be57c06f 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterObject/CompileRegisteredObjectFunctionTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterObject/CompileRegisteredObjectFunctionTest.php @@ -17,7 +17,7 @@ class CompileRegisteredObjectFunctionTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->setForceCompile(true); $this->smarty->disableSecurity(); diff --git a/tests/UnitTests/SmartyMethodsTests/TemplateExist/TemplateExistsTest.php b/tests/UnitTests/SmartyMethodsTests/TemplateExist/TemplateExistsTest.php index 58544f9c..f387d8f7 100644 --- a/tests/UnitTests/SmartyMethodsTests/TemplateExist/TemplateExistsTest.php +++ b/tests/UnitTests/SmartyMethodsTests/TemplateExist/TemplateExistsTest.php @@ -17,7 +17,7 @@ class TemplateExistsTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/Comments/CommentsTest.php b/tests/UnitTests/TemplateSource/Comments/CommentsTest.php index a622808b..3d9397b5 100644 --- a/tests/UnitTests/TemplateSource/Comments/CommentsTest.php +++ b/tests/UnitTests/TemplateSource/Comments/CommentsTest.php @@ -17,7 +17,7 @@ class CommentsTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/Spacing/SpacingTest.php b/tests/UnitTests/TemplateSource/Spacing/SpacingTest.php index 9e2494dc..91f398be 100644 --- a/tests/UnitTests/TemplateSource/Spacing/SpacingTest.php +++ b/tests/UnitTests/TemplateSource/Spacing/SpacingTest.php @@ -17,7 +17,7 @@ class SpacingTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->assign('foo', 'bar'); } diff --git a/tests/UnitTests/TemplateSource/StaticClass/StaticClassAccessTest.php b/tests/UnitTests/TemplateSource/StaticClass/StaticClassAccessTest.php index f51a5d53..42d9f0ce 100644 --- a/tests/UnitTests/TemplateSource/StaticClass/StaticClassAccessTest.php +++ b/tests/UnitTests/TemplateSource/StaticClass/StaticClassAccessTest.php @@ -17,7 +17,7 @@ class StaticClassAccessTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->disableSecurity(); } diff --git a/tests/UnitTests/TemplateSource/TagTests/Append/CompileAppendTest.php b/tests/UnitTests/TemplateSource/TagTests/Append/CompileAppendTest.php index ee9881bb..95b722cf 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Append/CompileAppendTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Append/CompileAppendTest.php @@ -17,7 +17,7 @@ class CompileAppendTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/Assign/CompileAssignTest.php b/tests/UnitTests/TemplateSource/TagTests/Assign/CompileAssignTest.php index ffb3598f..afe51b28 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Assign/CompileAssignTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Assign/CompileAssignTest.php @@ -17,7 +17,7 @@ class CompileAssignTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php b/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php index 25e76da9..726e4a0c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php @@ -17,7 +17,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->addPluginsDir("./PHPunitplugins/"); $this->smarty->setForceCompile(true); $this->smarty->disableSecurity(); @@ -51,7 +51,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty /** * test block plugin tag in template file * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -64,7 +64,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty /** * test block plugin tag in compiled template file * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -78,7 +78,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty /** * test block plugin tag in template file * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -94,7 +94,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty /** * test block plugin function definition in script * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php index 1b94dddf..6507b479 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php @@ -17,7 +17,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); //$this->smarty->setMergeCompiledIncludes(true); } diff --git a/tests/UnitTests/TemplateSource/TagTests/Capture/CompileCaptureTest.php b/tests/UnitTests/TemplateSource/TagTests/Capture/CompileCaptureTest.php index 588c36e8..9d20f313 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Capture/CompileCaptureTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Capture/CompileCaptureTest.php @@ -17,7 +17,7 @@ class CompileCaptureTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } @@ -88,7 +88,7 @@ class CompileCaptureTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ diff --git a/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/CompilerPluginTest.php b/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/CompilerPluginTest.php index 7e1ee0a2..eca3d1a3 100644 --- a/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/CompilerPluginTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/CompilerPluginTest.php @@ -17,7 +17,7 @@ class CompilerPluginTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php index 65a3171d..2e49dc0a 100644 --- a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php @@ -22,7 +22,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty */ public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } /** @@ -42,7 +42,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test {load_config} loading section2 shorttags @@ -55,7 +55,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty /** * test config varibales loading local * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableLocal() @@ -68,7 +68,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty /** * test config varibales loading parent * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableParent() @@ -81,7 +81,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty /** * test config varibales loading global * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableGlobal() @@ -95,7 +95,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty /** * test config varibales loading all sections from template * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableAllSectionsTemplate() @@ -107,7 +107,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty /** * test config varibales overwrite * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableOverwrite() @@ -116,7 +116,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableOverwrite2() @@ -127,7 +127,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty /** * test config varibales overwrite false * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableOverwriteFalse() @@ -139,7 +139,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty /** * test config varibales booleanize on * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableBooleanizeOn() @@ -151,7 +151,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty /** * test config varibales booleanize off * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableBooleanizeOff() diff --git a/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php b/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php index f40c3760..ea2c911f 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Delimiter/CompileDelimiterTest.php @@ -17,7 +17,7 @@ class CompileDelimiterTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/Eval/CompileEvalTest.php b/tests/UnitTests/TemplateSource/TagTests/Eval/CompileEvalTest.php index 383e24c2..20b41d20 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Eval/CompileEvalTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Eval/CompileEvalTest.php @@ -17,7 +17,7 @@ class CompileEvalTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/For/CompileForTest.php b/tests/UnitTests/TemplateSource/TagTests/For/CompileForTest.php index 43878bb2..e600fd6c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/For/CompileForTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/For/CompileForTest.php @@ -17,7 +17,7 @@ class CompileForTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } @@ -127,7 +127,7 @@ class CompileForTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -151,7 +151,7 @@ class CompileForTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ @@ -175,7 +175,7 @@ class CompileForTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ diff --git a/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php b/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php index 3bf5bc4c..7127a3df 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php @@ -17,7 +17,7 @@ class CompileForeachTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); //$this->smarty->force_compile = true; } diff --git a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php index 6e274eb5..2ed5f75b 100644 --- a/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/CompileFunctionPluginTest.php @@ -17,7 +17,7 @@ class CompileFunctionPluginTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php b/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php index f74013d6..9c05859d 100644 --- a/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php @@ -17,7 +17,7 @@ class CompileIfTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php b/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php index 1256f5b5..8eaf7fbc 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php @@ -17,7 +17,7 @@ class CompileIncludeTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/IncludePhp/CompileIncludePhpTest.php b/tests/UnitTests/TemplateSource/TagTests/IncludePhp/CompileIncludePhpTest.php index 73fb4722..36923a1d 100644 --- a/tests/UnitTests/TemplateSource/TagTests/IncludePhp/CompileIncludePhpTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/IncludePhp/CompileIncludePhpTest.php @@ -19,7 +19,7 @@ class CompileIncludePhpTest extends PHPUnit_Smarty public $loadSmarty = false; public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smartyBC->setForceCompile(true); } diff --git a/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php b/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php index ea823e76..d92434ca 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php @@ -17,8 +17,8 @@ class CompileInsertTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); - $this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); + $this->setUpSmarty(dirname(__FILE__)); + $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/"); $this->smarty->enableSecurity(); } @@ -61,7 +61,7 @@ class CompileInsertTest extends PHPUnit_Smarty $this->assertEquals('param foo bar globalvar global', $this->smarty->fetch($tpl)); } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * test insert plugin */ @@ -89,13 +89,13 @@ class CompileInsertTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ public function testInsertPluginCaching1_2() { - $this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); + $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/"); global $insertglobal; $insertglobal = 'changed global 2'; $this->smarty->caching = 1; @@ -107,13 +107,13 @@ class CompileInsertTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ public function testInsertPluginCaching1_3() { - $this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); + $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/"); global $insertglobal; $insertglobal = 'changed global'; $this->smarty->caching = 1; @@ -124,14 +124,14 @@ class CompileInsertTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ public function testInsertPluginCaching1_4() { global $insertglobal; - $this->smarty->addPluginsDir(__DIR__ . "/PHPunitplugins/"); + $this->smarty->addPluginsDir(dirname(__FILE__) . "/PHPunitplugins/"); if (true) { //disabled $insertglobal = 'changed global 4'; $this->smarty->caching = 1; @@ -156,7 +156,7 @@ class CompileInsertTest extends PHPUnit_Smarty /** * test insert plugin caching 2 - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testInsertPluginCaching2_2() diff --git a/tests/UnitTests/TemplateSource/TagTests/Literal/LiteralTest.php b/tests/UnitTests/TemplateSource/TagTests/Literal/LiteralTest.php index 5d8b507e..6d333c0d 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Literal/LiteralTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Literal/LiteralTest.php @@ -17,7 +17,7 @@ class LiteralTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/Nocache/CompileNocacheTest.php b/tests/UnitTests/TemplateSource/TagTests/Nocache/CompileNocacheTest.php index 24e3c823..a0a7e373 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Nocache/CompileNocacheTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Nocache/CompileNocacheTest.php @@ -17,7 +17,7 @@ class CompileNocacheTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } @@ -59,7 +59,7 @@ class CompileNocacheTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ diff --git a/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php b/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php index 1463b5fd..c41d455e 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Php/CompilePhpTest.php @@ -18,7 +18,7 @@ class CompilePhpTest extends PHPUnit_Smarty public $loadSmartyBC = true; public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smartyBC->disableSecurity(); $this->smarty->disableSecurity(); $this->smarty->setCompileId($this->getName()); diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginBlock/PluginBlockTextformatTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginBlock/PluginBlockTextformatTest.php index f70d1a3f..8cc03c60 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginBlock/PluginBlockTextformatTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginBlock/PluginBlockTextformatTest.php @@ -19,7 +19,7 @@ class PluginBlockTextformatTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionFetchTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionFetchTest.php index 957bdcca..0625ce3d 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionFetchTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionFetchTest.php @@ -17,7 +17,7 @@ class PluginFunctionFetchTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testTodo() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlCheckboxesTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlCheckboxesTest.php index 2315b6e0..c9d8da21 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlCheckboxesTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlCheckboxesTest.php @@ -19,7 +19,7 @@ class PluginFunctionHtmlCheckboxesTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testAssociativeArray() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlImageTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlImageTest.php index b59fb02e..4293450f 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlImageTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlImageTest.php @@ -17,7 +17,7 @@ class PluginFunctionHtmlImageTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testFoo() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlOptionsTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlOptionsTest.php index b73240bb..5a3be66b 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlOptionsTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlOptionsTest.php @@ -19,7 +19,7 @@ class PluginFunctionHtmlOptionsTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testAssociativeArray() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlRadiosTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlRadiosTest.php index 0810d617..7a18351c 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlRadiosTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlRadiosTest.php @@ -18,7 +18,7 @@ class PluginFunctionHtmlRadiosTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testAssociativeArray() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlSelectDateTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlSelectDateTest.php index ba49d40a..baec7246 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlSelectDateTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlSelectDateTest.php @@ -209,7 +209,7 @@ class PluginFunctionHtmlSelectDateTest extends PHPUnit_Smarty public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $year = date('Y'); $this->now = mktime(15, 0, 0, 2, 20, $year); diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlSelectTimeTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlSelectTimeTest.php index 9ebcd784..f152a8e8 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlSelectTimeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionHtmlSelectTimeTest.php @@ -17,7 +17,7 @@ class PluginFunctionHtmlSelectTimeTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->now = mktime(16, 15, 11, 2, 20, 2011); } diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionMailtoTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionMailtoTest.php index 9a58a6ea..2ea16ce5 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionMailtoTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginFunction/PluginFunctionMailtoTest.php @@ -17,7 +17,7 @@ class PluginFunctionMailtoTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCapitalizeTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCapitalizeTest.php index 3bb60a19..184aa0ad 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCapitalizeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCapitalizeTest.php @@ -17,7 +17,7 @@ class PluginModifierCapitalizeTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); error_reporting(E_ALL & ~E_DEPRECATED | E_STRICT); } diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCharsetTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCharsetTest.php index ea82646f..fea90d39 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCharsetTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCharsetTest.php @@ -17,7 +17,7 @@ class PluginModifierCharsetTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testToLatin1() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountCharactersTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountCharactersTest.php index 1b87462d..fbe45be6 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountCharactersTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountCharactersTest.php @@ -17,7 +17,7 @@ class PluginModifierCountCharactersTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountSentencesTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountSentencesTest.php index 682006fc..60fa7f1e 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountSentencesTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountSentencesTest.php @@ -17,7 +17,7 @@ class PluginModifierCountSentencesTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountWordsTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountWordsTest.php index 06e0104e..44a76066 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountWordsTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCountWordsTest.php @@ -17,7 +17,7 @@ class PluginModifierCountWordsTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierEscapeTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierEscapeTest.php index cfc8e6af..9e070750 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierEscapeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierEscapeTest.php @@ -17,7 +17,7 @@ class PluginModifierEscapeTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testHtml() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierLowerTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierLowerTest.php index cab08b24..da0f8c2b 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierLowerTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierLowerTest.php @@ -16,7 +16,7 @@ class PluginModifierLowerTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierRegexReplaceTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierRegexReplaceTest.php index 6993cef8..036936e8 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierRegexReplaceTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierRegexReplaceTest.php @@ -17,7 +17,7 @@ class PluginModifierRegexReplaceTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierSpacifyTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierSpacifyTest.php index 08290fad..070e37e3 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierSpacifyTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierSpacifyTest.php @@ -17,7 +17,7 @@ class PluginModifierSpacifyTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierStripTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierStripTest.php index ea4d70b9..70408245 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierStripTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierStripTest.php @@ -17,7 +17,7 @@ class PluginModifierStripTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierTruncateTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierTruncateTest.php index fb88334e..071f1026 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierTruncateTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierTruncateTest.php @@ -17,7 +17,7 @@ class PluginModifierTruncateTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierUnescapeTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierUnescapeTest.php index 66b5b11e..5fac59ac 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierUnescapeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierUnescapeTest.php @@ -17,7 +17,7 @@ class PluginModifierUnescapeTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testHtml() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierUpperTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierUpperTest.php index 0090c77c..dd2c11c6 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierUpperTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierUpperTest.php @@ -17,7 +17,7 @@ class PluginModifierUpperTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierWordwrapTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierWordwrapTest.php index 8cab650d..96150691 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierWordwrapTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierWordwrapTest.php @@ -17,7 +17,7 @@ class PluginModifierWordwrapTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php b/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php index 5da926c1..4d4389a5 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php @@ -17,7 +17,7 @@ class CompileSectionTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } @@ -28,45 +28,39 @@ class CompileSectionTest extends PHPUnit_Smarty /** * test {section} tag */ - public function testSection1() + public function testSection_001() { - $tpl = $this->smarty->createTemplate('section1.tpl'); - $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); - $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); + $this->smarty->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); + $this->assertEquals("0123456789", $this->smarty->fetch('001_section.tpl')); } - public function testSection2() + public function testSection_002() { - $tpl = $this->smarty->createTemplate('section2.tpl'); - $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); - $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); + $this->smarty->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); + $this->assertEquals("0123456789", $this->smarty->fetch('002_section.tpl')); } - public function testSection3() + public function testSection_003() { - $tpl = $this->smarty->createTemplate('section3.tpl'); - $this->assertEquals("else", $this->smarty->fetch($tpl)); + $this->assertEquals("else", $this->smarty->fetch('003_section.tpl')); } - public function testSection4() + public function testSection_004() { - $tpl = $this->smarty->createTemplate('section4.tpl'); - $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); - $this->assertEquals("0123456789", $this->smarty->fetch($tpl)); + $this->smarty->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); + $this->assertEquals("0123456789", $this->smarty->fetch('004_section.tpl')); } - public function testSection6() + public function testSection_006() { - $tpl = $this->smarty->createTemplate('section6.tpl'); - $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); - $this->assertEquals("0123456789total10", $this->smarty->fetch($tpl)); + $this->smarty->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); + $this->assertEquals("0123456789total10", $this->smarty->fetch('006_section.tpl')); } - public function testSection7() + public function testSection_007() { - $tpl = $this->smarty->createTemplate('section7.tpl'); - $tpl->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); - $this->assertEquals("011223344556677889910", $this->smarty->fetch($tpl)); + $this->smarty->assign('foo', array(0,1,2,3,4,5,6,7,8,9)); + $this->assertEquals("011223344556677889910", $this->smarty->fetch('007_section.tpl')); } } diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/001_section.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/001_section.tpl new file mode 100644 index 00000000..50729b42 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/001_section.tpl @@ -0,0 +1 @@ +{section name=bar loop=$foo}{$foo[bar]}{/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/002_section.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/002_section.tpl new file mode 100644 index 00000000..be7d4559 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/002_section.tpl @@ -0,0 +1 @@ +{section name=bar loop=$foo start=$i}{$foo[bar]}{sectionelse} else {/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/003_section.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/003_section.tpl new file mode 100644 index 00000000..3dc172ea --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/003_section.tpl @@ -0,0 +1 @@ +{section name=bar loop=$foo}{$foo[bar]}{sectionelse}else{/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/004_section.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/004_section.tpl new file mode 100644 index 00000000..4a49fc9e --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/004_section.tpl @@ -0,0 +1 @@ +{section name=bar loop=$foo}{$foo[bar]}{sectionelse} else {/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/006_section.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/006_section.tpl new file mode 100644 index 00000000..edcd6c2e --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/006_section.tpl @@ -0,0 +1 @@ +{section name=bar loop=$foo}{$foo[bar]}{sectionelse} else {/section}total{$smarty.section.bar.total} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Section/templates/007_section.tpl b/tests/UnitTests/TemplateSource/TagTests/Section/templates/007_section.tpl new file mode 100644 index 00000000..6c5f9a99 --- /dev/null +++ b/tests/UnitTests/TemplateSource/TagTests/Section/templates/007_section.tpl @@ -0,0 +1 @@ +{section name=bar loop=$foo}{$smarty.section.bar.index}{$smarty.section.bar.iteration}{sectionelse} else {/section} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php b/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php index 13dcf723..5d147cdd 100644 --- a/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/SetFilter/CompileSetfilterTest.php @@ -17,7 +17,7 @@ class CompileSetfilterTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/Strip/CompileStripTest.php b/tests/UnitTests/TemplateSource/TagTests/Strip/CompileStripTest.php index 0785c328..72d29675 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Strip/CompileStripTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Strip/CompileStripTest.php @@ -17,7 +17,7 @@ class CompileStripTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php index 7467626d..25982b4f 100644 --- a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php @@ -17,7 +17,7 @@ class CompileFunctionTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/While/CompileWhileTest.php b/tests/UnitTests/TemplateSource/TagTests/While/CompileWhileTest.php index 44a04772..eeeb67a5 100644 --- a/tests/UnitTests/TemplateSource/TagTests/While/CompileWhileTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/While/CompileWhileTest.php @@ -17,7 +17,7 @@ class CompileWhileTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/_Attributes/AttributeTest.php b/tests/UnitTests/TemplateSource/TagTests/_Attributes/AttributeTest.php index 72e09895..f498adab 100644 --- a/tests/UnitTests/TemplateSource/TagTests/_Attributes/AttributeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/_Attributes/AttributeTest.php @@ -17,7 +17,7 @@ class AttributeTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/TagTests/_Error/CompileErrorTest.php b/tests/UnitTests/TemplateSource/TagTests/_Error/CompileErrorTest.php index 2798dae6..759188cf 100644 --- a/tests/UnitTests/TemplateSource/TagTests/_Error/CompileErrorTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/_Error/CompileErrorTest.php @@ -17,7 +17,7 @@ class CompileErrorTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/TagTests/_Print/PrintNocacheTest.php b/tests/UnitTests/TemplateSource/TagTests/_Print/PrintNocacheTest.php index f53aa68a..95bf5bee 100644 --- a/tests/UnitTests/TemplateSource/TagTests/_Print/PrintNocacheTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/_Print/PrintNocacheTest.php @@ -17,7 +17,7 @@ class PrintNocacheTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } @@ -56,7 +56,7 @@ class PrintNocacheTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testPrintNocacheCachingYes2() diff --git a/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php b/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php index 87d72c89..9032c7fd 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php @@ -17,7 +17,7 @@ class ArrayTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/ConstantsTest.php b/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/ConstantsTest.php index 812d1e70..3ab161b9 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/ConstantsTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/ConstantTests/ConstantsTest.php @@ -21,7 +21,7 @@ class ConstantsTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } diff --git a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/DoubleQuotedStringTest.php b/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/DoubleQuotedStringTest.php index 79845a4b..7581ffb3 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/DoubleQuotedStringTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/DoubleQuotedStringTest.php @@ -17,7 +17,7 @@ class DoubleQuotedStringTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php b/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php index 2d1cee8c..ff0b3a1c 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Math/MathTest.php @@ -17,7 +17,7 @@ class MathTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/Modifier/ModifierTest.php b/tests/UnitTests/TemplateSource/ValueTests/Modifier/ModifierTest.php index 0c5f6d60..7dca67d4 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Modifier/ModifierTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Modifier/ModifierTest.php @@ -17,7 +17,7 @@ class ModifierTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->enableSecurity(); } diff --git a/tests/UnitTests/TemplateSource/ValueTests/Objects/ObjectVariableTest.php b/tests/UnitTests/TemplateSource/ValueTests/Objects/ObjectVariableTest.php index bf1d0734..717b94e8 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Objects/ObjectVariableTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Objects/ObjectVariableTest.php @@ -17,7 +17,7 @@ class ObjectVariableTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->setForceCompile(true); } diff --git a/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/SingleQuotedStringTest.php b/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/SingleQuotedStringTest.php index f4f7ab37..41378e1b 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/SingleQuotedStringTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SingleQouted/SingleQuotedStringTest.php @@ -17,7 +17,7 @@ class SingleQuotedStringTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/SmartyConstantTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/SmartyConstantTest.php index 9500d336..179f7123 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/SmartyConstantTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/SmartyConstantTest.php @@ -17,7 +17,7 @@ class SmartyConstantTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/CookieTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/CookieTest.php index 291a2be5..cb92b776 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/CookieTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/CookieTest.php @@ -17,7 +17,7 @@ class CookieTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/SmartyDelimiterTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/SmartyDelimiterTest.php index a1076e6b..3a298362 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/SmartyDelimiterTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/SmartyDelimiterTest.php @@ -17,7 +17,7 @@ class SmartyDelimiterTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/SmartyErrorTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/SmartyErrorTest.php index a71923a2..b14c271c 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/SmartyErrorTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/SmartyErrorTest.php @@ -17,7 +17,7 @@ class SmartyErrorTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php index aee339f7..724f2bf5 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php @@ -17,7 +17,7 @@ class SmartyNowTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/PostTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/PostTest.php index 5827c123..a49e44d8 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/PostTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/PostTest.php @@ -17,7 +17,7 @@ class PostTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/SmartyTemplateObjectTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/SmartyTemplateObjectTest.php index 7e4ae14f..6f661b4d 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/SmartyTemplateObjectTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/SmartyTemplateObjectTest.php @@ -17,7 +17,7 @@ class SmartyTemplateObjectTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/SmartyVersionTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/SmartyVersionTest.php index 6100cc7e..733609a3 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/SmartyVersionTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/SmartyVersionTest.php @@ -17,7 +17,7 @@ class SmartyVersionTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/StreamVariableTest.php b/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/StreamVariableTest.php index 0829e592..670324f1 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/StreamVariableTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/StreamVariableTest.php @@ -17,7 +17,7 @@ class StreamVariableTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); stream_wrapper_register("var", "VariableStream") or die("Failed to register protocol"); diff --git a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableScope/VariableScopeTest.php b/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableScope/VariableScopeTest.php index a993034c..c35a8495 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableScope/VariableScopeTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableScope/VariableScopeTest.php @@ -17,7 +17,7 @@ class VariableScopeTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->assign('foo', 'bar'); } diff --git a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/VariableVariableTest.php b/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/VariableVariableTest.php index eb63207a..cbd7c662 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/VariableVariableTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/VariableVariableTest.php @@ -17,7 +17,7 @@ class VariableVariableTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); } public function testInit() diff --git a/tests/UnitTests/TemplateSource/Xml/XmlTest.php b/tests/UnitTests/TemplateSource/Xml/XmlTest.php index 33b60606..93592154 100644 --- a/tests/UnitTests/TemplateSource/Xml/XmlTest.php +++ b/tests/UnitTests/TemplateSource/Xml/XmlTest.php @@ -17,7 +17,7 @@ class XmlTest extends PHPUnit_Smarty { public function setUp() { - $this->setUpSmarty(__DIR__); + $this->setUpSmarty(dirname(__FILE__)); $this->smarty->enableSecurity(); $this->smarty->setForceCompile(true); }