mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
issue 190 : add a test case for cond syntax
issue 183 : add a test case for loop syntax git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9589 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
43fe125696
commit
31eb3c76e7
1 changed files with 10 additions and 0 deletions
|
|
@ -199,6 +199,16 @@ class TemplateHandlerTest extends PHPUnit_Framework_TestCase
|
|||
'<div cond="$ii < $nn" loop="$dummy => $k, $v">Hello, world!</div>',
|
||||
'<?php if($__Context->ii < $__Context->nn){ ?><?php if($__Context->dummy&&count($__Context->dummy))foreach($__Context->dummy as $__Context->k=>$__Context->v){ ?><div>Hello, world!</div><?php }} ?>'
|
||||
),
|
||||
// issue 190
|
||||
array(
|
||||
'<div cond="!($i >= $n)" loop="$dummy => $k, $v">Hello, world!</div>',
|
||||
'<?php if(!($__Context->i >= $__Context->n)){ ?><?php if($__Context->dummy&&count($__Context->dummy))foreach($__Context->dummy as $__Context->k=>$__Context->v){ ?><div>Hello, world!</div><?php }} ?>'
|
||||
),
|
||||
// issue 183
|
||||
array(
|
||||
'<table><thead><tr><th loop="$vvvls => $vvv">{$vvv}</th></tr></thead>'."\n".'<tbody><tr><td>C</td><td>D</td></tr></tbody></table>',
|
||||
'<table><thead><tr><?php if($__Context->vvvls&&count($__Context->vvvls))foreach($__Context->vvvls as $__Context->vvv){ ?><th><?php echo $__Context->vvv ?></th><?php } ?></tr></thead>'."\n".'<tbody><tr><td>C</td><td>D</td></tr></tbody></table>'
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue