aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files')
-rw-r--r--tests/lib/Files/AppData/AppDataTest.php24
1 files changed, 7 insertions, 17 deletions
diff --git a/tests/lib/Files/AppData/AppDataTest.php b/tests/lib/Files/AppData/AppDataTest.php
index 3247ce7ba99..1d5cea0faf1 100644
--- a/tests/lib/Files/AppData/AppDataTest.php
+++ b/tests/lib/Files/AppData/AppDataTest.php
@@ -55,30 +55,22 @@ class AppDataTest extends \Test\TestCase {
}
private function setupAppFolder() {
- $dataFolder = $this->createMock(Folder::class);
$appFolder = $this->createMock(Folder::class);
- $this->rootFolder->expects($this->once())
- ->method('get')
- ->with($this->equalTo('appdata_iid'))
- ->willReturn($dataFolder);
- $dataFolder->expects($this->once())
+ $this->rootFolder->expects($this->any())
->method('get')
- ->with($this->equalTo('myApp'))
+ ->with($this->equalTo('appdata_iid/myApp'))
->willReturn($appFolder);
- return [$dataFolder, $appFolder];
+ return $appFolder;
}
public function testGetFolder() {
- $folders = $this->setupAppFolder();
- $appFolder = $folders[1];
-
$folder = $this->createMock(Folder::class);
- $appFolder->expects($this->once())
+ $this->rootFolder->expects($this->once())
->method('get')
- ->with($this->equalTo('folder'))
+ ->with($this->equalTo('appdata_iid/myApp/folder'))
->willReturn($folder);
$result = $this->appData->getFolder('folder');
@@ -86,8 +78,7 @@ class AppDataTest extends \Test\TestCase {
}
public function testNewFolder() {
- $folders = $this->setupAppFolder();
- $appFolder = $folders[1];
+ $appFolder = $this->setupAppFolder();
$folder = $this->createMock(Folder::class);
@@ -101,8 +92,7 @@ class AppDataTest extends \Test\TestCase {
}
public function testGetDirectoryListing() {
- $folders = $this->setupAppFolder();
- $appFolder = $folders[1];
+ $appFolder = $this->setupAppFolder();
$file = $this->createMock(File::class);
$folder = $this->createMock(Folder::class);