Skip to content

Commit

Permalink
[TASK] Fix test case arrow function with throw on PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Aug 2, 2024
1 parent 617c788 commit b9655a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/Unit/ViewHelpers/TryViewHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public function testRender()

public function testRenderStaticWithException(): void
{
$arguments['__then'] = fn () => throw new \Exception('test');
$arguments['__else'] = fn () => 'else case';
$output = TryViewHelper::renderStatic($arguments, fn () => '', $this->renderingContext);
$arguments['__then'] = function() { throw new \Exception('test'); };
$arguments['__else'] = function() { return 'else case'; };
$output = TryViewHelper::renderStatic($arguments, function() { return ''; }, $this->renderingContext);
self::assertSame('else case', $output);
}

Expand Down

0 comments on commit b9655a4

Please sign in to comment.