summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Service/FolderServiceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Service/FolderServiceTest.php')
-rw-r--r--tests/Unit/Service/FolderServiceTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Unit/Service/FolderServiceTest.php b/tests/Unit/Service/FolderServiceTest.php
index 2b55ee01a..3e7e98041 100644
--- a/tests/Unit/Service/FolderServiceTest.php
+++ b/tests/Unit/Service/FolderServiceTest.php
@@ -262,4 +262,21 @@ class FolderServiceTest extends TestCase
}
+ public function testRead()
+ {
+ $folder = new Folder();
+ $folder->setId(1);
+
+ $this->mapper->expects($this->once())
+ ->method('findFromUser')
+ ->with('jack', 1)
+ ->will($this->returnValue($folder));
+
+ $this->mapper->expects($this->exactly(1))
+ ->method('read')
+ ->withConsecutive(['jack', 1, null]);
+
+ $this->class->read('jack', 1);
+ }
+
}