2015-10-15 09:25:30 -04:00
|
|
|
<?php
|
|
|
|
|
2016-01-08 11:19:56 -05:00
|
|
|
include_once __DIR__ . "HttpViewTest.php";
|
2015-10-15 09:25:30 -04:00
|
|
|
|
2016-01-08 11:19:56 -05:00
|
|
|
class HtmlViewTest extends HttpViewTest {
|
2015-10-15 09:25:30 -04:00
|
|
|
|
2015-10-15 09:28:10 -04:00
|
|
|
protected $template_path;
|
2015-10-15 09:25:30 -04:00
|
|
|
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
$this->view = new TestHtmlView($this->container);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testRenderTemplate()
|
|
|
|
{
|
2016-01-06 15:44:40 -05:00
|
|
|
$path = _dir(self::TEST_VIEW_DIR, 'test_view.php');
|
2015-10-15 09:25:30 -04:00
|
|
|
$expected = '<tag>foo</tag>';
|
|
|
|
$actual = $this->view->render_template($path, [
|
|
|
|
'var' => 'foo'
|
|
|
|
]);
|
|
|
|
$this->assertEquals($expected, $actual);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|