From ef5db52537aca3f949c6b2e23d622f899cff8709 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 12 Dec 2019 22:09:55 +0100 Subject: [PATCH] fixup! Add typed events for the filesystem/scanner Signed-off-by: Roeland Jago Douma --- tests/lib/Files/Utils/ScannerTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/lib/Files/Utils/ScannerTest.php b/tests/lib/Files/Utils/ScannerTest.php index a562cc12729f7..44422cd97d131 100644 --- a/tests/lib/Files/Utils/ScannerTest.php +++ b/tests/lib/Files/Utils/ScannerTest.php @@ -72,7 +72,7 @@ public function testReuseExistingRoot() { $storage->file_put_contents('foo.txt', 'qwerty'); $storage->file_put_contents('folder/bar.txt', 'qwerty'); - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), $this->createMock(IEventDispatcher::class), \OC::$server->getLogger()); $scanner->addMount($mount); $scanner->scan(''); @@ -94,7 +94,7 @@ public function testReuseExistingFile() { $storage->file_put_contents('foo.txt', 'qwerty'); $storage->file_put_contents('folder/bar.txt', 'qwerty'); - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), $this->createMock(IEventDispatcher::class), \OC::$server->getLogger()); $scanner->addMount($mount); $scanner->scan(''); @@ -164,7 +164,7 @@ public function testInvalidPathScanning($invalidPath) { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Invalid path to scan'); - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), $this->createMock(IEventDispatcher::class), \OC::$server->getLogger()); $scanner->scan($invalidPath); } @@ -178,7 +178,7 @@ public function testPropagateEtag() { $storage->file_put_contents('folder/bar.txt', 'qwerty'); $storage->touch('folder/bar.txt', time() - 200); - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), $this->createMock(IEventDispatcher::class), \OC::$server->getLogger()); $scanner->addMount($mount); $scanner->scan(''); @@ -205,7 +205,7 @@ public function testSkipLocalShares() { $sharedStorage->expects($this->never()) ->method('getScanner'); - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), $this->createMock(IEventDispatcher::class), \OC::$server->getLogger()); $scanner->addMount($sharedMount); $scanner->scan(''); @@ -224,7 +224,7 @@ public function testShallow() { $storage->file_put_contents('folder/bar.txt', 'qwerty'); $storage->file_put_contents('folder/subfolder/foobar.txt', 'qwerty'); - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), $this->createMock(IEventDispatcher::class), \OC::$server->getLogger()); $scanner->addMount($mount); $scanner->scan('', $recusive = false);