This commit is contained in:
@ -17,4 +17,12 @@ final class TwigTest extends \PHPUnit\Framework\TestCase
|
||||
$output = $template->render(['var' => 'middle']);
|
||||
$this->assertEquals('start middle end', $output);
|
||||
}
|
||||
|
||||
public function testExtensionsLoaded(): void
|
||||
{
|
||||
$obj = new Twig(['template' => 'start {{ var | formatBytes}} end']);
|
||||
$template = $obj->load('template');
|
||||
$output = $template->render(['var' => 1]);
|
||||
$this->assertEquals('start 1.00B end', $output);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user