diff --git a/app/tests/Controller/User/RegisterUserActionTest.php b/app/tests/Controller/User/RegisterUserActionTest.php index a053c03..deda183 100644 --- a/app/tests/Controller/User/RegisterUserActionTest.php +++ b/app/tests/Controller/User/RegisterUserActionTest.php @@ -99,8 +99,14 @@ class RegisterUserActionTest extends TestCase UserRepositoryInterface::class, $userRepository->reveal() ); + + // get the form key + $getUserRequest = $this->createNewUserRequestForFormKey(); + $response = $app->handle($getUserRequest); + $formKey = $container->get(SessionInterface::class)->get("form_key"); + $this->assertIsString($formKey); - $request = $this->createNewUserRequest(); + $request = $this->createNewUserRequest($formKey); $response = $app->handle($request); $this->assertEquals(400, $response->getStatusCode());