summaryrefslogtreecommitdiff
path: root/tests/UnitTests/TemplateSource/_Issues/327/ModifierIssue327Test.php
blob: b75dd7ffdd04c0e8a0030178da910987a083536e (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
<?php
/**
 * Smarty PHPunit tests compiler errors
 *

 * @author  Uwe Tews
 */

/**
 * class for compiler tests
 *
 * 
 * @preserveGlobalState    disabled
 * 
 */
class ModifierIssue327Test extends PHPUnit_Smarty
{
    public function setUp(): void
    {
        $this->setUpSmarty(__DIR__);
        $this->smarty->registerPlugin('modifier', 'substr', 'substr');
    }


    public function testModifier327()
    {
          $this->assertEquals('hello you', $this->smarty->fetch('string:{"hello world"|substr:0:-5|cat:"you"}'));
    }

}