aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/Storage/SmbTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/tests/Storage/SmbTest.php')
-rw-r--r--apps/files_external/tests/Storage/SmbTest.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/files_external/tests/Storage/SmbTest.php b/apps/files_external/tests/Storage/SmbTest.php
index 1040158cf19..afcb5c1034f 100644
--- a/apps/files_external/tests/Storage/SmbTest.php
+++ b/apps/files_external/tests/Storage/SmbTest.php
@@ -1,4 +1,6 @@
<?php
+
+declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -49,19 +51,19 @@ class SmbTest extends \Test\Files\Storage\Storage {
parent::tearDown();
}
- public function directoryProvider() {
+ public static function directoryProvider(): array {
// doesn't support leading/trailing spaces
return [['folder']];
}
- public function testRenameWithSpaces() {
+ public function testRenameWithSpaces(): void {
$this->instance->mkdir('with spaces');
$result = $this->instance->rename('with spaces', 'foo bar');
$this->assertTrue($result);
$this->assertTrue($this->instance->is_dir('foo bar'));
}
- public function testStorageId() {
+ public function testStorageId(): void {
$this->instance = new SMB([
'host' => 'testhost',
'user' => 'testuser',
@@ -73,9 +75,9 @@ class SmbTest extends \Test\Files\Storage\Storage {
$this->instance = null;
}
- public function testNotifyGetChanges() {
+ public function testNotifyGetChanges(): void {
$lastError = null;
- for($i = 0; $i < 5; $i++) {
+ for ($i = 0; $i < 5; $i++) {
try {
$this->tryTestNotifyGetChanges();
return;
@@ -130,7 +132,7 @@ class SmbTest extends \Test\Files\Storage\Storage {
}
}
- public function testNotifyListen() {
+ public function testNotifyListen(): void {
$notifyHandler = $this->instance->notify('');
usleep(100 * 1000); //give time for the notify to start
$this->instance->file_put_contents('/newfile.txt', 'test content');
@@ -153,7 +155,7 @@ class SmbTest extends \Test\Files\Storage\Storage {
}
}
- public function testRenameRoot() {
+ public function testRenameRoot(): void {
// root can't be renamed
$this->assertFalse($this->instance->rename('', 'foo1'));
@@ -162,12 +164,12 @@ class SmbTest extends \Test\Files\Storage\Storage {
$this->instance->rmdir('foo2');
}
- public function testUnlinkRoot() {
+ public function testUnlinkRoot(): void {
// root can't be deleted
$this->assertFalse($this->instance->unlink(''));
}
- public function testRmdirRoot() {
+ public function testRmdirRoot(): void {
// root can't be deleted
$this->assertFalse($this->instance->rmdir(''));
}