Add pre-request for the form key
This commit is contained in:
parent
bf48532ac1
commit
7c9f5f6bf8
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user