summaryrefslogtreecommitdiff
path: root/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Error/SmartyErrorTest.php
blob: 8657003b61443e22f124d3a0bafe50e1ef8c1cd8 (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
<?php
/**
 * Smarty PHPunit tests undefined Smarty special variable
 *

 * @author  Uwe Tews
 */

/**
 * class for undefined Smarty special variable tests
 *
 * 
 * 
 * 
 */
class SmartyErrorTest extends PHPUnit_Smarty
{
    public function setUp(): void
    {
        $this->setUpSmarty(__DIR__);
    }

    /**
     * test undefined Smarty special variable
     */
    public function testSmartyError() {
        $this->expectException(\Smarty\Exception::class);
        $this->expectExceptionMessage('$smarty.foo is not defined');
        $this->assertEquals(\Smarty\Smarty::SMARTY_VERSION, $this->smarty->fetch('error.tpl'));
    }
 }