Completed
Push — master ( 2908f7...acb26a )
by
unknown
31:18
created
tests/lib/BinaryFinderTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 /**
5 5
  * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
6 6
  * SPDX-License-Identifier: AGPL-3.0-or-later
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	protected function tearDown(): void {
36
-		putenv('PATH=' . $this->oldEnv);
36
+		putenv('PATH='.$this->oldEnv);
37 37
 	}
38 38
 
39 39
 	public function testDefaultFindsCat() {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		$config
42 42
 			->method('getSystemValue')
43 43
 			->with('binary_search_paths', $this->anything())
44
-			->willReturnCallback(function ($key, $default) {
44
+			->willReturnCallback(function($key, $default) {
45 45
 				return $default;
46 46
 			});
47 47
 		$finder = new BinaryFinder($this->cacheFactory, $config);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		$config
55 55
 			->method('getSystemValue')
56 56
 			->with('binary_search_paths', $this->anything())
57
-			->willReturnCallback(function ($key, $default) {
57
+			->willReturnCallback(function($key, $default) {
58 58
 				return $default;
59 59
 			});
60 60
 		$finder = new BinaryFinder($this->cacheFactory, $config);
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 
65 65
 	public function testCustomPathFindsCat() {
66 66
 		$tmpdir = Server::get(ITempManager::class)->getTemporaryFolder();
67
-		touch($tmpdir . '/cat');
68
-		chmod($tmpdir . '/cat', 100);
67
+		touch($tmpdir.'/cat');
68
+		chmod($tmpdir.'/cat', 100);
69 69
 
70 70
 		$config = $this->createMock(IConfig::class);
71 71
 		$config
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 			->with('binary_search_paths', $this->anything())
74 74
 			->willReturn([$tmpdir]);
75 75
 		$finder = new BinaryFinder($this->cacheFactory, $config);
76
-		$this->assertEquals($tmpdir . '/cat', $finder->findBinaryPath('cat'));
77
-		$this->assertEquals($tmpdir . '/cat', $this->cache->get('cat'));
76
+		$this->assertEquals($tmpdir.'/cat', $finder->findBinaryPath('cat'));
77
+		$this->assertEquals($tmpdir.'/cat', $this->cache->get('cat'));
78 78
 	}
79 79
 
80 80
 	public function testWrongCustomPathDoesNotFindCat() {
Please login to merge, or discard this patch.