mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-04 22:31:37 +01:00
* Removed unneeded files and replace dummy.txt with .gitignore files * Synced unit tests with master codebase, noted TODO's, fixed phpunit scripts and travis config * fix php7.4 deprecation and remove php7.4 from travis allow_failures since php7.4 is current stable Co-authored-by: Uwe Tews <uwe.tews@googlemail.com> Co-authored-by: Uwe Tews <uwe.tews@gmail.com> Co-authored-by: AnrDaemon <anrdaemon@yandex.ru>
55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Smarty PHPunit basic core function tests
|
|
*
|
|
* @package PHPunit
|
|
* @author Uwe Tews
|
|
*/
|
|
|
|
/**
|
|
* class core function tests
|
|
*
|
|
* @runTestsInSeparateProcess
|
|
* @preserveGlobalState disabled
|
|
* @backupStaticAttributes enabled
|
|
*/
|
|
class LoadPluginTest extends PHPUnit_Smarty
|
|
{
|
|
public function setUp()
|
|
{
|
|
$this->setUpSmarty(dirname(__FILE__));
|
|
}
|
|
|
|
/**
|
|
* loadPlugin test unkown plugin
|
|
*/
|
|
public function testLoadPluginErrorReturn()
|
|
{
|
|
$this->assertFalse($this->smarty->loadPlugin('Smarty_Not_Known'));
|
|
}
|
|
|
|
/**
|
|
* loadPlugin test Smarty_Internal_Debug exists
|
|
*/
|
|
public function testLoadPluginSmartyInternalDebug()
|
|
{
|
|
$this->assertTrue($this->smarty->loadPlugin('Smarty_Internal_Debug') == true);
|
|
}
|
|
|
|
/**
|
|
* loadPlugin test $template_class exists
|
|
*/
|
|
public function testLoadPluginSmartyTemplateClass()
|
|
{
|
|
$this->assertTrue($this->smarty->loadPlugin($this->smarty->template_class) == true);
|
|
}
|
|
|
|
/**
|
|
* loadPlugin test loaging from plugins_dir
|
|
*/
|
|
public function testLoadPluginSmartyPluginCounter()
|
|
{
|
|
$this->assertTrue($this->smarty->loadPlugin('Smarty_Function_Counter') == true);
|
|
}
|
|
}
|