@@ -199,8 +199,8 @@ |
||
199 | 199 | } |
200 | 200 | |
201 | 201 | /** |
202 | - * @param $filename |
|
203 | - * @param $mode |
|
202 | + * @param string $filename |
|
203 | + * @param string $mode |
|
204 | 204 | * |
205 | 205 | * @return resource |
206 | 206 | */ |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | protected function setUp() |
34 | 34 | { |
35 | 35 | $this->encryption = $this->getMockBuilder('Mes\Security\CryptoBundle\EncryptionInterface') |
36 | - ->getMock(); |
|
36 | + ->getMock(); |
|
37 | 37 | $this->wrapper = new EncryptionWrapper($this->encryption); |
38 | 38 | } |
39 | 39 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function testEncryptResourceWithKeyEncryptsHandle() |
57 | 57 | { |
58 | 58 | $this->encryption->expects($this->once()) |
59 | - ->method('encryptResourceWithKey'); |
|
59 | + ->method('encryptResourceWithKey'); |
|
60 | 60 | |
61 | 61 | $this->wrapper->encryptResourceWithKey(fopen('php://stdin', 'r'), fopen('php://memory', 'wb'), $this->getMockBuilder('Mes\Security\CryptoBundle\Model\KeyInterface') |
62 | 62 | ->getMock()); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function testDecryptResourceWithKeyDecryptsEncryptedHandle() |
69 | 69 | { |
70 | 70 | $this->encryption->expects($this->once()) |
71 | - ->method('decryptResourceWithKey'); |
|
71 | + ->method('decryptResourceWithKey'); |
|
72 | 72 | |
73 | 73 | $this->wrapper->decryptResourceWithKey(fopen('php://stdin', 'r'), fopen('php://memory', 'wb'), $this->getMockBuilder('Mes\Security\CryptoBundle\Model\KeyInterface') |
74 | 74 | ->getMock()); |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | { |
82 | 82 | try { |
83 | 83 | $this->encryption->expects($this->once()) |
84 | - ->method('encryptResourceWithKey') |
|
85 | - ->will($this->throwException(new BaseCryptoException())); |
|
84 | + ->method('encryptResourceWithKey') |
|
85 | + ->will($this->throwException(new BaseCryptoException())); |
|
86 | 86 | } catch (BaseCryptoException $e) { |
87 | 87 | $this->throwException(new CryptoException()); |
88 | 88 | } |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | { |
99 | 99 | try { |
100 | 100 | $this->encryption->expects($this->once()) |
101 | - ->method('decryptResourceWithKey') |
|
102 | - ->will($this->throwException(new BaseCryptoException())); |
|
101 | + ->method('decryptResourceWithKey') |
|
102 | + ->will($this->throwException(new BaseCryptoException())); |
|
103 | 103 | } catch (BaseCryptoException $e) { |
104 | 104 | $this->throwException(new CryptoException()); |
105 | 105 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | public function testEncryptResourceWithPasswordEncryptsHandle() |
122 | 122 | { |
123 | 123 | $this->encryption->expects($this->once()) |
124 | - ->method('encryptResourceWithPassword'); |
|
124 | + ->method('encryptResourceWithPassword'); |
|
125 | 125 | |
126 | 126 | $this->wrapper->encryptResourceWithPassword(fopen('php://stdin', 'r'), fopen('php://memory', 'wb'), 'SecretPa$$word'); |
127 | 127 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | public function testDecryptResourceWithPasswordDecryptsEncryptedHandle() |
133 | 133 | { |
134 | 134 | $this->encryption->expects($this->once()) |
135 | - ->method('decryptResourceWithPassword'); |
|
135 | + ->method('decryptResourceWithPassword'); |
|
136 | 136 | |
137 | 137 | $this->wrapper->decryptResourceWithPassword(fopen('php://stdin', 'r'), fopen('php://memory', 'wb'), 'SecretPa$$word'); |
138 | 138 | } |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | { |
145 | 145 | try { |
146 | 146 | $this->encryption->expects($this->once()) |
147 | - ->method('encryptResourceWithPassword') |
|
148 | - ->will($this->throwException(new BaseCryptoException())); |
|
147 | + ->method('encryptResourceWithPassword') |
|
148 | + ->will($this->throwException(new BaseCryptoException())); |
|
149 | 149 | } catch (BaseCryptoException $e) { |
150 | 150 | $this->throwException(new CryptoException()); |
151 | 151 | } |
@@ -160,8 +160,8 @@ discard block |
||
160 | 160 | { |
161 | 161 | try { |
162 | 162 | $this->encryption->expects($this->once()) |
163 | - ->method('decryptResourceWithPassword') |
|
164 | - ->will($this->throwException(new BaseCryptoException())); |
|
163 | + ->method('decryptResourceWithPassword') |
|
164 | + ->will($this->throwException(new BaseCryptoException())); |
|
165 | 165 | } catch (BaseCryptoException $e) { |
166 | 166 | $this->throwException(new CryptoException()); |
167 | 167 | } |