aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/Backend/BackendTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/tests/Backend/BackendTest.php')
-rw-r--r--apps/files_external/tests/Backend/BackendTest.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_external/tests/Backend/BackendTest.php b/apps/files_external/tests/Backend/BackendTest.php
index 26aa5ebe6af..1653c354e16 100644
--- a/apps/files_external/tests/Backend/BackendTest.php
+++ b/apps/files_external/tests/Backend/BackendTest.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -12,7 +14,7 @@ use OCA\Files_External\Lib\StorageConfig;
class BackendTest extends \Test\TestCase {
public function testJsonSerialization(): void {
$backend = $this->getMockBuilder(Backend::class)
- ->setMethods(['jsonSerializeDefinition'])
+ ->onlyMethods(['jsonSerializeDefinition'])
->getMock();
$backend->expects($this->once())
->method('jsonSerializeDefinition')
@@ -32,19 +34,17 @@ class BackendTest extends \Test\TestCase {
$this->assertContains('barauth', array_keys($json['authSchemes']));
}
- public function validateStorageProvider() {
+ public static function validateStorageProvider(): array {
return [
[true, true],
[false, false],
];
}
- /**
- * @dataProvider validateStorageProvider
- */
- public function testValidateStorage($expectedSuccess, $definitionSuccess): void {
+ #[\PHPUnit\Framework\Attributes\DataProvider('validateStorageProvider')]
+ public function testValidateStorage(bool $expectedSuccess, bool $definitionSuccess): void {
$backend = $this->getMockBuilder(Backend::class)
- ->setMethods(['validateStorageDefinition'])
+ ->onlyMethods(['validateStorageDefinition'])
->getMock();
$backend->expects($this->atMost(1))
->method('validateStorageDefinition')
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242