There should be atleast one Functional test for every Template engine in every Framework. As we should go with using the Framework specific tools like roadrunner for Spiral or artisan serve for Laravel a common test would look like this:
class LaravelTwigTest extends AbstractTestCase {
public static function setUpBeforeClass(): void
{
static::serverRun('artisan serve');
}
public function testTwig(): void
{
$response = $client->request('GET', 'http://127.0.0.1:8000/twig');
$this->assertHttpStatusCode(200);
$content = $response->getContent();
$this->assertStringContainsString('TwigRenderer', $content);
}
}
There should be atleast one Functional test for every Template engine in every Framework. As we should go with using the Framework specific tools like
roadrunner
for Spiral orartisan serve
for Laravel a common test would look like this: