Completed
Push — master ( 953027...3b6ea8 )
by
unknown
21:16 queued 15s
created
apps/encryption/tests/Crypto/EncryptAllTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
 		$this->keyManager->expects($this->exactly(2))->method('userHasKeys')
198 198
 			->willReturnCallback(
199
-				function ($user) {
199
+				function($user) {
200 200
 					if ($user === 'user1') {
201 201
 						return false;
202 202
 					}
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 		$encryptAllCalls = [];
250 250
 		$encryptAll->expects($this->exactly(2))
251 251
 			->method('encryptUsersFiles')
252
-			->willReturnCallback(function ($uid) use (&$encryptAllCalls) {
252
+			->willReturnCallback(function($uid) use (&$encryptAllCalls) {
253 253
 				$encryptAllCalls[] = $uid;
254 254
 			});
255 255
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
 		$this->view->expects($this->any())->method('is_dir')
308 308
 			->willReturnCallback(
309
-				function ($path) {
309
+				function($path) {
310 310
 					if ($path === '/user1/files/foo') {
311 311
 						return true;
312 312
 					}
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 		$encryptAllCalls = [];
318 318
 		$encryptAll->expects($this->exactly(2))
319 319
 			->method('encryptFile')
320
-			->willReturnCallback(function (string $path) use (&$encryptAllCalls) {
320
+			->willReturnCallback(function(string $path) use (&$encryptAllCalls) {
321 321
 				$encryptAllCalls[] = $path;
322 322
 			});
323 323
 
Please login to merge, or discard this patch.
apps/encryption/tests/KeyManagerTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	public function testRecoveryKeyExists(): void {
117 117
 		$this->keyStorageMock->expects($this->any())
118 118
 			->method('getSystemUserKey')
119
-			->with($this->equalTo($this->systemKeyId . '.publicKey'))
119
+			->with($this->equalTo($this->systemKeyId.'.publicKey'))
120 120
 			->willReturn('recoveryKey');
121 121
 
122 122
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	public function testCheckRecoveryKeyPassword(): void {
127 127
 		$this->keyStorageMock->expects($this->any())
128 128
 			->method('getSystemUserKey')
129
-			->with($this->equalTo($this->systemKeyId . '.privateKey'))
129
+			->with($this->equalTo($this->systemKeyId.'.privateKey'))
130 130
 			->willReturn('recoveryKey');
131 131
 		$this->cryptMock->expects($this->any())
132 132
 			->method('decryptPrivateKey')
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
 		$this->keyStorageMock->expects($this->exactly(2))
196 196
 			->method('getUserKey')
197
-			->willReturnCallback(function ($uid, $keyID, $encryptionModuleId) {
197
+			->willReturnCallback(function($uid, $keyID, $encryptionModuleId) {
198 198
 				if ($keyID === 'privateKey') {
199 199
 					return '';
200 200
 				}
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 
211 211
 		$this->keyStorageMock->expects($this->exactly(2))
212 212
 			->method('getUserKey')
213
-			->willReturnCallback(function ($uid, $keyID, $encryptionModuleId) {
213
+			->willReturnCallback(function($uid, $keyID, $encryptionModuleId) {
214 214
 				if ($keyID === 'publicKey') {
215 215
 					return '';
216 216
 				}
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 		$sessionSetStatusCalls = [];
249 249
 		$this->sessionMock->expects($this->exactly(2))
250 250
 			->method('setStatus')
251
-			->willReturnCallback(function (string $status) use (&$sessionSetStatusCalls) {
251
+			->willReturnCallback(function(string $status) use (&$sessionSetStatusCalls) {
252 252
 				$sessionSetStatusCalls[] = $status;
253 253
 			});
254 254
 
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 			->method('getFileKey')
383 383
 			->willReturnMap([
384 384
 				[$path, 'fileKey', 'OC_DEFAULT_MODULE', $encryptedFileKey],
385
-				[$path, $expectedUid . '.shareKey', 'OC_DEFAULT_MODULE', 'fileKey'],
385
+				[$path, $expectedUid.'.shareKey', 'OC_DEFAULT_MODULE', 'fileKey'],
386 386
 			]);
387 387
 
388 388
 		$this->utilMock->expects($this->any())->method('isMasterKeyEnabled')
@@ -465,13 +465,13 @@  discard block
 block discarded – undo
465 465
 
466 466
 		$this->keyStorageMock->expects($this->any())
467 467
 			->method('getSystemUserKey')
468
-			->willReturnCallback(function ($keyId, $encryptionModuleId) {
468
+			->willReturnCallback(function($keyId, $encryptionModuleId) {
469 469
 				return $keyId;
470 470
 			});
471 471
 
472 472
 		$this->utilMock->expects($this->any())
473 473
 			->method('isRecoveryEnabledForUser')
474
-			->willReturnCallback(function ($uid) {
474
+			->willReturnCallback(function($uid) {
475 475
 				if ($uid === 'user1') {
476 476
 					return true;
477 477
 				}
@@ -498,9 +498,9 @@  discard block
 block discarded – undo
498 498
 	 */
499 499
 	public static function dataTestAddSystemKeys(): array {
500 500
 		return [
501
-			[['public' => true],[], 'user1', ['publicShareKey', 'recoveryKey']],
501
+			[['public' => true], [], 'user1', ['publicShareKey', 'recoveryKey']],
502 502
 			[['public' => false], [], 'user1', ['recoveryKey']],
503
-			[['public' => true],[], 'user2', ['publicShareKey']],
503
+			[['public' => true], [], 'user2', ['publicShareKey']],
504 504
 			[['public' => false], [], 'user2', []],
505 505
 		];
506 506
 	}
Please login to merge, or discard this patch.
tests/lib/App/AppManagerTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
 
46 46
 		$config->expects($this->any())
47 47
 			->method('getValue')
48
-			->willReturnCallback(function ($app, $key, $default) use (&$appConfig) {
48
+			->willReturnCallback(function($app, $key, $default) use (&$appConfig) {
49 49
 				return (isset($appConfig[$app]) and isset($appConfig[$app][$key])) ? $appConfig[$app][$key] : $default;
50 50
 			});
51 51
 		$config->expects($this->any())
52 52
 			->method('setValue')
53
-			->willReturnCallback(function ($app, $key, $value) use (&$appConfig) {
53
+			->willReturnCallback(function($app, $key, $value) use (&$appConfig) {
54 54
 				if (!isset($appConfig[$app])) {
55 55
 					$appConfig[$app] = [];
56 56
 				}
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			});
59 59
 		$config->expects($this->any())
60 60
 			->method('getValues')
61
-			->willReturnCallback(function ($app, $key) use (&$appConfig) {
61
+			->willReturnCallback(function($app, $key) use (&$appConfig) {
62 62
 				if ($app) {
63 63
 					return $appConfig[$app];
64 64
 				} else {
@@ -160,16 +160,16 @@  discard block
 block discarded – undo
160 160
 	}
161 161
 
162 162
 	public static function dataGetAppIcon(): array {
163
-		$nothing = function ($appId) {
163
+		$nothing = function($appId) {
164 164
 			self::assertEquals('test', $appId);
165 165
 			throw new \RuntimeException();
166 166
 		};
167 167
 
168
-		$createCallback = function ($workingIcons) {
169
-			return function ($appId, $icon) use ($workingIcons) {
168
+		$createCallback = function($workingIcons) {
169
+			return function($appId, $icon) use ($workingIcons) {
170 170
 				self::assertEquals('test', $appId);
171 171
 				if (in_array($icon, $workingIcons)) {
172
-					return '/path/' . $icon;
172
+					return '/path/'.$icon;
173 173
 				}
174 174
 				throw new \RuntimeException();
175 175
 			};
@@ -460,13 +460,13 @@  discard block
 block discarded – undo
460 460
 	}
461 461
 
462 462
 	public function testGetAppPath(): void {
463
-		$this->assertEquals(\OC::$SERVERROOT . '/apps/files', $this->manager->getAppPath('files'));
463
+		$this->assertEquals(\OC::$SERVERROOT.'/apps/files', $this->manager->getAppPath('files'));
464 464
 	}
465 465
 
466 466
 	public function testGetAppPathSymlink(): void {
467 467
 		$fakeAppDirname = sha1(uniqid('test', true));
468
-		$fakeAppPath = sys_get_temp_dir() . '/' . $fakeAppDirname;
469
-		$fakeAppLink = \OC::$SERVERROOT . '/' . $fakeAppDirname;
468
+		$fakeAppPath = sys_get_temp_dir().'/'.$fakeAppDirname;
469
+		$fakeAppLink = \OC::$SERVERROOT.'/'.$fakeAppDirname;
470 470
 
471 471
 		mkdir($fakeAppPath);
472 472
 		if (symlink($fakeAppPath, $fakeAppLink) === false) {
@@ -476,11 +476,11 @@  discard block
 block discarded – undo
476 476
 		// Use the symlink as the app path
477 477
 		\OC::$APPSROOTS[] = [
478 478
 			'path' => $fakeAppLink,
479
-			'url' => \OC::$WEBROOT . '/' . $fakeAppDirname,
479
+			'url' => \OC::$WEBROOT.'/'.$fakeAppDirname,
480 480
 			'writable' => false,
481 481
 		];
482 482
 
483
-		$fakeTestAppPath = $fakeAppPath . '/' . 'test-test-app';
483
+		$fakeTestAppPath = $fakeAppPath.'/'.'test-test-app';
484 484
 		mkdir($fakeTestAppPath);
485 485
 
486 486
 		$generatedAppPath = $this->manager->getAppPath('test-test-app');
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 		unlink($fakeAppLink);
490 490
 		rmdir($fakeAppPath);
491 491
 
492
-		$this->assertEquals($fakeAppLink . '/test-test-app', $generatedAppPath);
492
+		$this->assertEquals($fakeAppLink.'/test-test-app', $generatedAppPath);
493 493
 	}
494 494
 
495 495
 	public function testGetAppPathFail(): void {
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
 		$manager->expects($this->any())
634 634
 			->method('getAppInfo')
635 635
 			->willReturnCallback(
636
-				function ($appId) use ($appInfos) {
636
+				function($appId) use ($appInfos) {
637 637
 					return $appInfos[$appId];
638 638
 				}
639 639
 			);
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 		$manager->expects($this->any())
693 693
 			->method('getAppInfo')
694 694
 			->willReturnCallback(
695
-				function ($appId) use ($appInfos) {
695
+				function($appId) use ($appInfos) {
696 696
 					return $appInfos[$appId];
697 697
 				}
698 698
 			);
Please login to merge, or discard this patch.