Skip to content

Commit 33438c0

Browse files
minor #52157 [Tests] Move expectException closer to the place of the expectation to avoid false positives (OskarStark)
This PR was merged into the 6.4 branch. Discussion ---------- [Tests] Move `expectException` closer to the place of the expectation to avoid false positives | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | -- | License | MIT If you guys like this PR, I will fix the other places as well Should be merged after merge & upmerge of: * #52365 Commits ------- 6115ab0751 [Tests] Move expectException closer to the place of the expectation to avoid false positives
2 parents 0f19287 + a20c7aa commit 33438c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/Extension/HttpKernelExtensionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ class HttpKernelExtensionTest extends TestCase
3030
{
3131
public function testFragmentWithError()
3232
{
33-
$this->expectException(\Twig\Error\RuntimeError::class);
3433
$renderer = $this->getFragmentHandler($this->throwException(new \Exception('foo')));
3534

35+
$this->expectException(\Twig\Error\RuntimeError::class);
36+
3637
$this->renderTemplate($renderer);
3738
}
3839

0 commit comments

Comments
 (0)