function testHandlerUnknown() { $lang = new \Tempe\Lang\Basic([]); $parser = new \Tempe\Parser(); $renderer = new \Tempe\Renderer($lang); $this->setExpectedException("Tempe\\Exception\\Render", "Handler 'nope' not found at line 1"); $renderer->renderTree($parser->parse("{=nope}")); }
function testNoNodes() { $renderer = new Renderer(); $node = (object) ['type' => Renderer::P_VALUE]; $this->assertEmpty($renderer->renderTree($node)); }