mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-06 15:21:37 +01:00
44 lines
852 B
PHP
44 lines
852 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()
|
||
|
|
{
|
||
|
|
$this->setUpSmarty(dirname(__FILE__));
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
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'));
|
||
|
|
}
|
||
|
|
}
|