mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Add support options for TestCas::exec
This commit is contained in:
parent
46f03c3bd2
commit
ed8098604b
@ -68,9 +68,11 @@ class TestCase extends \PHPUnit_Framework_TestCase {
|
|||||||
* @param string $code source of template
|
* @param string $code source of template
|
||||||
* @param array $vars variables of template
|
* @param array $vars variables of template
|
||||||
* @param string $result expected result.
|
* @param string $result expected result.
|
||||||
|
* @param int $options
|
||||||
* @param bool $dump dump source and result code (for debug)
|
* @param bool $dump dump source and result code (for debug)
|
||||||
*/
|
*/
|
||||||
public function exec($code, $vars, $result, $dump = false) {
|
public function exec($code, $vars, $result, $options = 0, $dump = false) {
|
||||||
|
$this->fenom->setOptions($options);
|
||||||
$tpl = $this->fenom->compileCode($code, "runtime.tpl");
|
$tpl = $this->fenom->compileCode($code, "runtime.tpl");
|
||||||
if($dump) {
|
if($dump) {
|
||||||
echo "\n========= DUMP BEGIN ===========\n".$code."\n--- to ---\n".$tpl->getBody()."\n========= DUMP END =============\n";
|
echo "\n========= DUMP BEGIN ===========\n".$code."\n--- to ---\n".$tpl->getBody()."\n========= DUMP END =============\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user