File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
ReCaptchaUser/Test/Integration
TwoFactorAuth/Test/Integration Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,11 @@ private function checkSuccessfulGetResponse($shouldContainReCaptcha = false): vo
179179 $ this ->getRequest ()->setUri ($ this ->backendUrl ->getUrl ('admin ' ));
180180
181181 $ this ->dispatch ('backend/admin/auth/login ' );
182+
183+ if ($ this ->getResponse ()->getHeader ('Location ' )) {
184+ $ this ->dispatch ($ this ->getResponse ()->getHeader ('Location ' )->uri ()->getPath ());
185+ }
186+
182187 $ content = $ this ->getResponse ()->getBody ();
183188
184189 self ::assertNotEmpty ($ content );
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public function testUnauthenticated(): void
9191 $ this ->dispatch ('backend/admin/index/index ' );
9292 //Login controller redirects to full start-up URL
9393 $ this ->assertRedirect ($ this ->stringContains ('index ' ));
94- $ properUrl = $ this ->getResponse ()->getHeader ('Location ' )->getFieldValue ();
94+ $ properUrl = $ this ->getResponse ()->getHeader ('Location ' )->uri ()-> getPath ();
9595
9696 //Login page must be rendered without redirects
9797 $ this ->getRequest ()->setDispatched (false );
You can’t perform that action at this time.
0 commit comments