blob: 3ef09b1556be3b1c084e8ec63562edd424afb7d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<?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('unknown modifier');
$this->smarty->fetch('eval:{unknown()}');
}
}
|