From 0eaa2264376c10509783a0158706b64fdc58f444 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Fri, 29 Nov 2024 16:22:04 +0100 Subject: [PATCH] [Turbo] PHPStan --- .../Bridge/Mercure/TurboStreamListenRendererTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Turbo/tests/Bridge/Mercure/TurboStreamListenRendererTest.php b/src/Turbo/tests/Bridge/Mercure/TurboStreamListenRendererTest.php index 549ab2f4f7..0721bceaec 100644 --- a/src/Turbo/tests/Bridge/Mercure/TurboStreamListenRendererTest.php +++ b/src/Turbo/tests/Bridge/Mercure/TurboStreamListenRendererTest.php @@ -19,12 +19,19 @@ final class TurboStreamListenRendererTest extends KernelTestCase { /** * @dataProvider provideTestCases + * @param array $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, 2: string}> + */ public static function provideTestCases(): iterable { $newEscape = (new \ReflectionClass(StimulusAttributes::class))->hasMethod('escape');