Code Duplication    Length = 13-13 lines in 2 locations

tests/Rdata/DnskeyTest.php 1 location

@@ 59-71 (lines=13) @@
56
        $this->assertEquals($output, $dnskey->toText());
57
    }
58
59
    public function testFromText(): void
60
    {
61
        $rdata = '256 3 5 AQPSKmynfzW4kyBv015MUG2DeIQ3 Cbl+BBZH4b/0PY1kxkmvHjcZc8no kfzj31GajIQKY+5CptLr3buXA10h WqTkF7H6RfoRqXQeogmMHfpftf6z Mv1LyBUgia7za6ZEzOJBOztyvhjL 742iU/TpPSEDhm2SNKLijfUppn1U aNvv4w==';
62
        $dnskey = new DNSKEY();
63
        $dnskey->setFlags(256);
64
        $dnskey->setProtocol(3);
65
        $dnskey->setAlgorithm(Algorithms::RSASHA1);
66
        $dnskey->setPublicKey(base64_decode(self::$publicKey));
67
68
        $fromText = new DNSKEY();
69
        $fromText->fromText($rdata);
70
        $this->assertEquals($dnskey, $fromText);
71
    }
72
73
    public function testWire(): void
74
    {

tests/Rdata/KeyTest.php 1 location

@@ 53-65 (lines=13) @@
50
        $this->assertEquals($output, $key->toText());
51
    }
52
53
    public function testFromText(): void
54
    {
55
        $rdata = '256 3 5 AQPSKmynfzW4kyBv015MUG2DeIQ3 Cbl+BBZH4b/0PY1kxkmvHjcZc8no kfzj31GajIQKY+5CptLr3buXA10h WqTkF7H6RfoRqXQeogmMHfpftf6z Mv1LyBUgia7za6ZEzOJBOztyvhjL 742iU/TpPSEDhm2SNKLijfUppn1U aNvv4w==';
56
        $key = new KEY();
57
        $key->setFlags(256);
58
        $key->setProtocol(3);
59
        $key->setAlgorithm(Algorithms::RSASHA1);
60
        $key->setPublicKey(base64_decode(self::$publicKey));
61
62
        $fromText = new KEY();
63
        $fromText->fromText($rdata);
64
        $this->assertEquals($key, $fromText);
65
    }
66
67
    public function testWire(): void
68
    {