File tree Expand file tree Collapse file tree
tests/TestCase/Controller/Component Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ $this->Authentication->disableIdentityCheck();
126126
127127For the common post-login redirect flow, use ` redirectAfterLogin() ` :
128128
129- ``` php
129+ ``` php
130130public function login(): ?\Cake\Http\Response
131131{
132132 $result = $this->Authentication->getResult();
@@ -145,7 +145,7 @@ request when available and falls back to the default you provide.
145145If you need to inspect the validated target before redirecting, use
146146` getLoginRedirect() ` instead:
147147
148- ``` php
148+ ``` php
149149$target = $this->Authentication->getLoginRedirect('/home');
150150return $this->redirect($target);
151151```
Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ public function testRedirectAfterLogin(): void
420420 $ component = new AuthenticationComponent ($ registry );
421421
422422 $ response = $ component ->redirectAfterLogin ($ url );
423- $ this ->assertSame (' /cakephp/ ok/path?value=key ' , $ response ?->getHeaderLine('Location ' ));
423+ $ this ->assertSame (Router:: url ( ' / ok/path?value=key ') , $ response ?->getHeaderLine('Location ' ));
424424
425425 Configure::delete ('App.base ' );
426426 }
You can’t perform that action at this time.
0 commit comments