2014-10-15 01:01:55 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Fenom;
|
|
|
|
|
|
|
|
|
|
|
|
class SandboxTest extends TestCase {
|
|
|
|
|
|
|
|
public function test()
|
|
|
|
{
|
|
|
|
|
|
|
|
// $this->assertEquals([1, 2, 4, "as" => 767, "df" => ["qert"]], [1, 2, 4, "as" => 767, "df" => ["qet"]]);
|
|
|
|
// $this->fenom->addBlockCompiler('php', 'Fenom\Compiler::nope', function ($tokens, Tag $tag) {
|
|
|
|
// return '<?php ' . $tag->cutContent();
|
|
|
|
// });
|
|
|
|
// $this->tpl('welcome.tpl', '{$a}');
|
|
|
|
// try {
|
2015-01-07 15:24:57 +03:00
|
|
|
// var_dump($this->fenom->compileCode('{for $i=0 to 3} {/for}')->getBody());
|
2014-10-15 01:01:55 +04:00
|
|
|
// } catch (\Exception $e) {
|
|
|
|
// print_r($e->getMessage() . "\n" . $e->getTraceAsString());
|
|
|
|
// while ($e->getPrevious()) {
|
|
|
|
// $e = $e->getPrevious();
|
|
|
|
// print_r("\n\n" . $e->getMessage() . " in {$e->getFile()}:{$e->getLine()}\n" . $e->getTraceAsString());
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|