@@ -246,6 +246,10 @@ public function testConfigWithAServer(): void
246246 'server ' => [
247247 'host ' => '127.0.0.1 ' ,
248248 'port ' => 8080 ,
249+ 'tls ' => [
250+ 'enabled ' => false ,
251+ 'options ' => [],
252+ ],
249253 'origin_check ' => false ,
250254 'ip_address_check ' => false ,
251255 'keepalive_ping ' => false ,
@@ -283,6 +287,10 @@ public function testConfigWithAServerAndPubSubRouterWithoutArrayResources(): voi
283287 'server ' => [
284288 'host ' => '127.0.0.1 ' ,
285289 'port ' => 8080 ,
290+ 'tls ' => [
291+ 'enabled ' => false ,
292+ 'options ' => [],
293+ ],
286294 'origin_check ' => false ,
287295 'ip_address_check ' => false ,
288296 'keepalive_ping ' => false ,
@@ -312,6 +320,10 @@ public function testConfigWithAServerAndPubSubRouterWithArrayResources(): void
312320 'server ' => [
313321 'host ' => '127.0.0.1 ' ,
314322 'port ' => 8080 ,
323+ 'tls ' => [
324+ 'enabled ' => false ,
325+ 'options ' => [],
326+ ],
315327 'origin_check ' => false ,
316328 'ip_address_check ' => false ,
317329 'keepalive_ping ' => false ,
@@ -335,12 +347,43 @@ public function testConfigWithAServerAndPubSubRouterWithArrayResources(): void
335347 );
336348 }
337349
350+ public function testConfigWithServerAndTlsEnabled (): void
351+ {
352+ $ extraConfig = [
353+ 'server ' => [
354+ 'host ' => '127.0.0.1 ' ,
355+ 'port ' => 8080 ,
356+ 'tls ' => [
357+ 'enabled ' => true ,
358+ 'options ' => [
359+ 'verify_peer ' => false ,
360+ ],
361+ ],
362+ 'origin_check ' => false ,
363+ 'ip_address_check ' => false ,
364+ 'keepalive_ping ' => false ,
365+ 'keepalive_interval ' => 30 ,
366+ ],
367+ ];
368+
369+ $ config = (new Processor ())->processConfiguration (new Configuration ([]), [$ extraConfig ]);
370+
371+ self ::assertEquals (
372+ array_merge (self ::getBundleDefaultConfig (), $ extraConfig ),
373+ $ config
374+ );
375+ }
376+
338377 public function testConfigWithAllowedOriginsList (): void
339378 {
340379 $ extraConfig = [
341380 'server ' => [
342381 'host ' => '127.0.0.1 ' ,
343382 'port ' => 8080 ,
383+ 'tls ' => [
384+ 'enabled ' => false ,
385+ 'options ' => [],
386+ ],
344387 'origin_check ' => true ,
345388 'ip_address_check ' => false ,
346389 'keepalive_ping ' => false ,
@@ -388,6 +431,10 @@ public function testConfigWithBlockedIpAddressList(): void
388431 'server ' => [
389432 'host ' => '127.0.0.1 ' ,
390433 'port ' => 8080 ,
434+ 'tls ' => [
435+ 'enabled ' => false ,
436+ 'options ' => [],
437+ ],
391438 'origin_check ' => false ,
392439 'ip_address_check ' => true ,
393440 'keepalive_ping ' => false ,
@@ -554,6 +601,10 @@ protected static function getBundleDefaultConfig(): array
554601 ],
555602 'shared_config ' => true ,
556603 'server ' => [
604+ 'tls ' => [
605+ 'enabled ' => false ,
606+ 'options ' => [],
607+ ],
557608 'origin_check ' => false ,
558609 'ip_address_check ' => false ,
559610 'keepalive_ping ' => false ,
0 commit comments