diff options
Diffstat (limited to 'tests/UnitTests/Compiler')
4 files changed, 35 insertions, 41 deletions
diff --git a/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php b/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php index e28b35e8..ba747981 100644 --- a/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php +++ b/tests/UnitTests/Compiler/CompilerPlugin/CompileCompilerPluginTest.php @@ -2,16 +2,16 @@ /** * Smarty PHPunit tests compilation of compiler plugins * - * @package PHPunit + * @author Uwe Tews */ /** * class for compiler plugin tests * - * @runTestsInSeparateProcess - * @preserveGlobalState disabled - * @backupStaticAttributes enabled + * + * + * */ class CompileCompilerPluginTest extends PHPUnit_Smarty { @@ -30,8 +30,8 @@ class CompileCompilerPluginTest extends PHPUnit_Smarty */ public function testCompilerPluginFunction() { - $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER, 'compilerplugin', 'mycompilerplugin'); - $this->smarty->compile_id = 'function'; + $this->smarty->registerPlugin(\Smarty\Smarty::PLUGIN_COMPILER, 'compilerplugin', 'mycompilerplugin'); + $this->smarty->setCompileId('function'); $this->assertEquals("Hello World", $this->smarty->fetch('compilerplugintest.tpl')); } /** @@ -39,8 +39,8 @@ class CompileCompilerPluginTest extends PHPUnit_Smarty */ public function testCompilerPluginClassStatic() { - $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER, 'compilerplugin', array('CompilerPluginClass', 'statCompile')); - $this->smarty->compile_id = 'static'; + $this->smarty->registerPlugin(\Smarty\Smarty::PLUGIN_COMPILER, 'compilerplugin', array('CompilerPluginClass', 'statCompile')); + $this->smarty->setCompileId('static'); $this->assertEquals("Static World", $this->smarty->fetch('compilerplugintest.tpl')); } /** @@ -49,8 +49,8 @@ class CompileCompilerPluginTest extends PHPUnit_Smarty public function testCompilerPluginClassObject() { $plugin = new CompilerPluginClass; - $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER, 'compilerplugin', array($plugin, 'compile')); - $this->smarty->compile_id = 'object'; + $this->smarty->registerPlugin(\Smarty\Smarty::PLUGIN_COMPILER, 'compilerplugin', array($plugin, 'compile')); + $this->smarty->setCompileId('object'); $this->assertEquals("Public World", $this->smarty->fetch('compilerplugintest.tpl')); } } diff --git a/tests/UnitTests/Compiler/Delimiter/AutoLiteralTest.php b/tests/UnitTests/Compiler/Delimiter/AutoLiteralTest.php index d359ba63..40d21653 100644 --- a/tests/UnitTests/Compiler/Delimiter/AutoLiteralTest.php +++ b/tests/UnitTests/Compiler/Delimiter/AutoLiteralTest.php @@ -2,15 +2,15 @@ /** * Smarty PHPunit tests of delimiter * - * @package PHPunit + * @author Uwe Tews */ /** * class for delimiter tests * - * @preserveGlobalState disabled - * @backupStaticAttributes enabled + * + * */ class AutoliteralTest extends PHPUnit_Smarty { @@ -44,8 +44,6 @@ class AutoliteralTest extends PHPUnit_Smarty } /** * test '{ ' delimiter in double quotes auto_literal true - * @runInSeparateProcess - * */ public function testSetAutoliteralDoublequote() { @@ -54,8 +52,6 @@ class AutoliteralTest extends PHPUnit_Smarty } /** * test '{ ' delimiter in double quotes auto_literal false - * @runInSeparateProcess - * */ public function testSetAutoliteralDoublequote2() { @@ -66,8 +62,6 @@ class AutoliteralTest extends PHPUnit_Smarty /** * test '{{ ' delimiter in double quotes auto_literal true - * @runInSeparateProcess - * */ public function testSetAutoliteralDoublequote3() { diff --git a/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php b/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php index 06d5c6f3..4092d9fb 100644 --- a/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php +++ b/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php @@ -2,16 +2,16 @@ /** * Smarty PHPunit tests of delimiter * - * @package PHPunit + * @author Uwe Tews */ /** * class for delimiter tests * - * @runTestsInSeparateProcess - * @preserveGlobalState disabled - * @backupStaticAttributes enabled + * + * + * */ class DelimiterTest extends PHPUnit_Smarty { @@ -30,8 +30,8 @@ class DelimiterTest extends PHPUnit_Smarty */ public function testDelimiter1() { - $this->smarty->left_delimiter = '<{'; - $this->smarty->right_delimiter = '}>'; + $this->smarty->setLeftDelimiter('<{'); + $this->smarty->setRightDelimiter('}>'); $tpl = $this->smarty->createTemplate('eval:start <{* comment *}>hello <{if true}><{"world"}><{/if}> end'); $this->assertEquals("start hello world end", $this->smarty->fetch($tpl)); } @@ -40,8 +40,8 @@ class DelimiterTest extends PHPUnit_Smarty */ public function testDelimiter10() { - $this->smarty->left_delimiter = '<'; - $this->smarty->right_delimiter = '>'; + $this->smarty->setLeftDelimiter('<'); + $this->smarty->setRightDelimiter('>'); $tpl = $this->smarty->createTemplate('eval:start <* comment *>hello <if 1 < 2><"world"></if> end'); $this->assertEquals("start hello world end", $this->smarty->fetch($tpl)); } @@ -51,8 +51,8 @@ class DelimiterTest extends PHPUnit_Smarty */ public function testDelimiter2() { - $this->smarty->left_delimiter = '<-{'; - $this->smarty->right_delimiter = '}->'; + $this->smarty->setLeftDelimiter('<-{'); + $this->smarty->setRightDelimiter('}->'); $tpl = $this->smarty->createTemplate('eval:<-<-{* comment *}-><-{if true}-><-{"hello world"}-><-{/if}->->'); $this->assertEquals("<-hello world->", $this->smarty->fetch($tpl)); } @@ -62,8 +62,8 @@ class DelimiterTest extends PHPUnit_Smarty */ public function testDelimiter3() { - $this->smarty->left_delimiter = '<--{'; - $this->smarty->right_delimiter = '}-->'; + $this->smarty->setLeftDelimiter('<--{'); + $this->smarty->setRightDelimiter('}-->'); $tpl = $this->smarty->createTemplate('eval:<--{* comment *}--><--{if true}--><--{"hello world"}--><--{/if}-->'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } @@ -73,8 +73,8 @@ class DelimiterTest extends PHPUnit_Smarty */ public function testDelimiter4() { - $this->smarty->left_delimiter = '{{'; - $this->smarty->right_delimiter = '}}'; + $this->smarty->setLeftDelimiter('{{'); + $this->smarty->setRightDelimiter('}}'); $tpl = $this->smarty->createTemplate('eval:{{* comment *}}{{if true}}{{"hello world"}}{{/if}}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } @@ -84,8 +84,8 @@ class DelimiterTest extends PHPUnit_Smarty */ public function testDelimiter5() { - $this->smarty->left_delimiter = '{='; - $this->smarty->right_delimiter = '=}'; + $this->smarty->setLeftDelimiter('{='); + $this->smarty->setRightDelimiter('=}'); $tpl = $this->smarty->createTemplate('eval:{=assign var=foo value="hello world" nocache=}{=$foo=}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } @@ -94,8 +94,8 @@ class DelimiterTest extends PHPUnit_Smarty */ public function testDelimiterIssue450() { - $this->smarty->left_delimiter = '{^'; - $this->smarty->right_delimiter = '^}'; + $this->smarty->setLeftDelimiter('{^'); + $this->smarty->setRightDelimiter('^}'); $tpl = $this->smarty->createTemplate('eval:{^assign var=foo value="hello world" nocache^}{^$foo^}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } diff --git a/tests/UnitTests/Compiler/Delimiter/UserLiteralTest.php b/tests/UnitTests/Compiler/Delimiter/UserLiteralTest.php index 52308a20..33a17eea 100644 --- a/tests/UnitTests/Compiler/Delimiter/UserLiteralTest.php +++ b/tests/UnitTests/Compiler/Delimiter/UserLiteralTest.php @@ -2,16 +2,16 @@ /** * Smarty PHPunit tests of delimiter * - * @package PHPunit + * @author Uwe Tews */ /** * class for delimiter tests * - * @runTestsInSeparateProcess - * @preserveGlobalState disabled - * @backupStaticAttributes enabled + * + * + * */ class UserliteralTest extends PHPUnit_Smarty { |
