Skip to content

Commit

Permalink
[Turbo] PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal committed Nov 29, 2024
1 parent 4734757 commit 2469012
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Turbo/tests/Bridge/Mercure/TurboStreamListenRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ final class TurboStreamListenRendererTest extends KernelTestCase
{
/**
* @dataProvider provideTestCases
*
* @param array<mixed> $context
*/
public function testRenderTurboStreamListen(string $template, array $context, string $expectedResult)
public function testRenderTurboStreamListen(string $template, array $context, string $expectedResult): void
{
$this->assertSame($expectedResult, self::getContainer()->get('twig')->createTemplate($template)->render($context));
$twig = self::getContainer()->get('twig');
self::assertInstanceOf(\Twig\Environment::class, $twig);

$this->assertSame($expectedResult, $twig->createTemplate($template)->render($context));
}

/**
* @return iterable<array{0: string, 1: array<mixed>, 2: string}>
*/
public static function provideTestCases(): iterable
{
$newEscape = (new \ReflectionClass(StimulusAttributes::class))->hasMethod('escape');
Expand Down

0 comments on commit 2469012

Please sign in to comment.