Skip to content

Commit 3af4b47

Browse files
Merge pull request #43 from lifeofguenter/hello-test
hello-frame style fixes + test
2 parents 7fd26f4 + 31de146 commit 3af4b47

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/AfriCC/EPP/Frame/Hello.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313

1414
use AfriCC\EPP\AbstractFrame;
1515

16+
/**
17+
* @see https://tools.ietf.org/html/rfc5730#section-2.3
18+
*/
1619
class Hello extends AbstractFrame
1720
{
1821
public function __construct()
1922
{
20-
parent::__construct();
23+
parent::__construct();
2124
$this->set('//epp:epp/epp:hello');
2225
}
2326
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace AfriCC\EPP\Frame;
4+
5+
use PHPUnit\Framework\TestCase;
6+
7+
class HelloTest extends TestCase
8+
{
9+
public function testHelloFrame()
10+
{
11+
$frame = new Hello();
12+
13+
$this->assertXmlStringEqualsXmlString(
14+
(string) $frame,
15+
'<?xml version="1.0" encoding="UTF-8" standalone="no"?>
16+
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
17+
<hello/>
18+
</epp>
19+
'
20+
);
21+
}
22+
}

0 commit comments

Comments
 (0)