From 1ef29b65eab3faec909f7ec07fe55adfc4b69a0e Mon Sep 17 00:00:00 2001 From: Simon Wisselink Date: Tue, 31 Jan 2023 10:52:56 +0100 Subject: [PATCH] move test methods because some other test methods rely on their relative positions --- .../RegisterBlock/RegisterBlockTest.php | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php b/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php index 65dadf68..1a0564eb 100644 --- a/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php +++ b/tests/UnitTests/SmartyMethodsTests/RegisterBlock/RegisterBlockTest.php @@ -111,22 +111,6 @@ class RegisterBlockTest extends PHPUnit_Smarty $this->assertEquals('1 10 100', $this->smarty->fetch('test_register_block.tpl')); } - - /** - * test register block with handler that supports positional params - */ - public function testRegisterBlockWithPositionalParams() - { - $this->cleanDirs(); - $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER, 'testblock', blockparamsCompiler::class); - $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER, 'testblockclose', blockparamsCompiler::class); - $result = $this->smarty->fetch('string:{testblock "foo" "bar"} block - contents - {/testblock}'); - $this->assertStringContainsString('first', $result); - $this->assertStringContainsString('second', $result); - } - /** * * @@ -251,6 +235,21 @@ class RegisterBlockTest extends PHPUnit_Smarty $this->assertEquals('3 30 300', $this->smarty->fetch('test_register_block.tpl')); } + /** + * test register block with handler that supports positional params + */ + public function testRegisterBlockWithPositionalParams() + { + $this->cleanDirs(); + $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER, 'testblock', blockparamsCompiler::class); + $this->smarty->registerPlugin(Smarty::PLUGIN_COMPILER, 'testblockclose', blockparamsCompiler::class); + $result = $this->smarty->fetch('string:{testblock "foo" "bar"} block + contents + {/testblock}'); + $this->assertStringContainsString('first', $result); + $this->assertStringContainsString('second', $result); + } + /** * test unregister->block method */