@@ -1128,7 +1128,7 @@ public function testWithDotCoSubdomain()
11281128 {
11291129 $ routes = $ this ->getCollector ();
11301130
1131- $ _SERVER ['HTTP_HOST ' ] = 'example.uk.co ' ;
1131+ $ _SERVER ['HTTP_HOST ' ] = 'example.co.uk ' ;
11321132
11331133 $ routes ->add ('/objects/(:alphanum) ' , 'Admin::objectsList/$1 ' , ['subdomain ' => 'sales ' ]);
11341134 $ routes ->add ('/objects/(:alphanum) ' , 'App::objectsList/$1 ' );
@@ -1156,6 +1156,20 @@ public function testWithDifferentSubdomainMissing()
11561156 $ this ->assertSame ($ expects , $ routes ->getRoutes ());
11571157 }
11581158
1159+ /**
1160+ * @see https://github.com/codeigniter4/CodeIgniter4/issues/5959
1161+ */
1162+ public function testWithNoSubdomainAndDot ()
1163+ {
1164+ $ _SERVER ['HTTP_HOST ' ] = 'example.com ' ;
1165+
1166+ $ routes = $ this ->getCollector ();
1167+
1168+ $ routes ->add ('/objects/(:alphanum) ' , 'App::objectsList/$1 ' , ['subdomain ' => '* ' ]);
1169+
1170+ $ this ->assertSame ([], $ routes ->getRoutes ());
1171+ }
1172+
11591173 /**
11601174 * @see https://github.com/codeigniter4/CodeIgniter4/issues/1692
11611175 */
@@ -1448,7 +1462,7 @@ public function testRouteToWithGenericSubdomainNot()
14481462
14491463 $ routes ->get ('i/(:any) ' , 'App\Controllers\Site\CDoc::item/$1 ' , ['subdomain ' => '* ' , 'as ' => 'doc_item ' ]);
14501464
1451- $ this ->assertSame ( ' /i/sth ' , $ routes ->reverseRoute ('doc_item ' , 'sth ' ));
1465+ $ this ->assertFalse ( $ routes ->reverseRoute ('doc_item ' , 'sth ' ));
14521466 }
14531467
14541468 public function testRouteToWithoutSubdomainMatch ()
0 commit comments