2013-05-30 19:00:00 +04:00
|
|
|
<?php
|
|
|
|
|
2013-06-28 11:53:53 +04:00
|
|
|
namespace Fenom;
|
2013-05-30 19:00:00 +04:00
|
|
|
|
|
|
|
|
2013-07-29 14:58:14 +04:00
|
|
|
class CustomProviderTest extends TestCase
|
|
|
|
{
|
2013-05-30 19:00:00 +04:00
|
|
|
|
2013-07-29 14:58:14 +04:00
|
|
|
public function setUp()
|
|
|
|
{
|
2013-05-30 19:00:00 +04:00
|
|
|
parent::setUp();
|
2013-07-29 14:58:14 +04:00
|
|
|
$this->fenom->addProvider("my", new Provider(FENOM_RESOURCES . '/provider'));
|
2013-05-30 19:00:00 +04:00
|
|
|
}
|
|
|
|
|
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'));
|
2013-05-30 19:00:00 +04:00
|
|
|
$this->assertRender("start: {include 'my:include.tpl'}", 'start: include template');
|
2015-01-08 15:52:33 +03:00
|
|
|
$this->assertTrue($this->fenom->getTemplate('my:include.tpl')->isValid());
|
2013-05-30 19:00:00 +04:00
|
|
|
}
|
2015-01-08 15:52:33 +03:00
|
|
|
|
2013-05-30 19:00:00 +04:00
|
|
|
}
|