Skip to content

Commit 44b8be1

Browse files
CS fixes
1 parent 8262ab5 commit 44b8be1

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Tests/Extension/HttpKernelExtensionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface;
2424
use Symfony\Component\HttpKernel\Fragment\FragmentUriGenerator;
2525
use Twig\Environment;
26+
use Twig\Error\RuntimeError;
2627
use Twig\Loader\ArrayLoader;
2728
use Twig\RuntimeLoader\RuntimeLoaderInterface;
2829

@@ -32,7 +33,7 @@ public function testFragmentWithError()
3233
{
3334
$renderer = $this->getFragmentHandler(new \Exception('foo'));
3435

35-
$this->expectException(\Twig\Error\RuntimeError::class);
36+
$this->expectException(RuntimeError::class);
3637

3738
$this->renderTemplate($renderer);
3839
}

Tests/Extension/StopwatchExtensionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818
use Symfony\Component\Stopwatch\StopwatchEvent;
1919
use Twig\Environment;
2020
use Twig\Error\RuntimeError;
21+
use Twig\Error\SyntaxError;
2122
use Twig\Loader\ArrayLoader;
2223

2324
class StopwatchExtensionTest extends TestCase
2425
{
2526
public function testFailIfStoppingWrongEvent()
2627
{
27-
$this->expectException(\Twig\Error\SyntaxError::class);
28+
$this->expectException(SyntaxError::class);
2829
$this->testTiming('{% stopwatch "foo" %}{% endstopwatch "bar" %}', []);
2930
}
3031

Tests/Extension/TranslationExtensionTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Symfony\Component\Translation\Translator;
1919
use Symfony\Contracts\Translation\TranslatorInterface;
2020
use Twig\Environment;
21+
use Twig\Error\SyntaxError;
2122
use Twig\Loader\ArrayLoader as TwigArrayLoader;
2223
use Twig\TemplateWrapper;
2324

@@ -48,14 +49,14 @@ public function testTrans($template, $expected, array $variables = [])
4849

4950
public function testTransUnknownKeyword()
5051
{
51-
$this->expectException(\Twig\Error\SyntaxError::class);
52+
$this->expectException(SyntaxError::class);
5253
$this->expectExceptionMessage('Unexpected token. Twig was looking for the "with", "from", or "into" keyword in "index" at line 3.');
5354
$this->getTemplate("{% trans \n\nfoo %}{% endtrans %}")->render();
5455
}
5556

5657
public function testTransComplexBody()
5758
{
58-
$this->expectException(\Twig\Error\SyntaxError::class);
59+
$this->expectException(SyntaxError::class);
5960
$this->expectExceptionMessage('A message inside a trans tag must be a simple text in "index" at line 2.');
6061
$this->getTemplate("{% trans %}\n{{ 1 + 2 }}{% endtrans %}")->render();
6162
}

0 commit comments

Comments
 (0)