aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/SetupTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/SetupTest.php')
-rw-r--r--tests/lib/SetupTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php
index b5e1b7000c3..0be7eab36f6 100644
--- a/tests/lib/SetupTest.php
+++ b/tests/lib/SetupTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -42,7 +43,7 @@ class SetupTest extends \Test\TestCase {
$this->random = $this->createMock(ISecureRandom::class);
$this->installer = $this->createMock(Installer::class);
$this->setupClass = $this->getMockBuilder(Setup::class)
- ->setMethods(['class_exists', 'is_callable', 'getAvailableDbDriversForPdo'])
+ ->onlyMethods(['class_exists', 'is_callable', 'getAvailableDbDriversForPdo'])
->setConstructorArgs([$this->config, $this->iniWrapper, $this->l10nFactory, $this->defaults, $this->logger, $this->random, $this->installer])
->getMock();
}
@@ -128,10 +129,10 @@ class SetupTest extends \Test\TestCase {
}
/**
- * @dataProvider findWebRootProvider
* @param $url
* @param $expected
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('findWebRootProvider')]
public function testFindWebRootCli($url, $expected): void {
$cliState = \OC::$CLI;
@@ -151,7 +152,7 @@ class SetupTest extends \Test\TestCase {
$this->assertSame($webRoot, $expected);
}
- public function findWebRootProvider(): array {
+ public static function findWebRootProvider(): array {
return [
'https://www.example.com/nextcloud/' => ['https://www.example.com/nextcloud/', '/nextcloud'],
'https://www.example.com/nextcloud' => ['https://www.example.com/nextcloud', '/nextcloud'],