Code Duplication    Length = 11-12 lines in 3 locations

tests/Rdata/CdnskeyTest.php 1 location

@@ 28-39 (lines=12) @@
25
     */
26
    private static $publicKey = 'AQPSKmynfzW4kyBv015MUG2DeIQ3Cbl+BBZH4b/0PY1kxkmvHjcZc8nokfzj31GajIQKY+5CptLr3buXA10hWqTkF7H6RfoRqXQeogmMHfpftf6zMv1LyBUgia7za6ZEzOJBOztyvhjL742iU/TpPSEDhm2SNKLijfUppn1UaNvv4w==';
27
28
    public function testFactory(): void
29
    {
30
        $cdnskey = Factory::CDNSKEY(256, Algorithms::RSASHA1, base64_decode(self::$publicKey));
31
        $output = '256 3 5 '.self::$publicKey;
32
33
        $this->assertInstanceOf(CDNSKEY::class, $cdnskey);
34
        $this->assertEquals(256, $cdnskey->getFlags());
35
        $this->assertEquals(5, $cdnskey->getAlgorithm());
36
        $this->assertEquals(base64_decode(self::$publicKey), $cdnskey->getPublicKey());
37
        $this->assertEquals(3, $cdnskey->getProtocol());
38
        $this->assertEquals($output, $cdnskey->toText());
39
    }
40
}
41

tests/Rdata/DnskeyTest.php 1 location

@@ 47-57 (lines=11) @@
44
        $dnskey->setProtocol(2);
45
    }
46
47
    public function testFactory(): void
48
    {
49
        $dnskey = Factory::DNSKEY(256, Algorithms::RSASHA1, base64_decode(self::$publicKey));
50
        $output = '256 3 5 '.self::$publicKey;
51
52
        $this->assertEquals(256, $dnskey->getFlags());
53
        $this->assertEquals(5, $dnskey->getAlgorithm());
54
        $this->assertEquals(base64_decode(self::$publicKey), $dnskey->getPublicKey());
55
        $this->assertEquals(3, $dnskey->getProtocol());
56
        $this->assertEquals($output, $dnskey->toText());
57
    }
58
59
    public function testFromText(): void
60
    {

tests/Rdata/KeyTest.php 1 location

@@ 41-51 (lines=11) @@
38
        $this->assertEquals($expectation, $key->toText());
39
    }
40
41
    public function testFactory(): void
42
    {
43
        $key = Factory::KEY(256, 3, Algorithms::RSASHA1, base64_decode(self::$publicKey));
44
        $output = '256 3 5 '.self::$publicKey;
45
46
        $this->assertEquals(256, $key->getFlags());
47
        $this->assertEquals(5, $key->getAlgorithm());
48
        $this->assertEquals(base64_decode(self::$publicKey), $key->getPublicKey());
49
        $this->assertEquals(3, $key->getProtocol());
50
        $this->assertEquals($output, $key->toText());
51
    }
52
53
    public function testFromText(): void
54
    {