summaryrefslogtreecommitdiffstats
path: root/tests/unit/db/FolderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/db/FolderTest.php')
-rw-r--r--tests/unit/db/FolderTest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/unit/db/FolderTest.php b/tests/unit/db/FolderTest.php
index 026d1cf03..c4921b0f5 100644
--- a/tests/unit/db/FolderTest.php
+++ b/tests/unit/db/FolderTest.php
@@ -28,4 +28,23 @@ class FolderTest extends \PHPUnit_Framework_TestCase {
], $folder->toAPI());
}
+
+ public function testSerialize() {
+ $folder = new Folder();
+ $folder->setId(3);
+ $folder->setName('john');
+ $folder->setParentId(4);
+ $folder->setUserId('abc');
+ $folder->setOpened(true);
+ $folder->setDeletedAt(9);
+
+ $this->assertEquals([
+ 'id' => 3,
+ 'parentId' => 4,
+ 'name' => 'john',
+ 'userId' => 'abc',
+ 'opened' => true,
+ 'deletedAt' => 9,
+ ], $folder->jsonSerialize());
+ }
} \ No newline at end of file