diff --git a/src/TwigComponent/tests/Integration/ComponentExtensionTest.php b/src/TwigComponent/tests/Integration/ComponentExtensionTest.php index 1fd8a961ac2..3f831c0608b 100644 --- a/src/TwigComponent/tests/Integration/ComponentExtensionTest.php +++ b/src/TwigComponent/tests/Integration/ComponentExtensionTest.php @@ -14,6 +14,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\UX\TwigComponent\Tests\Fixtures\User; use Twig\Environment; +use Twig\Error\RuntimeError; /** * @author Kevin Bond @@ -62,7 +63,7 @@ public function testCanRenderComponentWithMoreAdvancedTwigExpressions(): void public function testCanNotRenderComponentWithInvalidExpressions(): void { - $this->expectException(\TypeError::class); + $this->expectException(RuntimeError::class); self::getContainer()->get(Environment::class)->render('invalid_flexible_component.html.twig'); }