Add pre-request for the form key
This commit is contained in:
parent
bf48532ac1
commit
7c9f5f6bf8
@ -100,7 +100,13 @@ class RegisterUserActionTest extends TestCase
|
|||||||
$userRepository->reveal()
|
$userRepository->reveal()
|
||||||
);
|
);
|
||||||
|
|
||||||
$request = $this->createNewUserRequest();
|
// 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($formKey);
|
||||||
|
|
||||||
$response = $app->handle($request);
|
$response = $app->handle($request);
|
||||||
$this->assertEquals(400, $response->getStatusCode());
|
$this->assertEquals(400, $response->getStatusCode());
|
||||||
|
Loading…
Reference in New Issue
Block a user