Redirect test temp dirs to system temp directory. Fixes #1178#1179
Redirect test temp dirs to system temp directory. Fixes #1178#1179
Conversation
Move all test-generated output (compiled templates, cache files, and temporary template sources) from per-test-directory folders inside the working tree to a parallel structure under sys_get_temp_dir()/smarty-tests/. This removes 215 boilerplate .gitignore files from the repo and ensures running the test suite leaves zero uncommitted files in the working tree. All 2296 tests continue to pass with identical behavior.
There was a problem hiding this comment.
Pull request overview
Moves all PHPUnit-generated Smarty output (compiled templates, cache, and temporary template sources) out of the working tree into a mirrored directory structure under sys_get_temp_dir()/smarty-tests/, eliminating a large number of per-test .gitignore placeholders and keeping the repo clean after running tests.
Changes:
- Introduce temp-root computation in
PHPUnit_Smartyand redirectcompile_dir,cache_dir, andtemplates_tmpthere. - Update affected tests to use
$this->getTemplatesTmpDir()(andself::$tempBasewhere needed) instead of./templates_tmp. - Clean/recreate the shared test temp root at bootstrap and add broader ignore rules as a safety net.
Reviewed changes
Copilot reviewed 243 out of 244 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/UnitTests/TemplateSource/Xml/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/Xml/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/X_Scopes/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/X_Scopes/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/X_Scopes/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Variables/VariableVariable/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Variables/Stream/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Version/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/TemplateObject/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Post/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Delimiter/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Cookie/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Constant/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SingleQouted/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/SingleQouted/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/PHPfunctions/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Operators/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Objects/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Objects/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Modifier/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Modifier/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Modifier/ModifierTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/ValueTests/Modifier/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Math/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Math/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/DoubleQuotedStringTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/ValueTests/DoubleQuoted/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/ConstantTests/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/ConstantTests/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/BoolenNull/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/BoolenNull/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Array/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Array/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Array/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/ValueTests/Array/ArrayTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/While/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/While/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/While/CompileWhileTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/While/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/TemplateFunction/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/TemplateFunction/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/TemplateFunction/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Strip/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Strip/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Strip/CompileStripTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/SetFilter/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/SetFilter/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Section/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Section/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Section/CompileSectionTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/Section/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/PluginModifier/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/PluginModifier/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/PluginFunction/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/PluginFunction/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/PluginBlock/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/PluginBlock/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Nocache/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Nocache/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Literal/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Literal/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Include/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Include/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/Include/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/If/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/If/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/If/CompileIfTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/If/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/FunctionPlugin/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Foreach/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Foreach/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Foreach/CompileForeachTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/Foreach/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/For/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/For/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/For/CompileForTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/For/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Eval/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Eval/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Delimiter/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Delimiter/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/ConfigLoad/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/ConfigLoad/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/CompilerPlugin/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Capture/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Capture/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Capture/CompileCaptureTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/Capture/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/break/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/break/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_c/mustcompile/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/BockExtend/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php | Use temp templates_tmp dir via getTemplatesTmpDir() and temp compile dir base. |
| tests/UnitTests/TemplateSource/TagTests/BockExtend/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/BlockPlugin/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/BlockPlugin/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/BlockPlugin/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Assign/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Assign/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Assign/CompileAssignTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/Assign/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Append/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Append/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/Append/CompileAppendTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/Append/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/_Print/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/_Print/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/_Print/PrintTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/TagTests/_Print/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/_Error/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/_Error/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/_Attributes/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/TagTests/_Attributes/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/StaticClass/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/StaticClass/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/Spacing/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/Spacing/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/Spacing/SpacingTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/Spacing/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/Comments/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/Comments/CommentsTest.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/Comments/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/topic26878/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/topic26878/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/topic26878/NewlineSpacing.php | Use temp templates_tmp dir via getTemplatesTmpDir(). |
| tests/UnitTests/TemplateSource/_Issues/topic26878/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/TooManyShorthandAttributes949Test.php | Use shared setUpSmarty() fixture instead of a bespoke Smarty instance. |
| tests/UnitTests/TemplateSource/_Issues/549/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/549/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/428/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/428/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/422/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/422/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/419/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/419/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/327/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/TemplateSource/_Issues/327/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/TemplateExist/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/TemplateExist/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterObject/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterObject/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterModifier/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterModifier/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterFunction/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterFunction/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterCompiler/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterCompiler/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterBlock/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/RegisterBlock/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/CompileCheck/templates_tmp/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/CompileCheck/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/CompileCheck/CompileCheckTest.php | Write generated templates into temp templates_tmp and reset compile/cache dirs to temp base. |
| tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/ClearCompiledTemplate/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/ClearAssign/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/ClearAssign/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/ClearAllAssign/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/ClearAllAssign/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/Assign/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/Assign/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/Append/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SmartyMethodsTests/Append/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SecurityTests/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/SecurityTests/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/String/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/String/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Stream/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Stream/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/ResourcePlugins/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/ResourcePlugins/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Registered/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Registered/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/FileIndexed/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/FileIndexed/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/File/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/File/FileResourceTest.php | Ensure new Smarty instances in tests use temp compile/cache dirs via self::$tempBase. |
| tests/UnitTests/ResourceTests/File/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Extends/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Extends/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Eval/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Eval/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/DefaultHandler/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/DefaultHandler/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Custom/DemoPluginExtendsAll/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Custom/Ambiguous/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ResourceTests/Custom/Ambiguous/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ConfigFileTests/file/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/ConfigFileTests/defaultHandler/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/Compiler/Delimiter/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/Compiler/Delimiter/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/Compiler/CompilerPlugin/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/Compiler/CompilerPlugin/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/CacheResourceTests/Registered/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/CacheResourceTests/Mysql/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/CacheResourceTests/Mysql/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/CacheResourceTests/Memcache/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/CacheResourceTests/File/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/CacheResourceTests/File/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/CacheModify/ModifiedSince/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/CacheModify/ModifiedSince/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_Core/LoadPlugin/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_Core/LoadPlugin/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_Core/GetterSetter/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_Core/GetterSetter/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_Core/Filter/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_Core/Filter/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_Core/AutoEscape/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_Core/AutoEscape/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_2/UndefinedTemplateVar/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_2/UndefinedTemplateVar/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_1/ProtectedFolderVars/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_0/PathNormalization/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/UnitTests/A_0/PathNormalization/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/templates_c/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/PHPUnit_Smarty.php | Centralize sys-temp mapping and update fixture helpers to create/write under temp base. |
| tests/cache/.gitignore | Remove now-unneeded placeholder ignore file (output moved to sys temp). |
| tests/Bootstrap.php | Clean and recreate the test temp root under system temp at startup. |
| .gitignore | Add safety-net ignores for compiled/cache/test-temp directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
getTempDir() now appends a per-class uniqid token to the temp path, so concurrent or sequential test runs never share compiled/cached output. The token is generated lazily on first use and reset in tearDownAfterClass(), giving every test class a fresh isolated directory. As a result, the Bootstrap.php pre-run cleanup of smarty-tests/ is no longer needed for correctness (stale paths are unreachable) and was harmful to concurrent runs, so it has been removed.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 299 out of 324 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…Dirs()
- Remove the never-active individualFolders code path from setUpSmarty()
(the constant was always true, making the branch unreachable)
- Remove define('individualFolders') from Config.php and the constructor
- Remove $this->assertTrue(true) from cleanDirs(): it existed solely to
make testInit() count as a passing test; now that cleanDirs() is called
from setUpSmarty() and from test methods directly, the assertion was
spuriously inflating assertion counts
- Add tests/**/templates_c/, cache/, templates_tmp/ to .gitignore to
prevent stale test output from appearing as untracked files
Add a private static removeDir() helper and call it from tearDownAfterClass() to recursively delete the per-class unique temp directory after each test class finishes. Cleanup failures are silently ignored (@ suppression) so they never cause test failures. Set KEEP_SMARTY_TEST_ARTIFACTS=1 in the environment to skip cleanup and keep the artifacts on disk for debugging.
… folder, no longer required calls to add template folders et cetera
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 290 out of 352 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move all test-generated output (compiled templates, cache files, and temporary template sources) from per-test-directory folders inside the working tree to a parallel structure under sys_get_temp_dir()/smarty-tests/.
This removes 215 boilerplate .gitignore files from the repo and ensures running the test suite leaves zero uncommitted files in the working tree.
All 2296 tests continue to pass with identical behavior.