HummingBirdAnimeClient/tests/Ion/View/HtmlViewTest.php

25 lines
464 B
PHP
Raw Normal View History

2015-10-15 09:25:30 -04:00
<?php
include_once __DIR__ . "/../ViewTest.php";
class HtmlViewTest extends ViewTest {
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()
{
2015-10-19 12:50:46 -04:00
$path = _dir(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);
}
}