Skip to content

Commit b4bceec

Browse files
committed
Use ::class keyword when possible
1 parent 374f7bf commit b4bceec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/Extension/TranslationExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ public function testTrans($template, $expected, array $variables = [])
4949

5050
public function testTransUnknownKeyword()
5151
{
52-
$this->expectException('Twig\Error\SyntaxError');
52+
$this->expectException(\Twig\Error\SyntaxError::class);
5353
$this->expectExceptionMessage('Unexpected token. Twig was looking for the "with", "from", or "into" keyword in "index" at line 3.');
5454
$this->getTemplate("{% trans \n\nfoo %}{% endtrans %}")->render();
5555
}
5656

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

0 commit comments

Comments
 (0)