backupscript/tests/Template/TwigTest.php
Jens True 9459045e6c
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
More testing. Removed Gitea actions.
2023-07-24 13:32:21 +00:00

21 lines
470 B
PHP

<?php
declare(strict_types=1);
namespace App\Tests;
use PHPUnit\Framework\TestCase;
use App\Template\Twig;
use Twig\TwigFilter;
final class TwigTest extends \PHPUnit\Framework\TestCase
{
public function testInstance(): void
{
$obj = new Twig(['template' => 'start {{ var }} end']);
$template = $obj->load('template');
$output = $template->render(['var' => 'middle']);
$this->assertEquals('start middle end', $output);
}
}