Completed
Push — develop ( b3d6aa...864ebf )
by Christoper
02:32
created
tests/Wubbajack/FileEncrypterTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $this->fileCrypt = new FileEncrypter($this->default_key);
53 53
         $this->test_file = $this->createTestFile();
54
-        $this->test_encrypted_file = __DIR__ .'/test.enc';
55
-        $this->test_decrypted_file = __DIR__ .'/test.dec.json';
54
+        $this->test_encrypted_file = __DIR__ . '/test.enc';
55
+        $this->test_decrypted_file = __DIR__ . '/test.dec.json';
56 56
     }
57 57
 
58 58
     protected function tearDown()
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         // Try testing with a non-existent source file
119 119
         $this->setExpectedException(EncryptException::class);
120
-        $this->fileCrypt->encrypt(__DIR__ .'/test.test', __DIR__ .'/test.test.enc');
120
+        $this->fileCrypt->encrypt(__DIR__ . '/test.test', __DIR__ . '/test.test.enc');
121 121
     }
122 122
 
123 123
     /**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             $this->assertInstanceOf(
154 154
                 DecryptException::class,
155 155
                 $e,
156
-                'Expected an instance of DecryptException containing a message about IV, got '. get_class($e)
156
+                'Expected an instance of DecryptException containing a message about IV, got ' . get_class($e)
157 157
             );
158 158
         }
159 159
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             $this->assertInstanceOf(
172 172
                 DecryptException::class,
173 173
                 $e,
174
-                'Expected an instance of DecryptException with a message about the checksum, got '. get_class($e)
174
+                'Expected an instance of DecryptException with a message about the checksum, got ' . get_class($e)
175 175
             );
176 176
         }
177 177
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             $this->assertInstanceOf(
190 190
                 DecryptException::class,
191 191
                 $e,
192
-                'Expected an instance of DecryptException with a message about the checksum, got '. get_class($e)
192
+                'Expected an instance of DecryptException with a message about the checksum, got ' . get_class($e)
193 193
             );
194 194
         }
195 195
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         $decrypted_data = '';
209 209
         $this->fileCrypt->streamDecrypt(
210 210
             $encryptedFile,
211
-            function ($data, $stream) use (&$decrypted_data, $encryptedFile) {
211
+            function($data, $stream) use (&$decrypted_data, $encryptedFile) {
212 212
                 if (feof($stream)) {
213 213
                     $data = substr($data, 0, -$encryptedFile->getPadding());
214 214
                 }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      */
246 246
     protected function createTestFile()
247 247
     {
248
-        $file = __DIR__ .'/test.json';
248
+        $file = __DIR__ . '/test.json';
249 249
 
250 250
         file_put_contents($file, json_encode(['unit' => 'test']));
251 251
         return $file;
Please login to merge, or discard this patch.