Code Duplication    Length = 7-7 lines in 3 locations

src/Kunstmaan/UtilitiesBundle/Tests/unit/Helper/Cipher/CipherTest.php 1 location

@@ 43-49 (lines=7) @@
40
     * @covers \Kunstmaan\UtilitiesBundle\Helper\Cipher\Cipher::encrypt
41
     * @covers \Kunstmaan\UtilitiesBundle\Helper\Cipher\Cipher::decrypt
42
     */
43
    public function testEncryptAndDecrypt()
44
    {
45
        $encryptedValue = $this->cipher->encrypt(self::CONTENT);
46
        $this->assertNotEquals(self::CONTENT, $encryptedValue);
47
        $decryptedValue = $this->cipher->decrypt($encryptedValue);
48
        $this->assertEquals($decryptedValue, self::CONTENT);
49
    }
50
51
    public function testException()
52
    {

src/Kunstmaan/UtilitiesBundle/Tests/unit/Helper/Cipher/UrlSafeCipherTest.php 2 locations

@@ 43-49 (lines=7) @@
40
     * @covers \Kunstmaan\UtilitiesBundle\Helper\Cipher\UrlSafeCipher::encrypt
41
     * @covers \Kunstmaan\UtilitiesBundle\Helper\Cipher\UrlSafeCipher::decrypt
42
     */
43
    public function testEncryptDecrypt()
44
    {
45
        $encryptedValue = $this->cipher->encrypt(self::CONTENT);
46
        $this->assertNotEquals(self::CONTENT, $encryptedValue);
47
        $decryptedValue = $this->cipher->decrypt($encryptedValue);
48
        $this->assertEquals($decryptedValue, self::CONTENT);
49
    }
50
51
    /**
52
     * @covers \Kunstmaan\UtilitiesBundle\Helper\Cipher\UrlSafeCipher::hex2bin
@@ 54-60 (lines=7) @@
51
    /**
52
     * @covers \Kunstmaan\UtilitiesBundle\Helper\Cipher\UrlSafeCipher::hex2bin
53
     */
54
    public function testHex2bin()
55
    {
56
        $hexValue = bin2hex(self::CONTENT);
57
        $this->assertNotEquals(self::CONTENT, $hexValue);
58
        $binValue = $this->cipher->hex2bin($hexValue);
59
        $this->assertEquals($binValue, self::CONTENT);
60
    }
61
}
62