From 507b96a5716e96d545b41c0ed3228d84ac00b71e Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Wed, 18 Oct 2017 12:59:55 +0200 Subject: [PATCH] remove E_DEPRECATED for PHP 5.2 compatibility restore @runTestsInSeparateProcess --- tests/PHPUnit_Smarty.php | 2 +- tests/UnitTests/A_0/PathNormalization/cache/dummy.txt | 1 + .../A_0/PathNormalization/templates_c/dummy.txt | 1 + tests/UnitTests/A_Core/LoadPlugin/IncludePathTest.php | 2 +- .../Custom/Ambiguous/CustomResourceAmbiguousTest.php | 2 +- tests/UnitTests/SecurityTests/SecurityTest.php | 2 +- .../TagTests/BlockPlugin/CompileBlockPluginTest.php | 2 +- .../TagTests/ConfigLoad/CompileConfigLoadTest.php | 10 +++++----- .../TemplateSource/TagTests/Php/cache/dummy.txt | 1 + .../TemplateSource/TagTests/Php/templates_c/dummy.txt | 1 + .../PluginModifier/PluginModifierCapitalizeTest.php | 1 - .../TagTests/TemplateFunction/CompileFunctionTest.php | 8 ++++---- tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php | 4 ++-- 13 files changed, 20 insertions(+), 17 deletions(-) diff --git a/tests/PHPUnit_Smarty.php b/tests/PHPUnit_Smarty.php index 3f411651..ea0701f0 100644 --- a/tests/PHPUnit_Smarty.php +++ b/tests/PHPUnit_Smarty.php @@ -88,7 +88,7 @@ class PHPUnit_Smarty extends PHPUnit_Framework_TestCase */ public static function setUpBeforeClass() { - error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); + error_reporting(E_ALL & ~E_STRICT); self::$init = true; self::$pluginsdir =self::getSmartyPluginsDir(); } diff --git a/tests/UnitTests/A_0/PathNormalization/cache/dummy.txt b/tests/UnitTests/A_0/PathNormalization/cache/dummy.txt index e69de29b..2995a4d0 100644 --- a/tests/UnitTests/A_0/PathNormalization/cache/dummy.txt +++ b/tests/UnitTests/A_0/PathNormalization/cache/dummy.txt @@ -0,0 +1 @@ +dummy \ No newline at end of file diff --git a/tests/UnitTests/A_0/PathNormalization/templates_c/dummy.txt b/tests/UnitTests/A_0/PathNormalization/templates_c/dummy.txt index e69de29b..2995a4d0 100644 --- a/tests/UnitTests/A_0/PathNormalization/templates_c/dummy.txt +++ b/tests/UnitTests/A_0/PathNormalization/templates_c/dummy.txt @@ -0,0 +1 @@ +dummy \ No newline at end of file diff --git a/tests/UnitTests/A_Core/LoadPlugin/IncludePathTest.php b/tests/UnitTests/A_Core/LoadPlugin/IncludePathTest.php index b5beec20..9cacdeed 100644 --- a/tests/UnitTests/A_Core/LoadPlugin/IncludePathTest.php +++ b/tests/UnitTests/A_Core/LoadPlugin/IncludePathTest.php @@ -5,7 +5,7 @@ * * @package PHPunit * @author Rodney Rehm - * @run TestsInSeparateProcess + * @runTestsInSeparateProcess * @preserveGlobalState disabled * @backupStaticAttributes enabled */ diff --git a/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php b/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php index 63b4bfe1..b16af7dc 100644 --- a/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php +++ b/tests/UnitTests/ResourceTests/Custom/Ambiguous/CustomResourceAmbiguousTest.php @@ -97,7 +97,7 @@ class CustomResourceAmbiguousTest extends PHPUnit_Smarty /** * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ diff --git a/tests/UnitTests/SecurityTests/SecurityTest.php b/tests/UnitTests/SecurityTests/SecurityTest.php index 5b3ff306..c449e16d 100644 --- a/tests/UnitTests/SecurityTests/SecurityTest.php +++ b/tests/UnitTests/SecurityTests/SecurityTest.php @@ -166,7 +166,7 @@ class SecurityTest extends PHPUnit_Smarty */ public function testAllowedModifier1() { - error_reporting(E_ALL & ~E_DEPRECATED | E_STRICT); + error_reporting(E_ALL & E_STRICT); $this->smarty->security_policy->allowed_modifiers = array('capitalize'); $this->assertEquals("Hello World", $this->smarty->fetch('eval:{"hello world"|capitalize}')); error_reporting(E_ALL | E_STRICT); diff --git a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php b/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php index c7226f03..062f365d 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/BlockPlugin/CompileBlockPluginTest.php @@ -255,7 +255,7 @@ class CompileBlockPluginTest extends PHPUnit_Smarty /** * test tag stack * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * */ diff --git a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php index 610c7f35..50a8a321 100644 --- a/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/ConfigLoad/CompileConfigLoadTest.php @@ -37,7 +37,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test {load_config} loading section2 @@ -47,7 +47,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty $this->assertEquals("Welcome to Smarty! Global Section1 Hello Section2", $this->smarty->fetch('001_section2.tpl')); } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test {load_config} loading section2 @@ -59,7 +59,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * * test {load_config} loading section2 @@ -104,7 +104,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableOverwrite_006() @@ -112,7 +112,7 @@ class CompileConfigLoadTest extends PHPUnit_Smarty $this->assertEquals("Welcome to Smarty! Overwrite3", $this->smarty->fetch('006_overwrite.tpl')); } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled */ public function testConfigVariableOverwrite_0061() diff --git a/tests/UnitTests/TemplateSource/TagTests/Php/cache/dummy.txt b/tests/UnitTests/TemplateSource/TagTests/Php/cache/dummy.txt index e69de29b..2995a4d0 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Php/cache/dummy.txt +++ b/tests/UnitTests/TemplateSource/TagTests/Php/cache/dummy.txt @@ -0,0 +1 @@ +dummy \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/Php/templates_c/dummy.txt b/tests/UnitTests/TemplateSource/TagTests/Php/templates_c/dummy.txt index e69de29b..2995a4d0 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Php/templates_c/dummy.txt +++ b/tests/UnitTests/TemplateSource/TagTests/Php/templates_c/dummy.txt @@ -0,0 +1 @@ +dummy \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCapitalizeTest.php b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCapitalizeTest.php index 184aa0ad..8bc697eb 100644 --- a/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCapitalizeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/PluginModifier/PluginModifierCapitalizeTest.php @@ -18,7 +18,6 @@ class PluginModifierCapitalizeTest extends PHPUnit_Smarty public function setUp() { $this->setUpSmarty(dirname(__FILE__)); - error_reporting(E_ALL & ~E_DEPRECATED | E_STRICT); } public function testDefault() diff --git a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php index deba7e96..3ed225b6 100644 --- a/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/TemplateFunction/CompileFunctionTest.php @@ -39,7 +39,7 @@ class CompileFunctionTest extends PHPUnit_Smarty $this->assertEquals("default param default 1 2 1", $this->smarty->fetch('test_template_function_001.tpl'), $text); } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * @dataProvider functionProvider * test simple function call tag @@ -82,7 +82,7 @@ class CompileFunctionTest extends PHPUnit_Smarty /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * @dataProvider functionProvider * test simple function call tag cached no cache default variable @@ -181,7 +181,7 @@ class CompileFunctionTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * @dataProvider functionProviderInline * test function definition in include @@ -214,7 +214,7 @@ class CompileFunctionTest extends PHPUnit_Smarty } /** - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * test external function definition and called by fetch * diff --git a/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php b/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php index c73e6ed6..acde1043 100644 --- a/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php +++ b/tests/UnitTests/TemplateSource/X_Scopes/ScopeTest.php @@ -31,7 +31,7 @@ class ScopeTest extends PHPUnit_Smarty /** * Test scope * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * @dataProvider dataTestAppendScope */ @@ -173,7 +173,7 @@ class ScopeTest extends PHPUnit_Smarty /** * Test scope * - * @run InSeparateProcess + * @runInSeparateProcess * @preserveGlobalState disabled * @dataProvider dataTestIncludeScope */