Completed
Push — master ( 176f57...2c53d3 )
by Daniel
32:12
created
tests/lib/Template/JSResourceLocatorTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 	}
58 58
 
59 59
 	private function rrmdir($directory) {
60
-		$files = array_diff(scandir($directory), ['.','..']);
60
+		$files = array_diff(scandir($directory), ['.', '..']);
61 61
 		foreach ($files as $file) {
62
-			if (is_dir($directory . '/' . $file)) {
63
-				$this->rrmdir($directory . '/' . $file);
62
+			if (is_dir($directory.'/'.$file)) {
63
+				$this->rrmdir($directory.'/'.$file);
64 64
 			} else {
65
-				unlink($directory . '/' . $file);
65
+				unlink($directory.'/'.$file);
66 66
 			}
67 67
 		}
68 68
 		return rmdir($directory);
@@ -77,15 +77,15 @@  discard block
 block discarded – undo
77 77
 
78 78
 		// First create new apps path, and a symlink to it
79 79
 		$apps_dirname = $this->randomString();
80
-		$new_apps_path = sys_get_temp_dir() . '/' . $apps_dirname;
81
-		$new_apps_path_symlink = $new_apps_path . '_link';
80
+		$new_apps_path = sys_get_temp_dir().'/'.$apps_dirname;
81
+		$new_apps_path_symlink = $new_apps_path.'_link';
82 82
 		$this->assertTrue((
83 83
 			mkdir($new_apps_path) && symlink($apps_dirname, $new_apps_path_symlink)
84 84
 		), 'Setup of apps path failed');
85 85
 
86 86
 		// Create an app within that path
87 87
 		$this->assertTrue((
88
-			mkdir($new_apps_path . '/' . $appName) && touch($new_apps_path . '/' . $appName . '/' . 'test-file.js')
88
+			mkdir($new_apps_path.'/'.$appName) && touch($new_apps_path.'/'.$appName.'/'.'test-file.js')
89 89
 		), 'Setup of app within the new apps path failed');
90 90
 
91 91
 		// Use the symlink as the app path
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 		$file = $resource[2];
112 112
 
113 113
 		$expectedRoot = $new_apps_path;
114
-		$expectedWebRoot = \OC::$WEBROOT . '/js-apps-test';
115
-		$expectedFile = $appName . '/test-file.js';
114
+		$expectedWebRoot = \OC::$WEBROOT.'/js-apps-test';
115
+		$expectedFile = $appName.'/test-file.js';
116 116
 
117 117
 		$this->assertEquals($expectedRoot, $root,
118 118
 			'Ensure the app path symlink is resolved into the real path');
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	public function testFindModuleJSWithFallback(): void {
148 148
 		// First create new apps path, and a symlink to it
149 149
 		$apps_dirname = $this->randomString();
150
-		$new_apps_path = sys_get_temp_dir() . '/' . $apps_dirname;
150
+		$new_apps_path = sys_get_temp_dir().'/'.$apps_dirname;
151 151
 		mkdir($new_apps_path);
152 152
 
153 153
 		// Create an app within that path
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		$resources = $locator->getResources();
170 170
 		$this->assertCount(3, $resources);
171 171
 
172
-		$expectedWebRoot = \OC::$WEBROOT . '/js-apps-test/test-js-app';
172
+		$expectedWebRoot = \OC::$WEBROOT.'/js-apps-test/test-js-app';
173 173
 		$expectedFiles = ['module.mjs', 'both.mjs', 'plain.js'];
174 174
 
175 175
 		for ($idx = 0; $idx++; $idx < 3) {
Please login to merge, or discard this patch.
tests/lib/TemplateLayoutTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,9 +98,9 @@
 block discarded – undo
98 98
 			'only version hash if not installed' => ['apps/shipped', 'style.css', false, false, '?v=version_hash'],
99 99
 			'version hash with cache buster if app not found' => ['unknown/path', '', true, false, '?v=version_hash-42'],
100 100
 			'version hash with cache buster if neither path nor file provided' => [false, false, true, false, '?v=version_hash-42'],
101
-			'app version hash if external app' => ['', 'other/app.css', true, false, '?v=' . substr(md5('other_2'), 0, 8) . '-42'],
102
-			'app version and version hash if shipped app' => ['apps/shipped', 'style.css', true, false, '?v=' . substr(md5('shipped_1-version_hash'), 0, 8) . '-42'],
103
-			'prefer path over file' => ['apps/shipped', 'other/app.css', true, false, '?v=' . substr(md5('shipped_1-version_hash'), 0, 8) . '-42'],
101
+			'app version hash if external app' => ['', 'other/app.css', true, false, '?v='.substr(md5('other_2'), 0, 8).'-42'],
102
+			'app version and version hash if shipped app' => ['apps/shipped', 'style.css', true, false, '?v='.substr(md5('shipped_1-version_hash'), 0, 8).'-42'],
103
+			'prefer path over file' => ['apps/shipped', 'other/app.css', true, false, '?v='.substr(md5('shipped_1-version_hash'), 0, 8).'-42'],
104 104
 		];
105 105
 	}
106 106
 
Please login to merge, or discard this patch.
tests/lib/Cache/TestCache.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,10 +52,10 @@
 block discarded – undo
52 52
 
53 53
 	public function testClear(): void {
54 54
 		$value = 'ipsum lorum';
55
-		$this->instance->set('1_value1', $value . '1');
56
-		$this->instance->set('1_value2', $value . '2');
57
-		$this->instance->set('2_value1', $value . '3');
58
-		$this->instance->set('3_value1', $value . '4');
55
+		$this->instance->set('1_value1', $value.'1');
56
+		$this->instance->set('1_value2', $value.'2');
57
+		$this->instance->set('2_value1', $value.'3');
58
+		$this->instance->set('3_value1', $value.'4');
59 59
 
60 60
 		$this->assertEquals([
61 61
 			'1_value1' => 'ipsum lorum1',
Please login to merge, or discard this patch.
tests/lib/Lock/DBLockingProviderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 		$this->timeFactory = $this->createMock(ITimeFactory::class);
41 41
 		$this->timeFactory->expects($this->any())
42 42
 			->method('getTime')
43
-			->willReturnCallback(function () {
43
+			->willReturnCallback(function() {
44 44
 				return $this->currentTime;
45 45
 			});
46 46
 		parent::setUp();
Please login to merge, or discard this patch.
tests/lib/Mail/MailerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 			$path = '/usr/sbin/sendmail';
93 93
 		}
94 94
 
95
-		$expected = new SendmailTransport($path . $binaryParam, null, $this->logger);
95
+		$expected = new SendmailTransport($path.$binaryParam, null, $this->logger);
96 96
 		$this->assertEquals($expected, self::invokePrivate($this->mailer, 'getSendMailInstance'));
97 97
 	}
98 98
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 				['mail_sendmailmode', 'smtp', $sendmailMode],
111 111
 			]);
112 112
 
113
-		$sendmail = new SendmailTransport('/var/qmail/bin/sendmail' . $binaryParam, null, $this->logger);
113
+		$sendmail = new SendmailTransport('/var/qmail/bin/sendmail'.$binaryParam, null, $this->logger);
114 114
 		$this->assertEquals($sendmail, self::invokePrivate($this->mailer, 'getSendMailInstance'));
115 115
 	}
116 116
 
Please login to merge, or discard this patch.
tests/lib/Mail/EMailTemplateTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 			'TestCloud - A safe home for your data<br>This is an automatically sent email, please do not reply.'
81 81
 		);
82 82
 
83
-		$expectedHTML = file_get_contents(\OC::$SERVERROOT . '/tests/data/emails/new-account-email.html');
83
+		$expectedHTML = file_get_contents(\OC::$SERVERROOT.'/tests/data/emails/new-account-email.html');
84 84
 		$this->assertSame($expectedHTML, $this->emailTemplate->renderHtml());
85
-		$expectedTXT = file_get_contents(\OC::$SERVERROOT . '/tests/data/emails/new-account-email.txt');
85
+		$expectedTXT = file_get_contents(\OC::$SERVERROOT.'/tests/data/emails/new-account-email.txt');
86 86
 		$this->assertSame($expectedTXT, $this->emailTemplate->renderText());
87 87
 	}
