Skip to content

Commit

Permalink
Rename element
Browse files Browse the repository at this point in the history
  • Loading branch information
ben221199 committed Aug 12, 2024
1 parent da3f3fc commit faaad6f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/EPPElementImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use YOCLIB\EPP\Elements\EPPAbsoluteElementImpl;
use YOCLIB\EPP\Elements\EPPAccessElementImpl;
use YOCLIB\EPP\Elements\EPPAdministratorElementImpl;
use YOCLIB\EPP\Elements\EPPAdministrationElementImpl;
use YOCLIB\EPP\Elements\EPPAllElementImpl;
use YOCLIB\EPP\Elements\EPPBusinessElementImpl;
use YOCLIB\EPP\Elements\EPPCheckElementImpl;
Expand Down Expand Up @@ -102,7 +102,7 @@ public static function getCustomElementsEPP(): array{
'urn:ietf:params:xml:ns:epp-1.0' => [
'absolute' => EPPAbsoluteElementImpl::class,
'access' => EPPAccessElementImpl::class,
'admin' => EPPAdministratorElementImpl::class,
'admin' => EPPAdministrationElementImpl::class,
'all' => EPPAllElementImpl::class,
'business' => EPPBusinessElementImpl::class,
'check' => EPPCheckElementImpl::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

use YOCLIB\EPP\EPPElement;

interface EPPAdministratorElement extends EPPElement{
interface EPPAdministrationElement extends EPPElement{

}
9 changes: 9 additions & 0 deletions src/Elements/EPPAdministrationElementImpl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace YOCLIB\EPP\Elements;

use YOCLIB\EPP\EPPElementImpl;

class EPPAdministrationElementImpl extends EPPElementImpl implements EPPAdministrationElement{

}
9 changes: 0 additions & 9 deletions src/Elements/EPPAdministratorElementImpl.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/Elements/EPPPurposeElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

interface EPPPurposeElement extends EPPElement {

public function getAdministrator(): ?EPPAdministratorElement;
public function getAdministration(): ?EPPAdministrationElement;

public function getContact(): ?EPPContactElement;

Expand Down
2 changes: 1 addition & 1 deletion src/Elements/EPPPurposeElementImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class EPPPurposeElementImpl extends EPPElementImpl implements EPPPurposeElement {

public function getAdministrator(): ?EPPAdministratorElement{
public function getAdministration(): ?EPPAdministrationElement{
return $this->getElementsByTagNameNS($this->namespaceURI,'admin')[0] ?? null;
}

Expand Down
8 changes: 4 additions & 4 deletions tests/EPPElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use YOCLIB\EPP\Elements\EPPAbsoluteElement;
use YOCLIB\EPP\Elements\EPPAccessElement;
use YOCLIB\EPP\Elements\EPPAdministratorElement;
use YOCLIB\EPP\Elements\EPPAdministrationElement;
use YOCLIB\EPP\Elements\EPPAllElement;
use YOCLIB\EPP\Elements\EPPBusinessElement;
use YOCLIB\EPP\Elements\EPPCheckElement;
Expand Down Expand Up @@ -488,16 +488,16 @@ public function testEPPPurposeElement(): void{
$purpose = $document->createElementNS('urn:ietf:params:xml:ns:epp-1.0','purpose');
$this->assertInstanceOf(EPPPurposeElement::class,$purpose);

$this->assertNull($purpose->getAdministrator());
$this->assertNull($purpose->getAdministration());
$this->assertNull($purpose->getContact());
$this->assertNull($purpose->getOther());
$this->assertNull($purpose->getProvisioning());

$admin = $document->createElementNS('urn:ietf:params:xml:ns:epp-1.0','admin');
$purpose->appendChild($admin);

$this->assertEquals($admin,$purpose->getAdministrator());
$this->assertInstanceOf(EPPAdministratorElement::class,$admin);
$this->assertEquals($admin,$purpose->getAdministration());
$this->assertInstanceOf(EPPAdministrationElement::class,$admin);

$contact = $document->createElementNS('urn:ietf:params:xml:ns:epp-1.0','contact');
$purpose->appendChild($contact);
Expand Down

0 comments on commit faaad6f

Please sign in to comment.