aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php7
-rw-r--r--tests/lib/Files/Storage/Wrapper/EncodingTest.php8
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php b/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php
index 4f6254cdb94..11c913cd232 100644
--- a/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php
+++ b/tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php
@@ -35,9 +35,7 @@ class ObjectStoreScannerTest extends TestCase {
$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()'
);
}
@@ -54,8 +52,7 @@ class ObjectStoreScannerTest extends TestCase {
public function testFolder(): void {
$this->fillTestFolders();
- $this->assertEquals(
- [],
+ $this->assertNull(
$this->scanner->scan(''),
'Asserting that no error occurred while scan()'
);
diff --git a/tests/lib/Files/Storage/Wrapper/EncodingTest.php b/tests/lib/Files/Storage/Wrapper/EncodingTest.php
index f52e3689155..d8b03a891c2 100644
--- a/tests/lib/Files/Storage/Wrapper/EncodingTest.php
+++ b/tests/lib/Files/Storage/Wrapper/EncodingTest.php
@@ -240,4 +240,12 @@ class EncodingTest extends \Test\Files\Storage\Storage {
$entry = $this->instance->getMetaData('/test/' . self::NFD_NAME);
$this->assertEquals(self::NFC_NAME, $entry['name']);
}
+
+ /**
+ * Regression test of https://github.com/nextcloud/server/issues/50431
+ */
+ public function testNoMetadata() {
+ $this->assertNull($this->instance->getMetaData('/test/null'));
+ }
+
}