Skip to content

Commit 261e36f

Browse files
committed
Let tests use actually valid state ids
1 parent ce01a59 commit 261e36f

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

tests/modules/core/src/Controller/LoginTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function testLoginUserPass(): void
9999
$request = Request::create(
100100
'/loginuserpass',
101101
'GET',
102-
['AuthState' => 'someState'],
102+
['AuthState' => '_abc123'],
103103
);
104104

105105
$c = new Controller\Login($this->config);
@@ -165,7 +165,7 @@ public function testLoginUserPassOrg(): void
165165
$request = Request::create(
166166
'/loginuserpassorg',
167167
'GET',
168-
['AuthState' => 'someState'],
168+
['AuthState' => '_abc123'],
169169
);
170170
171171
$c = new Controller\Login($this->config);

tests/modules/core/src/Controller/LogoutTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function testLogoutIframeDoneUnknownEntityThrowsException(): void
113113
$request = Request::create(
114114
'/logout-iframe-done',
115115
'GET',
116-
['id' => 'someState'],
116+
['id' => '_abc123'],
117117
);
118118

119119
$c = new Controller\Logout($this->config);
@@ -134,7 +134,7 @@ public function testLogoutIframeDoneWithoutStateThrowsException(): void
134134
$request = Request::create(
135135
'/logout-iframe-done',
136136
'GET',
137-
['id' => 'someState'],
137+
['id' => '_abc123'],
138138
);
139139

140140
$c = new Controller\Logout($this->config);

tests/modules/exampleauth/src/Controller/ExampleAuthTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function testRedirect(): void
207207
$request = Request::create(
208208
'/redirecttest',
209209
'GET',
210-
['StateId' => 'someState']
210+
['StateId' => '_abc123']
211211
);
212212

213213
$c = new Controller\ExampleAuth($this->config, $this->session);

tests/modules/multiauth/src/Controller/DiscoControllerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function testDiscoveryFallthru(): void
101101
$request = Request::create(
102102
'/discovery',
103103
'GET',
104-
['AuthState' => 'someState']
104+
['AuthState' => '_abc123']
105105
);
106106

107107
$c = new Controller\DiscoController($this->config, $this->session);
@@ -154,7 +154,7 @@ public function testDiscoveryFallthruWithSource(): void
154154
$request = Request::create(
155155
'/discovery',
156156
'GET',
157-
['AuthState' => 'someState']
157+
['AuthState' => '_abc123']
158158
);
159159

160160
$c = new Controller\DiscoController($this->config, $this->session);
@@ -208,7 +208,7 @@ public function testDiscoveryDelegateAuth1(): void
208208
$request = Request::create(
209209
'/discovery',
210210
'GET',
211-
['AuthState' => 'someState']
211+
['AuthState' => '_abc123']
212212
);
213213

214214
$c = new Controller\DiscoController($this->config, $this->session);
@@ -264,7 +264,7 @@ public function testDiscoveryDelegateAuth1WithPreviousSource(): void
264264
$request = Request::create(
265265
'/discovery',
266266
'GET',
267-
['AuthState' => 'someState', 'source' => 'admin']
267+
['AuthState' => '_abc123', 'source' => 'admin']
268268
);
269269

270270
$c = new Controller\DiscoController($this->config, $this->session);
@@ -320,7 +320,7 @@ public function testDiscoveryDelegateAuth2(): void
320320
$request = Request::create(
321321
'/discovery',
322322
'GET',
323-
['AuthState' => 'someState', 'sourceChoice[admin]' => 'something admin']
323+
['AuthState' => '_abc123', 'sourceChoice[admin]' => 'something admin']
324324
);
325325

326326
$c = new Controller\DiscoController($this->config, $this->session);

tests/modules/saml/src/Controller/ProxyTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function testMissingStateId(): void
8888
public function testWithStateId(): void
8989
{
9090
$request = Request::create(
91-
'/invalidSesssion?AuthState=someState',
91+
'/invalidSesssion?AuthState=_abc123',
9292
'POST',
9393
);
9494

@@ -117,7 +117,7 @@ public static function loadState(string $id, string $stage, bool $allowMissing =
117117
public function testWithStateIdCancel(): void
118118
{
119119
$request = Request::create(
120-
'/invalidSesssion?AuthState=someState',
120+
'/invalidSesssion?AuthState=_abc123',
121121
'POST',
122122
['cancel' => 'cancel'],
123123
);
@@ -147,7 +147,7 @@ public static function loadState(string $id, string $stage, bool $allowMissing =
147147
public function testWithStateIdContinue(): void
148148
{
149149
$request = Request::create(
150-
'/invalidSesssion?AuthState=someState',
150+
'/invalidSesssion?AuthState=_abc123',
151151
'POST',
152152
['continue' => 'continue'],
153153
);

tests/src/SimpleSAML/XHTML/TemplateTranslationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function testCoreLoginUserPassTemplate(): void
5555
$t->data['username'] = 'h.c oersted';
5656
$t->data['rememberUsernameEnabled'] = false;
5757
$t->data['rememberMeEnabled'] = false;
58-
$t->data['AuthState'] = 'abc123';
58+
$t->data['AuthState'] = '_abc123';
5959

6060
$getContent = function (): string {
6161
/** @var \SimpleSAML\XHTML\Template $this */

0 commit comments

Comments
 (0)