fenom/tests/cases/Fenom/CustomProviderTest.php

23 lines
608 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
{
2023-02-20 00:14:08 +03:00
public function setUp(): void
2013-07-29 14:58:14 +04:00
{
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->assertTrue($this->fenom->getTemplate('my:include.tpl')->isValid());
}
}