aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/FrontendDefinitionTraitTest.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-06-30 16:56:59 +0200
committerRobin Appelman <robin@icewind.nl>2025-07-01 22:45:52 +0200
commitaa15f9d16d5b46d04763c7deedb129990e819364 (patch)
tree758e0aebcac34a545f9a21806120a9fcb96f4cb6 /apps/files_external/tests/FrontendDefinitionTraitTest.php
parent1620a0c0510a42b1da0a66488838f1ce3ba1210d (diff)
downloadnextcloud-server-rector-phpunit10.tar.gz
nextcloud-server-rector-phpunit10.zip
chore: run rectorrector-phpunit10
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/tests/FrontendDefinitionTraitTest.php')
-rw-r--r--apps/files_external/tests/FrontendDefinitionTraitTest.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/files_external/tests/FrontendDefinitionTraitTest.php b/apps/files_external/tests/FrontendDefinitionTraitTest.php
index 5319920e61a..e0bf066e70a 100644
--- a/apps/files_external/tests/FrontendDefinitionTraitTest.php
+++ b/apps/files_external/tests/FrontendDefinitionTraitTest.php
@@ -8,6 +8,7 @@
namespace OCA\Files_External\Tests;
use OCA\Files_External\Lib\DefinitionParameter;
+use OCA\Files_External\Lib\FrontendDefinitionTrait;
use OCA\Files_External\Lib\StorageConfig;
class FrontendDefinitionTraitTest extends \Test\TestCase {
@@ -17,7 +18,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase {
->getMock();
$param->method('getName')->willReturn('foo');
- $trait = $this->getMockForTrait(\OCA\Files_External\Lib\FrontendDefinitionTrait::class);
+ $trait = $this->getMockForTrait(FrontendDefinitionTrait::class);
$trait->setText('test');
$trait->addParameters([$param]);
$trait->addCustomJs('foo/bar.js');
@@ -40,9 +41,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase {
];
}
- /**
- * @dataProvider validateStorageProvider
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('validateStorageProvider')]
public function testValidateStorage(bool $expectedSuccess, array $params): void {
$backendParams = [];
foreach ($params as $name => $valid) {
@@ -68,7 +67,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase {
$storageConfig->expects($this->any())
->method('setBackendOption');
- $trait = $this->getMockForTrait(\OCA\Files_External\Lib\FrontendDefinitionTrait::class);
+ $trait = $this->getMockForTrait(FrontendDefinitionTrait::class);
$trait->setText('test');
$trait->addParameters($backendParams);
@@ -99,7 +98,7 @@ class FrontendDefinitionTraitTest extends \Test\TestCase {
->method('setBackendOption')
->with('param', 'foobar');
- $trait = $this->getMockForTrait(\OCA\Files_External\Lib\FrontendDefinitionTrait::class);
+ $trait = $this->getMockForTrait(FrontendDefinitionTrait::class);
$trait->setText('test');
$trait->addParameter($param);