summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-01-20 08:38:43 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-01-20 08:38:43 +0100
commit898d2923cce4e61e21a26fed06ad402452c0b3b1 (patch)
treee9f3b91311c880074ff317a45700e080340fece0 /apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
parent5e3a3c0c8faa45489aa6ac610728b4177501c198 (diff)
downloadnextcloud-server-898d2923cce4e61e21a26fed06ad402452c0b3b1.tar.gz
nextcloud-server-898d2923cce4e61e21a26fed06ad402452c0b3b1.zip
chore(dav): Add void return type to test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
index 777a730ffd1..dfff9493762 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
@@ -180,7 +180,7 @@ class FilesPluginTest extends TestCase {
return $node;
}
- public function testGetPropertiesForFile() {
+ public function testGetPropertiesForFile(): void {
/** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\File');
@@ -237,7 +237,7 @@ class FilesPluginTest extends TestCase {
$this->assertEquals([self::SIZE_PROPERTYNAME], $propFind->get404Properties());
}
- public function testGetPropertiesStorageNotAvailable() {
+ public function testGetPropertiesStorageNotAvailable(): void {
/** @var \OCA\DAV\Connector\Sabre\File | \PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\File');
@@ -261,7 +261,7 @@ class FilesPluginTest extends TestCase {
$this->assertEquals(null, $propFind->get(self::DOWNLOADURL_PROPERTYNAME));
}
- public function testGetPublicPermissions() {
+ public function testGetPublicPermissions(): void {
$this->plugin = new FilesPlugin(
$this->tree,
$this->config,
@@ -295,7 +295,7 @@ class FilesPluginTest extends TestCase {
$this->assertEquals('DWCKR', $propFind->get(self::PERMISSIONS_PROPERTYNAME));
}
- public function testGetPropertiesForDirectory() {
+ public function testGetPropertiesForDirectory(): void {
/** @var \OCA\DAV\Connector\Sabre\Directory | \PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\Directory');
@@ -330,7 +330,7 @@ class FilesPluginTest extends TestCase {
$this->assertEquals([self::DOWNLOADURL_PROPERTYNAME], $propFind->get404Properties());
}
- public function testGetPropertiesForRootDirectory() {
+ public function testGetPropertiesForRootDirectory(): void {
/** @var \OCA\DAV\Connector\Sabre\Directory|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->getMockBuilder(Directory::class)
->disableOriginalConstructor()
@@ -362,7 +362,7 @@ class FilesPluginTest extends TestCase {
$this->assertEquals('my_fingerprint', $propFind->get(self::DATA_FINGERPRINT_PROPERTYNAME));
}
- public function testGetPropertiesWhenNoPermission() {
+ public function testGetPropertiesWhenNoPermission(): void {
// No read permissions can be caused by files access control.
// But we still want to load the directory list, so this is okay for us.
// $this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -398,7 +398,7 @@ class FilesPluginTest extends TestCase {
$this->addToAssertionCount(1);
}
- public function testUpdateProps() {
+ public function testUpdateProps(): void {
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\File');
$testDate = 'Fri, 13 Feb 2015 00:01:02 GMT';
@@ -439,7 +439,7 @@ class FilesPluginTest extends TestCase {
$this->assertEquals(200, $result[self::CREATIONDATE_PROPERTYNAME]);
}
- public function testUpdatePropsForbidden() {
+ public function testUpdatePropsForbidden(): void {
$propPatch = new PropPatch([
self::OWNER_ID_PROPERTYNAME => 'user2',
self::OWNER_DISPLAY_NAME_PROPERTYNAME => 'User Two',
@@ -478,7 +478,7 @@ class FilesPluginTest extends TestCase {
* Thus moving /FolderA/test.txt to /test.txt should fail already on that check
*
*/
- public function testMoveSrcNotDeletable() {
+ public function testMoveSrcNotDeletable(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
$this->expectExceptionMessage('FolderA/test.txt cannot be deleted');
@@ -502,7 +502,7 @@ class FilesPluginTest extends TestCase {
$this->plugin->checkMove('FolderA/test.txt', 'test.txt');
}
- public function testMoveSrcDeletable() {
+ public function testMoveSrcDeletable(): void {
$fileInfoFolderATestTXT = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()
->getMock();
@@ -524,7 +524,7 @@ class FilesPluginTest extends TestCase {
}
- public function testMoveSrcNotExist() {
+ public function testMoveSrcNotExist(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
$this->expectExceptionMessage('FolderA/test.txt does not exist');
@@ -557,7 +557,7 @@ class FilesPluginTest extends TestCase {
/**
* @dataProvider downloadHeadersProvider
*/
- public function testDownloadHeaders($isClumsyAgent, $contentDispositionHeader) {
+ public function testDownloadHeaders($isClumsyAgent, $contentDispositionHeader): void {
$request = $this->getMockBuilder(RequestInterface::class)
->disableOriginalConstructor()
->getMock();
@@ -600,7 +600,7 @@ class FilesPluginTest extends TestCase {
$this->plugin->httpGet($request, $response);
}
- public function testHasPreview() {
+ public function testHasPreview(): void {
/** @var \OCA\DAV\Connector\Sabre\Directory | \PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createTestNode('\OCA\DAV\Connector\Sabre\Directory');