|
|
|
@ -251,18 +251,29 @@ class DecryptAllTest extends TestCase { |
|
|
|
->setMethods(['decryptFile']) |
|
|
|
->getMock(); |
|
|
|
|
|
|
|
$storage = $this->getMockBuilder('OCP\Files\Storage') |
|
|
|
->disableOriginalConstructor()->getMock(); |
|
|
|
|
|
|
|
|
|
|
|
$sharedStorage = $this->getMockBuilder('OCP\Files\Storage') |
|
|
|
->disableOriginalConstructor()->getMock(); |
|
|
|
|
|
|
|
$sharedStorage->expects($this->once())->method('instanceOfStorage') |
|
|
|
->with('OC\Files\Storage\Shared')->willReturn(true); |
|
|
|
|
|
|
|
$this->view->expects($this->at(0))->method('getDirectoryContent') |
|
|
|
->with('/user1/files')->willReturn( |
|
|
|
[ |
|
|
|
new FileInfo('path', null, 'intPath', ['name' => 'foo', 'type'=>'dir'], null), |
|
|
|
new FileInfo('path', null, 'intPath', ['name' => 'bar', 'type'=>'file', 'encrypted'=>true], null) |
|
|
|
new FileInfo('path', $storage, 'intPath', ['name' => 'foo', 'type'=>'dir'], null), |
|
|
|
new FileInfo('path', $storage, 'intPath', ['name' => 'bar', 'type'=>'file', 'encrypted'=>true], null), |
|
|
|
new FileInfo('path', $sharedStorage, 'intPath', ['name' => 'shared', 'type'=>'file', 'encrypted'=>true], null), |
|
|
|
] |
|
|
|
); |
|
|
|
|
|
|
|
$this->view->expects($this->at(3))->method('getDirectoryContent') |
|
|
|
->with('/user1/files/foo')->willReturn( |
|
|
|
[ |
|
|
|
new FileInfo('path', null, 'intPath', ['name' => 'subfile', 'type'=>'file', 'encrypted'=>true], null) |
|
|
|
new FileInfo('path', $storage, 'intPath', ['name' => 'subfile', 'type'=>'file', 'encrypted'=>true], null) |
|
|
|
] |
|
|
|
); |
|
|
|
|
|
|
|
|