Skip to content

Commit

Permalink
Fix ProfilerTest
Browse files Browse the repository at this point in the history
  • Loading branch information
ostrolucky committed May 5, 2024
1 parent 8925ffa commit 85cbe20
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/ProfilerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
use Twig\Runtime\EscaperRuntime;
use Twig\RuntimeLoader\FactoryRuntimeLoader;
use Twig\RuntimeLoader\RuntimeLoaderInterface;

use function class_exists;
Expand Down Expand Up @@ -81,7 +83,10 @@ public function setUp(): void

$loader = $this->getMockBuilder(RuntimeLoaderInterface::class)->getMock();
$loader->method('load')->willReturn($kernelRuntime);
$this->twig->addRuntimeLoader($loader);
$this->twig->addRuntimeLoader(new FactoryRuntimeLoader([
HttpKernelRuntime::class => fn() => $kernelRuntime,

Check failure on line 87 in tests/ProfilerTest.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

There must be exactly 1 whitespace after "fn" keyword.

Check failure on line 87 in tests/ProfilerTest.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

Closure not using "$this" should be declared static.
EscaperRuntime::class => fn() => new EscaperRuntime(),

Check failure on line 88 in tests/ProfilerTest.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

There must be exactly 1 whitespace after "fn" keyword.

Check failure on line 88 in tests/ProfilerTest.php

View workflow job for this annotation

GitHub Actions / Coding Standards / Coding Standards (8.3)

Closure not using "$this" should be declared static.
]));
}

public function testRender(): void
Expand Down

0 comments on commit 85cbe20

Please sign in to comment.