aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Stream/EncryptionTest.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2024-09-15 22:32:31 +0200
commit49dd79eabb2b8902559a7a4e8f8fcad54f46b604 (patch)
tree2af18db46ba463368dc4461d7436fb69577923de /tests/lib/Files/Stream/EncryptionTest.php
parent4281ce6fa1bb8235426099d720734d2394bec203 (diff)
downloadnextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.tar.gz
nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.zip
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Files/Stream/EncryptionTest.php')
-rw-r--r--tests/lib/Files/Stream/EncryptionTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php
index 4f8d0b88de2..c29a38f2b09 100644
--- a/tests/lib/Files/Stream/EncryptionTest.php
+++ b/tests/lib/Files/Stream/EncryptionTest.php
@@ -88,7 +88,7 @@ class EncryptionTest extends \Test\TestCase {
$expectedSharePath,
$expectedSize,
$expectedUnencryptedSize,
- $expectedReadOnly) {
+ $expectedReadOnly): void {
// build mocks
$encryptionModuleMock = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
->disableOriginalConstructor()->getMock();
@@ -189,7 +189,7 @@ class EncryptionTest extends \Test\TestCase {
];
}
- public function testWriteRead() {
+ public function testWriteRead(): void {
$fileName = tempnam('/tmp', 'FOO');
$stream = $this->getStream($fileName, 'w+', 0, self::DEFAULT_WRAPPER, 6);
$this->assertEquals(6, fwrite($stream, 'foobar'));
@@ -210,7 +210,7 @@ class EncryptionTest extends \Test\TestCase {
unlink($fileName);
}
- public function testRewind() {
+ public function testRewind(): void {
$fileName = tempnam('/tmp', 'FOO');
$stream = $this->getStream($fileName, 'w+', 0, self::DEFAULT_WRAPPER, 6);
$this->assertEquals(6, fwrite($stream, 'foobar'));
@@ -227,7 +227,7 @@ class EncryptionTest extends \Test\TestCase {
unlink($fileName);
}
- public function testSeek() {
+ public function testSeek(): void {
$fileName = tempnam('/tmp', 'FOO');
$stream = $this->getStream($fileName, 'w+', 0, self::DEFAULT_WRAPPER, 9);
@@ -260,7 +260,7 @@ class EncryptionTest extends \Test\TestCase {
/**
* @dataProvider dataFilesProvider
*/
- public function testWriteReadBigFile($testFile) {
+ public function testWriteReadBigFile($testFile): void {
$expectedData = file_get_contents(\OC::$SERVERROOT . '/tests/data/' . $testFile);
// write it
$fileName = tempnam('/tmp', 'FOO');
@@ -297,7 +297,7 @@ class EncryptionTest extends \Test\TestCase {
*
* @dataProvider dataFilesProvider
*/
- public function testWriteToNonSeekableStorage($testFile) {
+ public function testWriteToNonSeekableStorage($testFile): void {
$wrapper = $this->getMockBuilder('\OC\Files\Stream\Encryption')
->setMethods(['parentSeekStream'])->getMock();
$wrapper->expects($this->any())->method('parentSeekStream')->willReturn(false);