From e990b8d00203784c1d8c6a403cd0ac398e585bd1 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Wed, 13 Nov 2024 14:52:23 +0100 Subject: [PATCH] Rector --- tests/Functional/Action/ResetActionTest.php | 6 +++--- tests/Functional/Command/ChangePasswordCommandTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Functional/Action/ResetActionTest.php b/tests/Functional/Action/ResetActionTest.php index f3a556d48..b56b655d5 100644 --- a/tests/Functional/Action/ResetActionTest.php +++ b/tests/Functional/Action/ResetActionTest.php @@ -37,7 +37,7 @@ public function testItSubmitsResetPasswordFormWithNonValidData(): void $confirmationToken = $user->getConfirmationToken(); \assert(null !== $confirmationToken); - static::assertSame($user->getPassword(), 'random_password'); + static::assertSame('random_password', $user->getPassword()); $client->request('GET', \sprintf('/reset/%s', $confirmationToken)); @@ -60,7 +60,7 @@ public function testItResetsPassword(): void $confirmationToken = $user->getConfirmationToken(); \assert(null !== $confirmationToken); - static::assertSame($user->getPassword(), 'random_password'); + static::assertSame('random_password', $user->getPassword()); $client->request('GET', \sprintf('/reset/%s', $confirmationToken)); @@ -76,7 +76,7 @@ public function testItResetsPassword(): void static::assertNull($user->getPasswordRequestedAt()); static::assertNull($user->getConfirmationToken()); - static::assertSame($user->getPassword(), 'new_password'); + static::assertSame('new_password', $user->getPassword()); } private function prepareData(): UserInterface diff --git a/tests/Functional/Command/ChangePasswordCommandTest.php b/tests/Functional/Command/ChangePasswordCommandTest.php index ded6fc6a2..10ef9a27b 100644 --- a/tests/Functional/Command/ChangePasswordCommandTest.php +++ b/tests/Functional/Command/ChangePasswordCommandTest.php @@ -47,7 +47,7 @@ public function testChangesUserPassword(): void { $user = $this->prepareData('sonata-user-test', 'old_password'); - static::assertSame($user->getPassword(), 'old_password'); + static::assertSame('old_password', $user->getPassword()); $this->commandTester->execute([ 'username' => 'sonata-user-test', @@ -56,7 +56,7 @@ public function testChangesUserPassword(): void $user = $this->refreshUser($user); - static::assertSame($user->getPassword(), 'new_password'); + static::assertSame('new_password', $user->getPassword()); static::assertStringContainsString('Changed password for user "sonata-user-test".', $this->commandTester->getDisplay()); }