diff --git a/core/modules/link/tests/src/Unit/LinkFormatterTest.php b/core/modules/link/tests/src/Unit/LinkFormatterTest.php index bf5812e48b..3670652847 100644 --- a/core/modules/link/tests/src/Unit/LinkFormatterTest.php +++ b/core/modules/link/tests/src/Unit/LinkFormatterTest.php @@ -97,7 +97,7 @@ public function testFormatterLinkItemUrlUnexpectedException() { $pathValidator = $this->createMock(PathValidatorInterface::class); $linkFormatter = new LinkFormatter('', [], $fieldDefinition, [], '', '', [], $pathValidator); - $this->expectException(\Exception::class,); + $this->expectException(\Exception::class); $this->expectExceptionMessage('Unexpected!!!'); $linkFormatter->viewElements($fieldList, 'fr'); }