chore: sync

This commit is contained in:
2026-02-09 00:05:29 +01:00
parent 0301716890
commit 6bfa3d4dda
23 changed files with 622 additions and 18 deletions

View File

@@ -58,7 +58,20 @@ final class AuthFlowTest extends TestCase
], $cookie);
$response3 = $app->handle($step3);
self::assertSame(201, $response3->getStatusCode());
$cookie = $this->extractCookie($response3, $cookie);
$body3 = json_decode((string)$response3->getBody(), true);
self::assertSame('pending', $body3['status']);
// confirm registration
$pdo->exec("UPDATE users SET activation_token = 'confirm-token' WHERE username = 'neo'");
$confirm = $this->jsonRequest($factory, 'POST', '/auth/register/confirm', [
'token' => 'confirm-token',
], $cookie);
$confirmResponse = $app->handle($confirm);
self::assertSame(200, $confirmResponse->getStatusCode());
$confirmMeRequest = $factory->createServerRequest('POST', '/auth/register/confirm', ['token' => 'confirm-token']);
$confirmMeRequest = $confirmMeRequest->withHeader('Cookie', $this->extractCookie($response3, $cookie));
$confirmMeResponse = $app->handle($confirmMeRequest);
self::assertSame(200, $confirmMeResponse->getStatusCode());
$meRequest = $factory->createServerRequest('GET', '/me');
if ($cookie) {