Code Duplication    Length = 7-8 lines in 4 locations

Tests/EncryptionResourceWrapperTest.php 4 locations

@@ 56-63 (lines=8) @@
53
    /**
54
     * @throws CryptoException
55
     */
56
    public function testEncryptResourceWithKeyEncryptsHandle()
57
    {
58
        $this->encryption->expects($this->once())
59
                         ->method('encryptResourceWithKey');
60
61
        $this->wrapper->encryptResourceWithKey(fopen('php://stdin', 'r'), fopen('php://memory', 'wb'), $this->getMockBuilder('Mes\Security\CryptoBundle\Model\KeyInterface')
62
                                                                                                            ->getMock());
63
    }
64
65
    /**
66
     * @throws CryptoException
@@ 68-75 (lines=8) @@
65
    /**
66
     * @throws CryptoException
67
     */
68
    public function testDecryptResourceWithKeyDecryptsEncryptedHandle()
69
    {
70
        $this->encryption->expects($this->once())
71
                         ->method('decryptResourceWithKey');
72
73
        $this->wrapper->decryptResourceWithKey(fopen('php://stdin', 'r'), fopen('php://memory', 'wb'), $this->getMockBuilder('Mes\Security\CryptoBundle\Model\KeyInterface')
74
                                                                                                            ->getMock());
75
    }
76
77
    /**
78
     * @expectedException \Mes\Security\CryptoBundle\Exception\CryptoException
@@ 121-127 (lines=7) @@
118
    /**
119
     * @throws CryptoException
120
     */
121
    public function testEncryptResourceWithPasswordEncryptsHandle()
122
    {
123
        $this->encryption->expects($this->once())
124
                         ->method('encryptResourceWithPassword');
125
126
        $this->wrapper->encryptResourceWithPassword(fopen('php://stdin', 'r'), fopen('php://memory', 'wb'), 'SecretPa$$word');
127
    }
128
129
    /**
130
     * @throws CryptoException
@@ 132-138 (lines=7) @@
129
    /**
130
     * @throws CryptoException
131
     */
132
    public function testDecryptResourceWithPasswordDecryptsEncryptedHandle()
133
    {
134
        $this->encryption->expects($this->once())
135
                         ->method('decryptResourceWithPassword');
136
137
        $this->wrapper->decryptResourceWithPassword(fopen('php://stdin', 'r'), fopen('php://memory', 'wb'), 'SecretPa$$word');
138
    }
139
140
    /**
141
     * @expectedException \Mes\Security\CryptoBundle\Exception\CryptoException