. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fig\Http\Message\StatusCodeInterface; use Fisharebest\Webtrees\TestCase; use Fisharebest\Webtrees\User; /** * @covers \Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestPage */ class PasswordRequestPageTest extends TestCase { /** * @return void */ public function testPasswordRequestPage(): void { $request = self::createRequest(); $handler = new PasswordRequestPage(); $response = $handler->handle($request); self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); } /** * @return void */ public function testPasswordRequestPageAlreadyLoggedIn(): void { $user = $this->createMock(User::class); $request = self::createRequest()->withAttribute('user', $user); $handler = new PasswordRequestPage(); $response = $handler->handle($request); self::assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode()); } }