Skip to content

Commit 44d05bf

Browse files
committed
Fix CI for redirectAfterLogin changes
1 parent 51a5ef2 commit 44d05bf

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/en/authentication-component.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ $this->Authentication->disableIdentityCheck();
126126

127127
For the common post-login redirect flow, use `redirectAfterLogin()`:
128128

129-
``` php
129+
```php
130130
public 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.
145145
If you need to inspect the validated target before redirecting, use
146146
`getLoginRedirect()` instead:
147147

148-
``` php
148+
```php
149149
$target = $this->Authentication->getLoginRedirect('/home');
150150
return $this->redirect($target);
151151
```

tests/TestCase/Controller/Component/AuthenticationComponentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)