We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 454be20 commit 886d3f2Copy full SHA for 886d3f2
tests/CI4Twig/TwigTest.php
@@ -110,4 +110,18 @@ public function testFunctionSafe()
110
$output = $obj->render('functions_safe');
111
$this->assertSame("<s>test</s>\n", $output);
112
}
113
+
114
+ public function testFilter()
115
+ {
116
+ $obj = new Twig(
117
+ [
118
+ 'paths' => __DIR__ . '/../templates/',
119
+ 'filters' => ['str_rot13'],
120
+ 'cache' => false,
121
+ ]
122
+ );
123
124
+ $output = $obj->render('filters');
125
+ $this->assertSame("PbqrVtavgre Fvzcyr naq Frpher Gjvt\n", $output);
126
+ }
127
tests/templates/filters.twig
@@ -0,0 +1 @@
1
+{{ 'CodeIgniter Simple and Secure Twig'|str_rot13 }}
0 commit comments