@@ -69,7 +69,16 @@ public function itCanHaveNoOptions(): void
69
69
{
70
70
$ service = new CorsService ();
71
71
$ this ->assertInstanceOf (CorsService::class, $ service );
72
- $ this ->assertEquals ([], $ this ->getOptionsFromService ($ service )['allowedOrigins ' ]);
72
+
73
+ $ normalized = $ this ->getOptionsFromService ($ service );
74
+
75
+ $ this ->assertEquals ([], $ normalized ['allowedOrigins ' ]);
76
+ $ this ->assertEquals ([], $ normalized ['allowedOriginsPatterns ' ]);
77
+ $ this ->assertEquals ([], $ normalized ['allowedHeaders ' ]);
78
+ $ this ->assertEquals ([], $ normalized ['allowedMethods ' ]);
79
+ $ this ->assertEquals ([], $ normalized ['exposedHeaders ' ]);
80
+ $ this ->assertEquals (0 , $ normalized ['maxAge ' ]);
81
+ $ this ->assertEquals (false , $ normalized ['supportsCredentials ' ]);
73
82
}
74
83
75
84
/**
@@ -79,7 +88,16 @@ public function itCanHaveEmptyOptions(): void
79
88
{
80
89
$ service = new CorsService ([]);
81
90
$ this ->assertInstanceOf (CorsService::class, $ service );
82
- $ this ->assertEquals ([], $ this ->getOptionsFromService ($ service )['allowedOrigins ' ]);
91
+
92
+ $ normalized = $ this ->getOptionsFromService ($ service );
93
+
94
+ $ this ->assertEquals ([], $ normalized ['allowedOrigins ' ]);
95
+ $ this ->assertEquals ([], $ normalized ['allowedOriginsPatterns ' ]);
96
+ $ this ->assertEquals ([], $ normalized ['allowedHeaders ' ]);
97
+ $ this ->assertEquals ([], $ normalized ['allowedMethods ' ]);
98
+ $ this ->assertEquals ([], $ normalized ['exposedHeaders ' ]);
99
+ $ this ->assertEquals (0 , $ normalized ['maxAge ' ]);
100
+ $ this ->assertEquals (false , $ normalized ['supportsCredentials ' ]);
83
101
}
84
102
85
103
/**
0 commit comments