mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
27 lines
719 B
PHP
27 lines
719 B
PHP
|
<?php
|
||
|
|
||
|
namespace Cytro;
|
||
|
|
||
|
|
||
|
class CommentTest extends TestCase {
|
||
|
|
||
|
/**
|
||
|
* @dataProvider providerScalars
|
||
|
*/
|
||
|
public function testInline($tpl_val) {
|
||
|
$this->assertRender("before {* $tpl_val *} after", "before after");
|
||
|
$this->assertRender("before {* {{$tpl_val}} {{$tpl_val}} *} after", "before after");
|
||
|
$this->assertRender("before {*{{$tpl_val}}*} after", "before after");
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @dataProvider providerScalars
|
||
|
*/
|
||
|
public function testMultiLine($tpl_val) {
|
||
|
$this->assertRender(
|
||
|
"before-1\nbefore-2 {* before-3\nbefore-4 $tpl_val after-1\nafter-2 *} after-3\nafter-4{* dummy *}\nafter-5",
|
||
|
"before-1\nbefore-2 after-3\nafter-4\nafter-5"
|
||
|
);
|
||
|
}
|
||
|
|
||
|
}
|