@@ 65-77 (lines=13) @@ | ||
62 | $this->assertEquals($expectation, $csync->toWire()); |
|
63 | } |
|
64 | ||
65 | public function testFromText(): void |
|
66 | { |
|
67 | $csync = new CSYNC(); |
|
68 | $csync->setFlags(3); |
|
69 | $csync->setSoaSerial(66); |
|
70 | $csync->addType(A::TYPE); |
|
71 | $csync->addType(NS::TYPE); |
|
72 | $csync->addType(AAAA::TYPE); |
|
73 | ||
74 | $fromText = new CSYNC(); |
|
75 | $fromText->fromText('66 3 A NS AAAA'); |
|
76 | $this->assertEquals($csync, $fromText); |
|
77 | } |
|
78 | ||
79 | /** |
|
80 | * @throws \Badcow\DNS\Rdata\DecodeException |
@@ 27-39 (lines=13) @@ | ||
24 | ||
25 | class NsecTest extends TestCase |
|
26 | { |
|
27 | public function testOutput(): void |
|
28 | { |
|
29 | $expectation = 'host.example.com. A MX RRSIG NSEC'; |
|
30 | ||
31 | $nsec = new NSEC(); |
|
32 | $nsec->setNextDomainName('host.example.com.'); |
|
33 | $nsec->addType(A::TYPE); |
|
34 | $nsec->addType(MX::TYPE); |
|
35 | $nsec->addType(RRSIG::TYPE); |
|
36 | $nsec->addType(NSEC::TYPE); |
|
37 | ||
38 | $this->assertEquals($expectation, $nsec->toText()); |
|
39 | } |
|
40 | ||
41 | public function testFactory(): void |
|
42 | { |