Skip to content

Commit 83a7a95

Browse files
Assert on string equality instead of regexes
1 parent 3e43aa9 commit 83a7a95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/Controller/UserValueResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function testResolveThrowsAccessDeniedWithWrongUserClass()
120120
$metadata = new ArgumentMetadata('foo', InMemoryUser::class, false, false, null, false, [new CurrentUser()]);
121121

122122
$this->expectException(AccessDeniedException::class);
123-
$this->expectExceptionMessageMatches(\sprintf('/^The logged-in user is an instance of "%s" but a user of type "Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\InMemoryUser" is expected.$/', $user::class));
123+
$this->expectExceptionMessage(\sprintf('The logged-in user is an instance of "%s" but a user of type "Symfony\Component\Security\Core\User\InMemoryUser" is expected.', $user::class));
124124
$resolver->resolve(Request::create('/'), $metadata);
125125
}
126126

0 commit comments

Comments
 (0)