storage = $this->getMockBuilder('\OCA\Files_Sharing\External\Storage') ->disableOriginalConstructor() ->getMock(); $this->cache = $this->getMockBuilder('\OC\Files\Cache\Cache') ->disableOriginalConstructor() ->getMock(); $this->storage->expects($this->any()) ->method('getCache') ->willReturn($this->cache); $this->scanner = new Scanner($this->storage); } public function testScan(): void { $this->storage->expects($this->any()) ->method('getShareInfo') ->willReturn(['status' => 'success', 'data' => []]); // FIXME add real tests, we are currently only checking for // Declaration of OCA\Files_Sharing\External\Scanner::*() should be // compatible with OC\Files\Cache\Scanner::*() $this->scanner->scan('test', Scanner::SCAN_RECURSIVE); $this->addToAssertionCount(1); } public function testScanFile(): void { // FIXME add real tests, we are currently only checking for // Declaration of OCA\Files_Sharing\External\Scanner::*() should be // compatible with OC\Files\Cache\Scanner::*() $this->scanner->scanFile('test', Scanner::SCAN_RECURSIVE); $this->addToAssertionCount(1); } }