From 26c93519f266fad062973716e4b36eca195c2664 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 26 Jan 2025 14:56:17 +0100 Subject: fix: Harden files scanner for invalid null access Co-authored-by: Ferdinand Thiessen Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen --- tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/lib/Files/ObjectStore/ObjectStoreScannerTest.php') 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()' ); -- cgit v1.2.3