mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-02 17:34:26 +02:00
move test methods because some other test methods rely on their relative positions
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user