88 88
 
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
 		);
124 124
 		$this->emailTemplate->addFooter();
125 125
 
126
-		$expectedHTML = file_get_contents(\OC::$SERVERROOT . '/tests/data/emails/new-account-email-custom.html');
126
+		$expectedHTML = file_get_contents(\OC::$SERVERROOT.'/tests/data/emails/new-account-email-custom.html');
127 127
 		$this->assertSame($expectedHTML, $this->emailTemplate->renderHtml());
128
-		$expectedTXT = file_get_contents(\OC::$SERVERROOT . '/tests/data/emails/new-account-email-custom.txt');
128
+		$expectedTXT = file_get_contents(\OC::$SERVERROOT.'/tests/data/emails/new-account-email-custom.txt');
129 129
 		$this->assertSame($expectedTXT, $this->emailTemplate->renderText());
130 130
 	}
131 131
 
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 		);
167 167
 		$this->emailTemplate->addFooter();
168 168
 
169
-		$expectedHTML = file_get_contents(\OC::$SERVERROOT . '/tests/data/emails/new-account-email-single-button.html');
169
+		$expectedHTML = file_get_contents(\OC::$SERVERROOT.'/tests/data/emails/new-account-email-single-button.html');
170 170
 		$this->assertSame($expectedHTML, $this->emailTemplate->renderHtml());
171
-		$expectedTXT = file_get_contents(\OC::$SERVERROOT . '/tests/data/emails/new-account-email-single-button.txt');
171
+		$expectedTXT = file_get_contents(\OC::$SERVERROOT.'/tests/data/emails/new-account-email-single-button.txt');
172 172
 		$this->assertSame($expectedTXT, $this->emailTemplate->renderText());
173 173
 	}
174 174
 
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
 		);
