diff options
Diffstat (limited to 'tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php')
-rw-r--r-- | tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php b/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php index 425dc8c2581..ea6ac682c70 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -31,13 +32,11 @@ class ObjectStoreScannerTest extends TestCase { $this->realScanner = new Scanner($this->storage); } - public function testFile() { + public function testFile(): void { $data = "dummy file data\n"; $this->storage->file_put_contents('foo.txt', $data); - $this->assertEquals( - [], - $this->scanner->scanFile('foo.txt'), + $this->assertNull($this->scanner->scanFile('foo.txt'), 'Asserting that no error occurred while scanFile()' ); } @@ -51,17 +50,16 @@ class ObjectStoreScannerTest extends TestCase { $this->storage->file_put_contents('folder/bar.txt', $textData); } - public function testFolder() { + public function testFolder(): void { $this->fillTestFolders(); - $this->assertEquals( - [], + $this->assertNull( $this->scanner->scan(''), 'Asserting that no error occurred while scan()' ); } - public function testBackgroundScan() { + public function testBackgroundScan(): void { $this->fillTestFolders(); $this->storage->mkdir('folder2'); $this->storage->file_put_contents('folder2/bar.txt', 'foobar'); |