Merge pull request #59595 from nextcloud/automated/noid/rector-changes

This commit is contained in:
Kate 2026-04-13 09:46:22 +02:00 committed by GitHub
commit f54b0aacef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View file

@ -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);
}
}

View file

@ -98,7 +98,7 @@ class ConfigTest extends TestCase {
$content = file_get_contents($this->configFile);
$expected = "<?php\n";
$expected .= \OC\Config::CONF_WARNING;
$expected .= Config::CONF_WARNING;
$expected .= "\$CONFIG = array (\n 'foo' => '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 = "<?php\n";
$expected .= \OC\Config::CONF_WARNING;
$expected .= Config::CONF_WARNING;
$expected .= "\$CONFIG = array (\n 'foo' => '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 = "<?php\n";
$expected .= \OC\Config::CONF_WARNING;
$expected .= Config::CONF_WARNING;
$expected .= "\$CONFIG = array (\n 'foo' => '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 = "<?php\n";
$expected .= \OC\Config::CONF_WARNING;
$expected .= Config::CONF_WARNING;
$expected .= "\$CONFIG = array (\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);
@ -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 = "<?php\n";
$expected .= \OC\Config::CONF_WARNING;
$expected .= Config::CONF_WARNING;
$expected .= "\$CONFIG = array (\n 'foo' => '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";