Skip to content

Commit fe0f648

Browse files
fix: Reset Twig instance during tests
1 parent 4dbcba1 commit fe0f648

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Tests/ApplicationHelper.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ trait ApplicationHelper
5151
#[\PHPUnit\Framework\Attributes\BeforeClass]
5252
public static function loadApplication(): void
5353
{
54+
// This avoids to register extensions multiple times (normally done in
55+
// the Application class constructor) as it would fail.
56+
\Minz\Template\Twig::reset();
57+
5458
$app_name = \Minz\Configuration::$app_name;
5559
$application_class_name = "\\{$app_name}\\Application";
5660
try {

0 commit comments

Comments
 (0)