Example #1
0
    public function testRenderingFromFile()
    {
        $renderer = new Sabel_View_Renderer();
        $path = MODULES_DIR_PATH . "/views/test.tpl";
        $result = $renderer->rendering(null, array("a" => "10", "b" => "20"), $path);
        $expected = <<<CONTENTS
a: 10<br/>
b: 20
CONTENTS;
        $this->assertEquals($expected, rtrim($result));
    }
Example #2
0
 public function rendering(Sabel_View_Location $location, array $assigns = array())
 {
     return $this->renderer->rendering($location->getContents(), $assigns, $location->getPath());
 }