@@ -83,7 +83,7 @@ protected function setup(): void
8383
8484 'module.enable ' => [
8585 'casserver ' => true ,
86- ]
86+ ],
8787 ]);
8888 }
8989
@@ -124,8 +124,8 @@ public function testNoQueryParameters(): void
124124 [
125125 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
126126 CURLOPT_COOKIEFILE => $ this ->cookies_file ,
127- CURLOPT_FOLLOWLOCATION => true
128- ]
127+ CURLOPT_FOLLOWLOCATION => true ,
128+ ],
129129 );
130130 $ this ->assertEquals (200 , $ resp ['code ' ]);
131131
@@ -148,15 +148,15 @@ public function testWrongServiceUrl(): void
148148 [
149149 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
150150 CURLOPT_COOKIEFILE => $ this ->cookies_file ,
151- CURLOPT_FOLLOWLOCATION => true
152- ]
151+ CURLOPT_FOLLOWLOCATION => true ,
152+ ],
153153 );
154154 $ this ->assertEquals (500 , $ resp ['code ' ]);
155155
156156 $ this ->assertStringContainsString (
157157 'CAS server is not listed as a legal service ' ,
158158 $ resp ['body ' ],
159- 'Illegal cas service urls should be rejected '
159+ 'Illegal cas service urls should be rejected ' ,
160160 );
161161 }
162162
@@ -178,15 +178,15 @@ public function testValidServiceUrl(string $serviceParam, string $ticketParam):
178178 [$ serviceParam => $ service_url ],
179179 [
180180 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
181- CURLOPT_COOKIEFILE => $ this ->cookies_file
182- ]
181+ CURLOPT_COOKIEFILE => $ this ->cookies_file ,
182+ ],
183183 );
184184 $ this ->assertEquals (303 , $ resp ['code ' ]);
185185
186186 $ this ->assertStringStartsWith (
187187 $ service_url . '? ' . $ ticketParam . '=ST- ' ,
188188 $ resp ['headers ' ]['Location ' ],
189- 'Ticket should be part of the redirect. '
189+ 'Ticket should be part of the redirect. ' ,
190190 );
191191
192192 // Config ticket can be validated
@@ -198,11 +198,11 @@ public function testValidServiceUrl(string $serviceParam, string $ticketParam):
198198 [
199199 $ serviceParam => $ service_url ,
200200 'ticket ' => $ ticket ,
201- ],
201+ ],
202202 [
203203 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
204- CURLOPT_COOKIEFILE => $ this ->cookies_file
205- ]
204+ CURLOPT_COOKIEFILE => $ this ->cookies_file ,
205+ ],
206206 );
207207
208208 $ expectedResponse = DOMDocumentFactory::fromFile (
@@ -217,7 +217,7 @@ public function validServiceUrlProvider(): array
217217 {
218218 return [
219219 ['service ' , 'ticket ' ],
220- ['TARGET ' , 'SAMLart ' ]
220+ ['TARGET ' , 'SAMLart ' ],
221221 ];
222222 }
223223
@@ -235,15 +235,15 @@ public function testValidTicketNameOverride(): void
235235 ['TARGET ' => $ service_url ],
236236 [
237237 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
238- CURLOPT_COOKIEFILE => $ this ->cookies_file
239- ]
238+ CURLOPT_COOKIEFILE => $ this ->cookies_file ,
239+ ],
240240 );
241241 $ this ->assertEquals (303 , $ resp ['code ' ]);
242242
243243 $ this ->assertStringStartsWith (
244244 $ service_url . '?myTicket=ST- ' ,
245245 $ resp ['headers ' ]['Location ' ],
246- 'Ticket should be part of the redirect. '
246+ 'Ticket should be part of the redirect. ' ,
247247 );
248248 }
249249
@@ -260,15 +260,15 @@ public function testDebugOutput(): void
260260 ['service ' => $ service_url , 'debugMode ' => 'true ' ],
261261 [
262262 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
263- CURLOPT_COOKIEFILE => $ this ->cookies_file
264- ]
263+ CURLOPT_COOKIEFILE => $ this ->cookies_file ,
264+ ],
265265 );
266266 $ this ->assertEquals (200 , $ resp ['code ' ]);
267267
268268 $ this ->assertStringContainsString (
269269 '<cas:eduPersonPrincipalName>testuser@example.com</cas:eduPersonPrincipalName> ' ,
270270 $ resp ['body ' ],
271- 'Attributes should have been printed. '
271+ 'Attributes should have been printed. ' ,
272272 );
273273 }
274274
@@ -285,16 +285,16 @@ public function testDebugOutputSamlValidate(): void
285285 ['service ' => $ service_url , 'debugMode ' => 'samlValidate ' ],
286286 [
287287 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
288- CURLOPT_COOKIEFILE => $ this ->cookies_file
289- ]
288+ CURLOPT_COOKIEFILE => $ this ->cookies_file ,
289+ ],
290290 );
291291 $ this ->assertEquals (200 , $ resp ['code ' ]);
292292
293293
294294 $ this ->assertStringContainsString (
295295 'testuser@example.com</NameIdentifier ' ,
296296 $ resp ['body ' ],
297- 'Attributes should have been printed. '
297+ 'Attributes should have been printed. ' ,
298298 );
299299 }
300300
@@ -311,19 +311,19 @@ public function testAlternateServiceConfigUsed(): void
311311 ['service ' => $ service_url , 'debugMode ' => 'true ' ],
312312 [
313313 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
314- CURLOPT_COOKIEFILE => $ this ->cookies_file
315- ]
314+ CURLOPT_COOKIEFILE => $ this ->cookies_file ,
315+ ],
316316 );
317317 $ this ->assertEquals (200 , $ resp ['code ' ]);
318318 $ this ->assertStringContainsString (
319319 '<cas:user>testuser</cas:user> ' ,
320320 $ resp ['body ' ],
321- 'cas:user attribute should have been overridden '
321+ 'cas:user attribute should have been overridden ' ,
322322 );
323323 $ this ->assertStringContainsString (
324324 '<cas:cn>Test User</cas:cn> ' ,
325325 $ resp ['body ' ],
326- 'Attributes should have been printed with alternate attribute release '
326+ 'Attributes should have been printed with alternate attribute release ' ,
327327 );
328328 }
329329
@@ -344,8 +344,8 @@ public function testValidServiceUrlWithPost(): void
344344 ],
345345 [
346346 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
347- CURLOPT_COOKIEFILE => $ this ->cookies_file
348- ]
347+ CURLOPT_COOKIEFILE => $ this ->cookies_file ,
348+ ],
349349 );
350350
351351 // POST responds with a form that is uses JavaScript to submit
@@ -372,12 +372,12 @@ public function testValidServiceUrlWithPost(): void
372372 }
373373 $ this ->assertEquals (
374374 'ticket ' ,
375- $ item ->getAttribute ('name ' )
375+ $ item ->getAttribute ('name ' ),
376376 );
377377 $ this ->assertStringStartsWith (
378378 'ST- ' ,
379379 $ item ->getAttribute ('value ' ),
380- ''
380+ '' ,
381381 );
382382 }
383383
@@ -394,15 +394,15 @@ public function testSamlValidate(): void
394394 ['service ' => $ service_url ],
395395 [
396396 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
397- CURLOPT_COOKIEFILE => $ this ->cookies_file
398- ]
397+ CURLOPT_COOKIEFILE => $ this ->cookies_file ,
398+ ],
399399 );
400400 $ this ->assertEquals (303 , $ resp ['code ' ]);
401401
402402 $ this ->assertStringStartsWith (
403403 $ service_url . '?ticket=ST- ' ,
404404 $ resp ['headers ' ]['Location ' ],
405- 'Ticket should be part of the redirect. '
405+ 'Ticket should be part of the redirect. ' ,
406406 );
407407
408408 $ location = $ resp ['headers ' ]['Location ' ];
@@ -425,7 +425,7 @@ public function testSamlValidate(): void
425425 $ soapRequest ,
426426 [
427427 'TARGET ' => $ service_url ,
428- ]
428+ ],
429429 );
430430
431431 $ this ->assertEquals (200 , $ resp ['code ' ]);
@@ -445,8 +445,8 @@ private function authenticate(): void
445445 [
446446 CURLOPT_COOKIEJAR => $ this ->cookies_file ,
447447 CURLOPT_COOKIEFILE => $ this ->cookies_file ,
448- CURLOPT_FOLLOWLOCATION => true
449- ]
448+ CURLOPT_FOLLOWLOCATION => true ,
449+ ],
450450 );
451451 $ this ->assertEquals (200 , $ resp ['code ' ], $ resp ['body ' ]);
452452 }
0 commit comments