. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fig\Http\Message\StatusCodeInterface; use Fisharebest\Webtrees\Services\MessageService; use Fisharebest\Webtrees\Services\ModuleService; use Fisharebest\Webtrees\TestCase; use Fisharebest\Webtrees\User; use Illuminate\Support\Collection; use PHPUnit\Framework\Attributes\CoversClass; #[CoversClass(AccountEdit::class)] class AccountEditTest extends TestCase { protected static bool $uses_database = true; public function testHandler(): void { $user = $this->createMock(User::class); $message_service = $this->createMock(MessageService::class); $module_service = $this->createMock(ModuleService::class); $module_service->method('findByInterface')->willReturn(new Collection([])); $request = self::createRequest() ->withAttribute('user', $user); $handler = new AccountEdit($message_service, $module_service); $response = $handler->handle($request); self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode()); } }