Skip to content

Commit bb05800

Browse files
committed
Update testing suite
1 parent 185a14e commit bb05800

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All Notable changes to `PHP Domain Parser` starting from the **5.x** series will
1010

1111
### Fixed
1212

13-
- [#321](https://github.com/jeremykendall/php-domain-parser/issues/321) improve resolving private domain suffix
13+
- [#321](https://github.com/jeremykendall/php-domain-parser/issues/321) improve resolving private domain suffix. `Rules::getPrivateDomain` will now throw if the domain name does not contain a "private" TLD.
1414

1515
### Deprecated
1616

src/RulesTest.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ public function effectiveTLDProvider(): iterable
594594
];
595595
}
596596

597-
public function testIssue321(): void
597+
public function testIssue321Success(): void
598598
{
599599
$result = self::$rules->resolve('node857-gelofesta.users.scale.virtualcloud.com.br');
600600
self::assertSame('users.scale.virtualcloud.com.br', $result->suffix()->value());
@@ -604,4 +604,11 @@ public function testIssue321(): void
604604
self::assertSame('com.br', $result->suffix()->value());
605605
self::assertTrue($result->suffix()->isICANN());
606606
}
607+
608+
public function testIssue321Failure(): void
609+
{
610+
$this->expectException(UnableToResolveDomain::class);
611+
612+
self::$rules->getPrivateDomain('clientportal.virtualcloud.com.br');
613+
}
607614
}

0 commit comments

Comments
 (0)