Skip to content

Commit

Permalink
Add CentralNIC registry
Browse files Browse the repository at this point in the history
  • Loading branch information
ben221199 committed Aug 30, 2024
1 parent 4dc104c commit 6603801
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Registries/CentralNIC.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
namespace YOCLIB\EPP\Registries;

use YOCLIB\EPP\EPPRegistry;

class CentralNIC extends EPPRegistry {

public function __construct(){
parent::__construct('ssl://epp.centralnic.com',700);
}

}
12 changes: 12 additions & 0 deletions src/Registries/CentralNICTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
namespace YOCLIB\EPP\Registries;

use YOCLIB\EPP\EPPRegistry;

class CentralNICTest extends EPPRegistry {

public function __construct(){
parent::__construct('ssl://epp-ote.centralnic.com',700);
}

}
6 changes: 6 additions & 0 deletions tests/EPPRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

use PHPUnit\Framework\TestCase;
use YOCLIB\EPP\EPPRegistry;
use YOCLIB\EPP\Registries\CentralNIC;
use YOCLIB\EPP\Registries\CentralNICTest;
use YOCLIB\EPP\Registries\EURID;
use YOCLIB\EPP\Registries\EURIDTest;
use YOCLIB\EPP\Registries\SIDN;
Expand All @@ -13,6 +15,8 @@ class EPPRegistryTest extends TestCase {
public function testHost(): void{
$this->assertEquals('tcp://example.com',(new class('tcp://example.com',1234) extends EPPRegistry{})->getHost());

$this->assertEquals('ssl://epp.centralnic.com',(new CentralNIC)->getHost());
$this->assertEquals('ssl://epp-ote.centralnic.com',(new CentralNICTest)->getHost());
$this->assertEquals('ssl://epp.registry.eu',(new EURID)->getHost());
$this->assertEquals('ssl://epp.tryout.registry.eu',(new EURIDTest)->getHost());
$this->assertEquals('ssl://drs.domain-registry.nl',(new SIDN)->getHost());
Expand All @@ -22,6 +26,8 @@ public function testHost(): void{
public function testPort(): void{
$this->assertEquals(1234,(new class('tcp://example.com',1234) extends EPPRegistry{})->getPort());

$this->assertEquals(700,(new CentralNIC)->getPort());
$this->assertEquals(700,(new CentralNICTest)->getPort());
$this->assertEquals(700,(new EURID)->getPort());
$this->assertEquals(700,(new EURIDTest)->getPort());
$this->assertEquals(700,(new SIDN)->getPort());
Expand Down

0 comments on commit 6603801

Please sign in to comment.