Skip to content

Commit a20c7aa

Browse files
committed
[Tests] Move expectException closer to the place of the expectation to avoid false positives
1 parent 164b48e commit a20c7aa

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)