test TestLoop on Tpex

This commit is contained in:
Manuel Raynaud
2013-03-18 10:57:25 +01:00
parent 8aaac2c5a2
commit 519d100d54
4 changed files with 25 additions and 4 deletions

View File

@@ -159,8 +159,11 @@ class Parser implements ParserInterface
array(), array(),
array( array(
"secure" => "Thelia\Core\Template\BaseParam\Secure" "secure" => "Thelia\Core\Template\BaseParam\Secure"
) ),
); array(
"equal" => "Test\TestLoop\Equal"
)
);
$this->setContent($tpex->execute()); $this->setContent($tpex->execute());
} }

View File

@@ -0,0 +1,14 @@
<?php
namespace Test\TestLoop;
use Thelia\Tpex\Element\TestLoop\BaseTestLoop;
class Equal extends BaseTestLoop
{
public function exec($variable, $value)
{
return $variable == $value;
}
}

View File

@@ -15,7 +15,11 @@
</THELIA_FU> </THELIA_FU>
</THELIA_FOO> </THELIA_FOO>
<TEST_equel test="equal" variable="3" value="1">
test vrai
</TEST_equel>
test faux
<//TEST_equel>
<REM> <REM>
<REPEAT_loopy start="1" end="5" increment="2"> <REPEAT_loopy start="1" end="5" increment="2">
Compteur = #INDEX<br /> Compteur = #INDEX<br />