aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/Files
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/Files')
-rw-r--r--apps/dav/tests/unit/Files/FileSearchBackendTest.php20
-rw-r--r--apps/dav/tests/unit/Files/MultipartRequestParserTest.php28
-rw-r--r--apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php12
3 files changed, 30 insertions, 30 deletions
diff --git a/apps/dav/tests/unit/Files/FileSearchBackendTest.php b/apps/dav/tests/unit/Files/FileSearchBackendTest.php
index b4245ac181b..cc4dcb62b75 100644
--- a/apps/dav/tests/unit/Files/FileSearchBackendTest.php
+++ b/apps/dav/tests/unit/Files/FileSearchBackendTest.php
@@ -115,7 +115,7 @@ class FileSearchBackendTest extends TestCase {
$this->search = new FileSearchBackend($this->tree, $this->user, $this->rootFolder, $this->shareManager, $this->view);
}
- public function testSearchFilename() {
+ public function testSearchFilename(): void {
$this->tree->expects($this->any())
->method('getNodeForPath')
->willReturn($this->davFolder);
@@ -144,7 +144,7 @@ class FileSearchBackendTest extends TestCase {
$this->assertEquals('/files/test/test/path', $result[0]->href);
}
- public function testSearchMimetype() {
+ public function testSearchMimetype(): void {
$this->tree->expects($this->any())
->method('getNodeForPath')
->willReturn($this->davFolder);
@@ -173,7 +173,7 @@ class FileSearchBackendTest extends TestCase {
$this->assertEquals('/files/test/test/path', $result[0]->href);
}
- public function testSearchSize() {
+ public function testSearchSize(): void {
$this->tree->expects($this->any())
->method('getNodeForPath')
->willReturn($this->davFolder);
@@ -202,7 +202,7 @@ class FileSearchBackendTest extends TestCase {
$this->assertEquals('/files/test/test/path', $result[0]->href);
}
- public function testSearchMtime() {
+ public function testSearchMtime(): void {
$this->tree->expects($this->any())
->method('getNodeForPath')
->willReturn($this->davFolder);
@@ -231,7 +231,7 @@ class FileSearchBackendTest extends TestCase {
$this->assertEquals('/files/test/test/path', $result[0]->href);
}
- public function testSearchIsCollection() {
+ public function testSearchIsCollection(): void {
$this->tree->expects($this->any())
->method('getNodeForPath')
->willReturn($this->davFolder);
@@ -261,7 +261,7 @@ class FileSearchBackendTest extends TestCase {
}
- public function testSearchInvalidProp() {
+ public function testSearchInvalidProp(): void {
$this->expectException(\InvalidArgumentException::class);
$this->tree->expects($this->any())
@@ -298,7 +298,7 @@ class FileSearchBackendTest extends TestCase {
}
- public function testSearchNonFolder() {
+ public function testSearchNonFolder(): void {
$this->expectException(\InvalidArgumentException::class);
$davNode = $this->createMock(File::class);
@@ -311,7 +311,7 @@ class FileSearchBackendTest extends TestCase {
$this->search->search($query);
}
- public function testSearchLimitOwnerBasic() {
+ public function testSearchLimitOwnerBasic(): void {
$this->tree->expects($this->any())
->method('getNodeForPath')
->willReturn($this->davFolder);
@@ -340,7 +340,7 @@ class FileSearchBackendTest extends TestCase {
$this->assertEmpty($operator->getArguments());
}
- public function testSearchLimitOwnerNested() {
+ public function testSearchLimitOwnerNested(): void {
$this->tree->expects($this->any())
->method('getNodeForPath')
->willReturn($this->davFolder);
@@ -388,7 +388,7 @@ class FileSearchBackendTest extends TestCase {
$this->assertEmpty($operator->getArguments());
}
- public function testSearchOperatorLimit() {
+ public function testSearchOperatorLimit(): void {
$this->tree->expects($this->any())
->method('getNodeForPath')
->willReturn($this->davFolder);
diff --git a/apps/dav/tests/unit/Files/MultipartRequestParserTest.php b/apps/dav/tests/unit/Files/MultipartRequestParserTest.php
index ec9e2d0a383..4c470f49595 100644
--- a/apps/dav/tests/unit/Files/MultipartRequestParserTest.php
+++ b/apps/dav/tests/unit/Files/MultipartRequestParserTest.php
@@ -80,7 +80,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test validation of the request's body type
*/
- public function testBodyTypeValidation() {
+ public function testBodyTypeValidation(): void {
$bodyStream = "I am not a stream, but pretend to be";
$request = $this->getMockBuilder('Sabre\HTTP\RequestInterface')
->disableOriginalConstructor()
@@ -101,7 +101,7 @@ class MultipartRequestParserTest extends TestCase {
* - valid file content
* - valid file path
*/
- public function testValidRequest() {
+ public function testValidRequest(): void {
$multipartParser = $this->getMultipartParser(
$this->getValidBodyObject()
);
@@ -118,7 +118,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with invalid md5 hash.
*/
- public function testInvalidMd5Hash() {
+ public function testInvalidMd5Hash(): void {
$bodyObject = $this->getValidBodyObject();
$bodyObject["0"]["headers"]["X-File-MD5"] = "f2377b4d911f7ec46325fe603c3af03";
$multipartParser = $this->getMultipartParser(
@@ -132,7 +132,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with a null md5 hash.
*/
- public function testNullMd5Hash() {
+ public function testNullMd5Hash(): void {
$bodyObject = $this->getValidBodyObject();
unset($bodyObject["0"]["headers"]["X-File-MD5"]);
$multipartParser = $this->getMultipartParser(
@@ -146,7 +146,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with a null Content-Length.
*/
- public function testNullContentLength() {
+ public function testNullContentLength(): void {
$bodyObject = $this->getValidBodyObject();
unset($bodyObject["0"]["headers"]["Content-Length"]);
$multipartParser = $this->getMultipartParser(
@@ -160,7 +160,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with a lower Content-Length.
*/
- public function testLowerContentLength() {
+ public function testLowerContentLength(): void {
$bodyObject = $this->getValidBodyObject();
$bodyObject["0"]["headers"]["Content-Length"] = 6;
$multipartParser = $this->getMultipartParser(
@@ -174,7 +174,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with a higher Content-Length.
*/
- public function testHigherContentLength() {
+ public function testHigherContentLength(): void {
$bodyObject = $this->getValidBodyObject();
$bodyObject["0"]["headers"]["Content-Length"] = 8;
$multipartParser = $this->getMultipartParser(
@@ -188,7 +188,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with wrong boundary in body.
*/
- public function testWrongBoundary() {
+ public function testWrongBoundary(): void {
$bodyObject = $this->getValidBodyObject();
$multipartParser = $this->getMultipartParser(
$bodyObject,
@@ -202,7 +202,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with no boundary in request headers.
*/
- public function testNoBoundaryInHeader() {
+ public function testNoBoundaryInHeader(): void {
$bodyObject = $this->getValidBodyObject();
$this->expectExceptionMessage('Error while parsing boundary in Content-Type header.');
$this->getMultipartParser(
@@ -214,7 +214,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with no boundary in the request's headers.
*/
- public function testNoBoundaryInBody() {
+ public function testNoBoundaryInBody(): void {
$bodyObject = $this->getValidBodyObject();
$multipartParser = $this->getMultipartParser(
$bodyObject,
@@ -229,7 +229,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with a boundary with quotes in the request's headers.
*/
- public function testBoundaryWithQuotes() {
+ public function testBoundaryWithQuotes(): void {
$bodyObject = $this->getValidBodyObject();
$multipartParser = $this->getMultipartParser(
$bodyObject,
@@ -245,7 +245,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with a wrong Content-Type in the request's headers.
*/
- public function testWrongContentType() {
+ public function testWrongContentType(): void {
$bodyObject = $this->getValidBodyObject();
$this->expectExceptionMessage('Content-Type must be multipart/related');
$this->getMultipartParser(
@@ -257,7 +257,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with a wrong key after the content type in the request's headers.
*/
- public function testWrongKeyInContentType() {
+ public function testWrongKeyInContentType(): void {
$bodyObject = $this->getValidBodyObject();
$this->expectExceptionMessage('Boundary is invalid');
$this->getMultipartParser(
@@ -269,7 +269,7 @@ class MultipartRequestParserTest extends TestCase {
/**
* Test with a null Content-Type in the request's headers.
*/
- public function testNullContentType() {
+ public function testNullContentType(): void {
$bodyObject = $this->getValidBodyObject();
$this->expectExceptionMessage('Content-Type can not be null');
$this->getMultipartParser(
diff --git a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php
index a24125b6804..764cdd5c339 100644
--- a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php
+++ b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php
@@ -64,7 +64,7 @@ class FilesDropPluginTest extends TestCase {
->method($this->anything());
}
- public function testInitialize() {
+ public function testInitialize(): void {
$this->server->expects($this->once())
->method('on')
->with(
@@ -76,7 +76,7 @@ class FilesDropPluginTest extends TestCase {
$this->plugin->initialize($this->server);
}
- public function testNotEnabled() {
+ public function testNotEnabled(): void {
$this->view->expects($this->never())
->method($this->anything());
@@ -86,7 +86,7 @@ class FilesDropPluginTest extends TestCase {
$this->plugin->beforeMethod($this->request, $this->response);
}
- public function testValid() {
+ public function testValid(): void {
$this->plugin->enable();
$this->plugin->setView($this->view);
@@ -110,7 +110,7 @@ class FilesDropPluginTest extends TestCase {
$this->plugin->beforeMethod($this->request, $this->response);
}
- public function testFileAlreadyExistsValid() {
+ public function testFileAlreadyExistsValid(): void {
$this->plugin->enable();
$this->plugin->setView($this->view);
@@ -139,7 +139,7 @@ class FilesDropPluginTest extends TestCase {
$this->plugin->beforeMethod($this->request, $this->response);
}
- public function testNoMKCOL() {
+ public function testNoMKCOL(): void {
$this->plugin->enable();
$this->plugin->setView($this->view);
@@ -151,7 +151,7 @@ class FilesDropPluginTest extends TestCase {
$this->plugin->beforeMethod($this->request, $this->response);
}
- public function testNoSubdirPut() {
+ public function testNoSubdirPut(): void {
$this->plugin->enable();
$this->plugin->setView($this->view);