213 213
 		$this->emailTemplate->addFooter();
214 214
 
215
-		$expectedHTML = file_get_contents(\OC::$SERVERROOT . '/tests/data/emails/new-account-email-custom.html');
215
+		$expectedHTML = file_get_contents(\OC::$SERVERROOT.'/tests/data/emails/new-account-email-custom.html');
216 216
 		$this->assertSame($expectedHTML, $this->emailTemplate->renderHtml());
217
-		$expectedTXT = file_get_contents(\OC::$SERVERROOT . '/tests/data/emails/new-account-email-custom-text-alternative.txt');
217
+		$expectedTXT = file_get_contents(\OC::$SERVERROOT.'/tests/data/emails/new-account-email-custom-text-alternative.txt');
218 218
 		$this->assertSame($expectedTXT, $this->emailTemplate->renderText());
219 219
 	}
220 220
 }
Please login to merge, or discard this patch.
tests/lib/Remote/Api/OCSTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	protected function getOCSUrl($url) {
40
-		return 'https://example.com/ocs/v2.php/' . $url;
40
+		return 'https://example.com/ocs/v2.php/'.$url;
41 41
 	}
42 42
 
43 43
 	public function testGetUser(): void {
Please login to merge, or discard this patch.
tests/lib/TempManagerTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	protected function setUp(): void {
19 19
 		parent::setUp();
20 20
 
21
-		$this->baseDir = $this->getManager()->getTempBaseDir() . $this->getUniqueID('/oc_tmp_test');
21
+		$this->baseDir = $this->getManager()->getTempBaseDir().$this->getUniqueID('/oc_tmp_test');
22 22
 		if (!is_dir($this->baseDir)) {
23 23
 			mkdir($this->baseDir);
24 24
 		}
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 		$this->assertTrue(is_dir($folder));
74 74
 		$this->assertTrue(is_writable($folder));
75 75
 
76
-		file_put_contents($folder . 'foo.txt', 'bar');
77
-		$this->assertEquals('bar', file_get_contents($folder . 'foo.txt'));
76
+		file_put_contents($folder.'foo.txt', 'bar');
77
+		$this->assertEquals('bar', file_get_contents($folder.'foo.txt'));
78 78
 	}
79 79
 
80 80
 	public function testCleanFiles(): void {
@@ -94,19 +94,19 @@  discard block
 block discarded – undo
94 94
 		$manager = $this->getManager();
95 95
 		$folder1 = $manager->getTemporaryFolder();
96 96
 		$folder2 = $manager->getTemporaryFolder();
97
-		touch($folder1 . 'foo.txt');
98
-		touch($folder1 . 'bar.txt');
97
+		touch($folder1.'foo.txt');
98
+		touch($folder1.'bar.txt');
99 99
 		$this->assertTrue(file_exists($folder1));
100 100
 		$this->assertTrue(file_exists($folder2));
101
-		$this->assertTrue(file_exists($folder1 . 'foo.txt'));
102
-		$this->assertTrue(file_exists($folder1 . 'bar.txt'));
101
+		$this->assertTrue(file_exists($folder1.'foo.txt'));
102
+		$this->assertTrue(file_exists($folder1.'bar.txt'));
103 103
 
104 104
 		$manager->clean();
105 105
 
106 106
 		$this->assertFalse(file_exists($folder1));
107 107
 		$this->assertFalse(file_exists($folder2));
108
-		$this->assertFalse(file_exists($folder1 . 'foo.txt'));
109
-		$this->assertFalse(file_exists($folder1 . 'bar.txt'));
108
+		$this->assertFalse(file_exists($folder1.'foo.txt'));
109
+		$this->assertFalse(file_exists($folder1.'bar.txt'));
110 110
 	}
111 111
 
112 112
 	public function testCleanOld(): void {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		$oldFile = $manager->getTemporaryFile('txt');
115 115
 		$newFile = $manager->getTemporaryFile('txt');
116 116
 		$folder = $manager->getTemporaryFolder();
117
-		$nonOcFile = $this->baseDir . '/foo.txt';
117
+		$nonOcFile = $this->baseDir.'/foo.txt';
118 118
 		file_put_contents($nonOcFile, 'bar');
119 119
 
120 120
 		$past = time() - 2 * 3600;
Please login to merge, or discard this patch.
tests/lib/Files/SimpleFS/InMemoryFileTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	public function setupTestPdf() {
36 36
 		$fileContents = file_get_contents(
37
-			__DIR__ . '/../../../data/test.pdf'
37
+			__DIR__.'/../../../data/test.pdf'
38 38
 		);
39 39
 		$this->testPdf = new InMemoryFile('test.pdf', $fileContents);
40 40
 	}
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function testGetContent(): void {
87 87
 		self::assertEquals(
88
-			file_get_contents(__DIR__ . '/../../../data/test.pdf'),
88
+			file_get_contents(__DIR__.'/../../../data/test.pdf'),
89 89
 			$this->testPdf->getContent()
90 90
 		);
91 91
 	}
Please login to merge, or discard this patch.