Skip to content

Commit f54b0aa

Browse files
Merge pull request #59595 from nextcloud/automated/noid/rector-changes
2 parents 0b71216 + 43de56c commit f54b0aa

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

apps/files_external/tests/Settings/AdminTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
use OCP\Encryption\IManager;
1818
use OCP\IL10N;
1919
use OCP\IURLGenerator;
20+
use OCP\Settings\IDelegatedSettings;
21+
use OCP\Settings\ISettings;
2022
use PHPUnit\Framework\MockObject\MockObject;
2123
use Test\TestCase;
2224

@@ -141,7 +143,7 @@ public function testGetAuthorizedAppConfig(): void {
141143
}
142144

143145
public function testImplementsIDelegatedSettings(): void {
144-
$this->assertInstanceOf(\OCP\Settings\IDelegatedSettings::class, $this->admin);
145-
$this->assertInstanceOf(\OCP\Settings\ISettings::class, $this->admin);
146+
$this->assertInstanceOf(IDelegatedSettings::class, $this->admin);
147+
$this->assertInstanceOf(ISettings::class, $this->admin);
146148
}
147149
}

tests/lib/ConfigTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testSetValue(): void {
9898

9999
$content = file_get_contents($this->configFile);
100100
$expected = "<?php\n";
101-
$expected .= \OC\Config::CONF_WARNING;
101+
$expected .= Config::CONF_WARNING;
102102
$expected .= "\$CONFIG = array (\n 'foo' => 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n "
103103
. " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n 'alcohol_free' => false,\n);\n";
104104
$this->assertEquals($expected, $content);
@@ -111,7 +111,7 @@ public function testSetValue(): void {
111111
$content = file_get_contents($this->configFile);
112112

113113
$expected = "<?php\n";
114-
$expected .= \OC\Config::CONF_WARNING;
114+
$expected .= Config::CONF_WARNING;
115115
$expected .= "\$CONFIG = array (\n 'foo' => 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n "
116116
. " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n 'alcohol_free' => false,\n 'bar' => 'red',\n 'apps' => \n "
117117
. " array (\n 0 => 'files',\n 1 => 'gallery',\n ),\n);\n";
@@ -144,7 +144,7 @@ public function testSetValues(): void {
144144

145145
$content = file_get_contents($this->configFile);
146146
$expected = "<?php\n";
147-
$expected .= \OC\Config::CONF_WARNING;
147+
$expected .= Config::CONF_WARNING;
148148
$expected .= "\$CONFIG = array (\n 'foo' => 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n "
149149
. " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n);\n";
150150
$this->assertEquals($expected, $content);
@@ -157,7 +157,7 @@ public function testDeleteKey(): void {
157157
$content = file_get_contents($this->configFile);
158158

159159
$expected = "<?php\n";
160-
$expected .= \OC\Config::CONF_WARNING;
160+
$expected .= Config::CONF_WARNING;
161161
$expected .= "\$CONFIG = array (\n 'beers' => \n array (\n 0 => 'Appenzeller',\n "
162162
. " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n 'alcohol_free' => false,\n);\n";
163163
$this->assertEquals($expected, $content);
@@ -179,7 +179,7 @@ public function testConfigMerge(): void {
179179
// Write a new value to the config
180180
$config->setValue('CoolWebsites', ['demo.owncloud.org', 'owncloud.org', 'owncloud.com']);
181181
$expected = "<?php\n";
182-
$expected .= \OC\Config::CONF_WARNING;
182+
$expected .= Config::CONF_WARNING;
183183
$expected .= "\$CONFIG = array (\n 'foo' => 'bar',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n "
184184
. " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n 'alcohol_free' => false,\n 'php53' => 'totallyOutdated',\n 'CoolWebsites' => \n array (\n "
185185
. " 0 => 'demo.owncloud.org',\n 1 => 'owncloud.org',\n 2 => 'owncloud.com',\n ),\n);\n";

0 commit comments

Comments
 (0)