Skip to content
Snippets Groups Projects
Commit bfe05e5b authored by dyszczo's avatar dyszczo
Browse files

renderer tests

parent fde3789b
No related branches found
No related tags found
2 merge requests!8feat/woo template,!3Feature/implementation
<?php
use WPDesk\View\Resolver\ChainResolver;
use WPDesk\View\Resolver\Exception\CanNotResolve;
use WPDesk\View\Resolver\NullResolver;
class TestSimplePhpRenderer extends \PHPUnit\Framework\TestCase
{
const TEXT_IN_TEMPLATE = 'outputText';
const TEMPLATE_NAME = 'some_template';
const TEMPLATE_DIR = '/templates';
public function testRenderWithDirResolver()
{
$renderer = new \WPDesk\View\Renderer\SimplePhpRenderer(new \WPDesk\View\Resolver\DirResolver(__DIR__ . self::TEMPLATE_DIR));
$this->assertEquals(self::TEXT_IN_TEMPLATE, $renderer->render(self::TEMPLATE_NAME));
}
}
\ No newline at end of file
<?php
echo 'outputText';
\ No newline at end of file
<?php
echo 'outputText';
\ No newline at end of file
this is dummy text
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment