Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/Clients/Domains/TLDsApiInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ public function test_info_com(): void
Assert::assertSame(113, $languageCodes->count());
}

public function test_info_com_nullables(): void
{
$json = file_get_contents(__DIR__ . '/../../Domain/data/tldinfo_com-nullables.json');

assert(is_string($json));

$sdk = MockedClientFactory::makeSdk(
200,
$json,
MockedClientFactory::assertRoute('GET', 'v2/tlds/com/info', $this)
);

$response = $sdk->tlds->info('com');
$this->assertInstanceOf(TLDInfo::class, $response);
}

public function test_info_nl(): void
{
$json = file_get_contents(__DIR__ . '/../../Domain/data/tldinfo_nl.json');
Expand Down
93 changes: 93 additions & 0 deletions tests/Domain/data/tldinfo_com-nullables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"metadata": {
"renewDomainPeriods": [
12,
24,
36,
48,
60,
72,
84,
96,
108,
120
],
"whoisExposure": "FULL",
"gdprCategory": "UNKNOWN",
"createDomainPeriods": [
12,
24,
36,
48,
60,
72,
84,
96,
108,
120
],
"autoRenewDomainPeriods": [
12
],
"registrant": {
"organizationRequired": false,
"organizationAllowed": true
},
"adjustableAuthCode": true,
"creationRequiresPreValidation": false,
"transferFOA": true,
"featuresAvailable": [
"RESTORE",
"CREATE",
"PRIVACY_PROTECT",
"RENEW",
"TRANSFER",
"UPDATE"
],
"customAuthcodeSupport": true,
"adminContacts": {
"min": 1,
"max": 10,
"required": true,
"organizationRequired": false,
"organizationAllowed": true
},
"billingContacts": {
"min": 0,
"max": 10,
"required": false,
"organizationRequired": false,
"organizationAllowed": true
},
"techContacts": {
"min": 1,
"max": 10,
"required": true,
"organizationRequired": false,
"organizationAllowed": true
},
"nameservers": {
"min": 0,
"max": 10,
"required": false
},
"domainSyntax": {
"minLength": 3,
"maxLength": 63,
"idnType": "UTS46",
"idnSupport": true
},
"transferRequiresAuthcode": true,
"transferSupportsAuthcode": true,
"registrantChangeApprovalRequired": true,
"registrantChangeTransferLock": false,
"renewalOnTransfer": "NO_CHANGE",
"restoreIncludesRenew": false,
"premiumSupport": "NO"
},
"provider": "Verisign",
"applicableFor": [
"com",
"net"
]
}