From 43de56cd3ad449afac86f7337e5e1c1198f10e4b Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Sun, 12 Apr 2026 14:48:13 +0000 Subject: [PATCH] refactor: Apply rector changes Signed-off-by: GitHub --- apps/files_external/tests/Settings/AdminTest.php | 6 ++++-- tests/lib/ConfigTest.php | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php index 72f3926ee14..0070b0ef224 100644 --- a/apps/files_external/tests/Settings/AdminTest.php +++ b/apps/files_external/tests/Settings/AdminTest.php @@ -17,6 +17,8 @@ use OCP\AppFramework\Services\IInitialState; use OCP\Encryption\IManager; use OCP\IL10N; use OCP\IURLGenerator; +use OCP\Settings\IDelegatedSettings; +use OCP\Settings\ISettings; use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; @@ -141,7 +143,7 @@ class AdminTest extends TestCase { } public function testImplementsIDelegatedSettings(): void { - $this->assertInstanceOf(\OCP\Settings\IDelegatedSettings::class, $this->admin); - $this->assertInstanceOf(\OCP\Settings\ISettings::class, $this->admin); + $this->assertInstanceOf(IDelegatedSettings::class, $this->admin); + $this->assertInstanceOf(ISettings::class, $this->admin); } } diff --git a/tests/lib/ConfigTest.php b/tests/lib/ConfigTest.php index f4177fb1912..d998a49f0ea 100644 --- a/tests/lib/ConfigTest.php +++ b/tests/lib/ConfigTest.php @@ -98,7 +98,7 @@ class ConfigTest extends TestCase { $content = file_get_contents($this->configFile); $expected = " 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " . " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n 'alcohol_free' => false,\n);\n"; $this->assertEquals($expected, $content); @@ -111,7 +111,7 @@ class ConfigTest extends TestCase { $content = file_get_contents($this->configFile); $expected = " 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " . " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n 'alcohol_free' => false,\n 'bar' => 'red',\n 'apps' => \n " . " array (\n 0 => 'files',\n 1 => 'gallery',\n ),\n);\n"; @@ -144,7 +144,7 @@ class ConfigTest extends TestCase { $content = file_get_contents($this->configFile); $expected = " 'moo',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " . " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n);\n"; $this->assertEquals($expected, $content); @@ -157,7 +157,7 @@ class ConfigTest extends TestCase { $content = file_get_contents($this->configFile); $expected = " \n array (\n 0 => 'Appenzeller',\n " . " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n 'alcohol_free' => false,\n);\n"; $this->assertEquals($expected, $content); @@ -179,7 +179,7 @@ class ConfigTest extends TestCase { // Write a new value to the config $config->setValue('CoolWebsites', ['demo.owncloud.org', 'owncloud.org', 'owncloud.com']); $expected = " 'bar',\n 'beers' => \n array (\n 0 => 'Appenzeller',\n " . " 1 => 'Guinness',\n 2 => 'Kölsch',\n ),\n 'alcohol_free' => false,\n 'php53' => 'totallyOutdated',\n 'CoolWebsites' => \n array (\n " . " 0 => 'demo.owncloud.org',\n 1 => 'owncloud.org',\n 2 => 'owncloud.com',\n ),\n);\n";