@@ -38,8 +38,10 @@ class Cas20ControllerTest extends TestCase
3838 private Utils \HTTP |MockObject $ utilsHttpMock ;
3939
4040 private array $ ticket ;
41+
4142 private array $ proxyTicket ;
4243
44+
4345 /**
4446 * @throws \Exception
4547 */
@@ -111,6 +113,7 @@ protected function setUp(): void
111113 ];
112114 }
113115
116+
114117 public static function validateMethods (): array
115118 {
116119 return [
@@ -125,6 +128,7 @@ public static function validateMethods(): array
125128 ];
126129 }
127130
131+
128132 #[DataProvider('validateMethods ' )]
129133 public function testProxyValidatePassesTheCorrectMethodToValidate (string $ prefix , string $ method ): void
130134 {
@@ -160,6 +164,7 @@ public function testProxyValidatePassesTheCorrectMethodToValidate(string $prefix
160164 $ controllerMock ->$ method ($ request , ...$ requestParameters );
161165 }
162166
167+
163168 public static function queryParameterValues (): array
164169 {
165170 return [
@@ -182,6 +187,7 @@ public static function queryParameterValues(): array
182187 ];
183188 }
184189
190+
185191 #[DataProvider('queryParameterValues ' )]
186192 public function testProxyRequestFails (array $ params , string $ message ): void
187193 {
@@ -209,6 +215,7 @@ public function testProxyRequestFails(array $params, string $message): void
209215 );
210216 }
211217
218+
212219 public function testProxyRequestFailsWhenPgtNotRecognized (): void
213220 {
214221 $ this ->moduleConfig ['legal_target_service_urls ' ] = ['https://myservice.com/abcd ' ];
@@ -238,6 +245,7 @@ public function testProxyRequestFailsWhenPgtNotRecognized(): void
238245 );
239246 }
240247
248+
241249 public function testProxyRequestFailsWhenPgtNotValid (): void
242250 {
243251 $ this ->moduleConfig ['legal_target_service_urls ' ] = ['https://myservice.com/abcd ' ];
@@ -269,6 +277,7 @@ public function testProxyRequestFailsWhenPgtNotValid(): void
269277 );
270278 }
271279
280+
272281 public function testProxyRequestFailsWhenPgtExpired (): void
273282 {
274283 $ this ->moduleConfig ['legal_target_service_urls ' ] = ['https://myservice.com/abcd ' ];
@@ -305,6 +314,7 @@ public function testProxyRequestFailsWhenPgtExpired(): void
305314 );
306315 }
307316
317+
308318 public function testProxyReturnsProxyTicket (): void
309319 {
310320 $ this ->moduleConfig ['legal_target_service_urls ' ] = ['https://myservice.com/abcd ' ];
@@ -359,6 +369,7 @@ public function testProxyReturnsProxyTicket(): void
359369 $ this ->assertTrue (filter_var ($ ticketFactory ->isProxyTicket ($ proxyTicket ), FILTER_VALIDATE_BOOLEAN ));
360370 }
361371
372+
362373 public static function validateFailsForEmptyServiceTicket (): array
363374 {
364375 return [
@@ -377,6 +388,7 @@ public static function validateFailsForEmptyServiceTicket(): array
377388 ];
378389 }
379390
391+
380392 #[DataProvider('validateFailsForEmptyServiceTicket ' )]
381393 public function testServiceValidateFailing (array $ requestParams , string $ message ): void
382394 {
@@ -402,6 +414,7 @@ public function testServiceValidateFailing(array $requestParams, string $message
402414 );
403415 }
404416
417+
405418 public function testReturn500OnDeleteTicketThatThrows (): void
406419 {
407420 $ config = Configuration::loadFromArray ($ this ->moduleConfig );
@@ -437,6 +450,7 @@ public function getTicket(string $ticketId): ?array
437450 );
438451 }
439452
453+
440454 public static function validateOnDifferentQueryParameterCombinations (): array
441455 {
442456 $ sessionId = session_create_id ();
@@ -495,6 +509,7 @@ public static function validateOnDifferentQueryParameterCombinations(): array
495509 ];
496510 }
497511
512+
498513 #[DataProvider('validateOnDifferentQueryParameterCombinations ' )]
499514 public function testServiceValidate (
500515 array $ requestParams ,
@@ -596,6 +611,7 @@ public static function validateOnDifferentQueryParameterCombinationsProxyValidat
596611 ];
597612 }
598613
614+
599615 #[DataProvider('validateOnDifferentQueryParameterCombinationsProxyValidate ' )]
600616 public function testProxyValidate (
601617 array $ requestParams ,
@@ -645,6 +661,7 @@ public function testProxyValidate(
645661 }
646662 }
647663
664+
648665 public function testReturnBadRequestOnTicketServiceQueryAndTicketMismatch (): void
649666 {
650667 $ config = Configuration::loadFromArray ($ this ->moduleConfig );
@@ -678,6 +695,7 @@ public function testReturnBadRequestOnTicketServiceQueryAndTicketMismatch(): voi
678695 );
679696 }
680697
698+
681699 public function testThrowOnProxyServiceIdentityFail (): void
682700 {
683701 $ config = Configuration::loadFromArray ($ this ->moduleConfig );
0 commit comments