@@ -565,4 +565,39 @@ public function testWithMultiLevelPrivateDomain(): void
565565 self ::assertTrue ($ domain ->suffix ()->isPrivate ());
566566 self ::assertSame ('lt.eu.org ' , $ domain ->suffix ()->value ());
567567 }
568+
569+ #[DataProvider('privateDomainWithWildcardProvider ' )]
570+ public function testWithPrivateDomainThatHasWildcardSubdomain (string $ inputDomain , string $ expectedSuffix ): void
571+ {
572+ $ domain = self ::$ rules ->getPrivateDomain ($ inputDomain );
573+
574+ self ::assertSame ($ expectedSuffix , $ domain ->suffix ()->value ());
575+ self ::assertSame (false , $ domain ->suffix ()->isICANN ());
576+ self ::assertSame (true , $ domain ->suffix ()->isPrivate ());
577+ }
578+
579+ /**
580+ * @return iterable<string, array{inputDomain: string, expectedSuffix: string}>
581+ */
582+ public static function privateDomainWithWildcardProvider (): iterable
583+ {
584+ return [
585+ 'appspot subdomain ' => [
586+ 'inputDomain ' => 'test-domain.de.r.appspot.com ' ,
587+ 'expectedSuffix ' => 'de.r.appspot.com ' ,
588+ ],
589+ 'appspot root domain ' => [
590+ 'inputDomain ' => 'test-domain.appspot.com ' ,
591+ 'expectedSuffix ' => 'appspot.com ' ,
592+ ],
593+ 'qcx subdomain ' => [
594+ 'inputDomain ' => 'test-domain.de.sys.qcx.io ' ,
595+ 'expectedSuffix ' => 'de.sys.qcx.io ' ,
596+ ],
597+ 'qcx root domain ' => [
598+ 'inputDomain ' => 'test-domain.qcx.io ' ,
599+ 'expectedSuffix ' => 'qcx.io ' ,
600+ ],
601+ ];
602+ }
568603}
0 commit comments