diff --git a/tests/system/View/ParserTest.php b/tests/system/View/ParserTest.php index d3a53f3fc480..902c66948768 100644 --- a/tests/system/View/ParserTest.php +++ b/tests/system/View/ParserTest.php @@ -795,7 +795,7 @@ public function testParserRestoresReplacementStateAfterNestedRender(): void public function testParserRestoresReplacementStateAfterFilterException(): void { $exception = new RuntimeException('Filter failed.'); - $this->config->filters['fail'] = static fn (mixed $value): string => throw $exception; + $this->config->filters['fail'] = static fn (mixed $value): never => throw $exception; $this->parser->setData(['first' => 'before', 'second' => 'failure']); try {