fenom/tests/cases/Fenom/CustomProviderTest.php

22 lines
609 B
PHP
Raw Normal View History

<?php
2013-06-28 11:53:53 +04:00
namespace Fenom;
2013-07-29 14:58:14 +04:00
class CustomProviderTest extends TestCase
{
2013-07-29 14:58:14 +04:00
public function setUp()
{
parent::setUp();
2013-07-29 14:58:14 +04:00
$this->fenom->addProvider("my", new Provider(FENOM_RESOURCES . '/provider'));
}
2013-07-29 14:58:14 +04:00
public function testCustom()
{
2013-09-14 11:24:23 +04:00
$this->assertTrue($this->fenom->templateExists('my:include.tpl'));
$this->assertFalse($this->fenom->templateExists('my:include-none.tpl'));
$this->assertRender("start: {include 'my:include.tpl'}", 'start: include template');
//$this->assertRender("start: {import 'my:macros.tpl' as ops} {ops.add a=3 b=6}");
}
}