Skip to content

Commit 626eec0

Browse files
committed
replace expectDeprecation() with expectUserDeprecationMessage()
1 parent 9fefa7a commit 626eec0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/Authentication/AuthenticatorManagerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use PHPUnit\Framework\TestCase;
1616
use Psr\Log\AbstractLogger;
1717
use Psr\Log\LoggerInterface;
18-
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
18+
use Symfony\Bridge\PhpUnit\ExpectUserDeprecationMessageTrait;
1919
use Symfony\Component\EventDispatcher\EventDispatcher;
2020
use Symfony\Component\HttpFoundation\Request;
2121
use Symfony\Component\HttpFoundation\Response;
@@ -42,7 +42,7 @@
4242

4343
class AuthenticatorManagerTest extends TestCase
4444
{
45-
use ExpectDeprecationTrait;
45+
use ExpectUserDeprecationMessageTrait;
4646

4747
private MockObject&TokenStorageInterface $tokenStorage;
4848
private EventDispatcher $eventDispatcher;
@@ -211,7 +211,7 @@ public function eraseCredentials(): void
211211
$authenticator->expects($this->any())->method('createToken')->willReturn($token);
212212

213213
if ($eraseCredentials) {
214-
$this->expectDeprecation(\sprintf('Since symfony/security-http 7.3: Implementing "%s@anonymous::eraseCredentials()" is deprecated since Symfony 7.3; add the #[\Deprecated] attribute on the method to signal its either empty or that you moved the logic elsewhere, typically to the "__serialize()" method.', AbstractToken::class));
214+
$this->expectUserDeprecationMessage(\sprintf('Since symfony/security-http 7.3: Implementing "%s@anonymous::eraseCredentials()" is deprecated since Symfony 7.3; add the #[\Deprecated] attribute on the method to signal its either empty or that you moved the logic elsewhere, typically to the "__serialize()" method.', AbstractToken::class));
215215
}
216216

217217
$manager = $this->createManager([$authenticator], 'main', $eraseCredentials, exposeSecurityErrors: ExposeSecurityLevel::None);

0 commit comments

Comments
 (0)