mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-05 23:01:37 +01:00
44 lines
848 B
PHP
44 lines
848 B
PHP
<?php
|
|
/**
|
|
* Smarty PHPunit tests for templateExists method
|
|
*
|
|
* @package PHPunit
|
|
* @author Uwe Tews
|
|
*/
|
|
|
|
/**
|
|
* class for templateExists tests
|
|
*
|
|
* @runTestsInSeparateProcess
|
|
* @preserveGlobalState disabled
|
|
* @backupStaticAttributes enabled
|
|
*/
|
|
class TemplateExistsTest extends PHPUnit_Smarty
|
|
{
|
|
public function setUp(): void
|
|
{
|
|
$this->setUpSmarty(__DIR__);
|
|
}
|
|
|
|
|
|
public function testInit()
|
|
{
|
|
$this->cleanDirs();
|
|
}
|
|
/**
|
|
* test $smarty->templateExists true
|
|
*/
|
|
public function testSmartyTemplateExists()
|
|
{
|
|
$this->assertTrue($this->smarty->templateExists('helloworld.tpl'));
|
|
}
|
|
|
|
/**
|
|
* test $smarty->templateExists false
|
|
*/
|
|
public function testSmartyTemplateNotExists()
|
|
{
|
|
$this->assertFalse($this->smarty->templateExists('notthere.tpl'));
|
|
}
|
|
}
|