Files
smarty/tests/UnitTests/A_Core/LoadPlugin/LoadPluginTest.php
Simon Wisselink c7a271323b Using unsupported PHP functions and unregistered static class methods in modifiers and expressions now triggers a deprecation notice
* Using unsupported PHP functions and unregistered static class methods in modifiers and expressions now triggers a deprecation notice because we will drop support for this in the next major release
2024-03-18 14:44:29 +01:00

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(): void
{
$this->setUpSmarty(__DIR__);
}
/**
* 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);
}
}