xref: /webtrees/tests/app/Http/RequestHandlers/AccountDeleteTest.php (revision 5a8afed46297e8105e3e5a33ce37e6a8e88bc79d)
17c4add84SGreg Roach<?php
27c4add84SGreg Roach
37c4add84SGreg Roach/**
47c4add84SGreg Roach * webtrees: online genealogy
5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
67c4add84SGreg Roach * This program is free software: you can redistribute it and/or modify
77c4add84SGreg Roach * it under the terms of the GNU General Public License as published by
87c4add84SGreg Roach * the Free Software Foundation, either version 3 of the License, or
97c4add84SGreg Roach * (at your option) any later version.
107c4add84SGreg Roach * This program is distributed in the hope that it will be useful,
117c4add84SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
127c4add84SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
137c4add84SGreg Roach * GNU General Public License for more details.
147c4add84SGreg Roach * You should have received a copy of the GNU General Public License
1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
167c4add84SGreg Roach */
177c4add84SGreg Roach
187c4add84SGreg Roachdeclare(strict_types=1);
197c4add84SGreg Roach
20110d87e5SGreg Roachnamespace Fisharebest\Webtrees\Http\RequestHandlers;
217c4add84SGreg Roach
227c4add84SGreg Roachuse Fig\Http\Message\StatusCodeInterface;
237c4add84SGreg Roachuse Fisharebest\Webtrees\Services\UserService;
247c4add84SGreg Roachuse Fisharebest\Webtrees\TestCase;
25202c018bSGreg Roachuse PHPUnit\Framework\Attributes\CoversClass;
267c4add84SGreg Roach
27202c018bSGreg Roach#[CoversClass(AccountDelete::class)]
287c4add84SGreg Roachclass AccountDeleteTest extends TestCase
297c4add84SGreg Roach{
307c4add84SGreg Roach    public function testHandler(): void
317c4add84SGreg Roach    {
32*62ff2f18SGreg Roach        $user_service = $this->createMock(UserService::class);
33110d87e5SGreg Roach
347c4add84SGreg Roach        $request = self::createRequest();
35110d87e5SGreg Roach
36110d87e5SGreg Roach        $handler  = new AccountDelete($user_service);
377c4add84SGreg Roach        $response = $handler->handle($request);
387c4add84SGreg Roach
395e933c21SGreg Roach        self::assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode());
407c4add84SGreg Roach    }
417c4add84SGreg Roach}
42