mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-06 15:21:37 +01:00
39 lines
679 B
PHP
39 lines
679 B
PHP
<?php
|
|
/**
|
|
* Smarty PHPunit tests of function calls
|
|
*
|
|
|
|
* @author Uwe Tews
|
|
*/
|
|
|
|
/**
|
|
* class for function tests
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
class FunctionTest extends PHPUnit_Smarty
|
|
{
|
|
public function setUp(): void
|
|
{
|
|
$this->setUpSmarty(__DIR__);
|
|
}
|
|
|
|
public function testInit()
|
|
{
|
|
$this->cleanDirs();
|
|
}
|
|
|
|
/**
|
|
* test unknown function error
|
|
*/
|
|
public function testUnknownFunction()
|
|
{
|
|
$this->smarty->enableSecurity();
|
|
$this->expectException(\Smarty\CompilerException::class);
|
|
$this->expectExceptionMessage('Cannot compile unknown function unknown');
|
|
$this->smarty->fetch('eval:{unknown()}');
|
|
}
|
|
}
|