diff options
author | Paul Tirk <paultirk@paultirk.com> | 2021-03-28 21:41:50 +0200 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 10:23:11 +0200 |
commit | 1208dc8d7190ee3cb7b268083916538059da1c5f (patch) | |
tree | 8a4632810dd8b541a84f6bacf1d89c9d901db3f1 /tests/Unit/Db/FolderTest.php | |
parent | 8b3c1341e8d7da94e95c47f3695dc36b693fb333 (diff) |
add tests for 'toAPI2' method
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
Diffstat (limited to 'tests/Unit/Db/FolderTest.php')
-rw-r--r-- | tests/Unit/Db/FolderTest.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/Unit/Db/FolderTest.php b/tests/Unit/Db/FolderTest.php index 39ee347b3..8f98fb373 100644 --- a/tests/Unit/Db/FolderTest.php +++ b/tests/Unit/Db/FolderTest.php @@ -38,6 +38,25 @@ class FolderTest extends TestCase } + public function testToAPI2() + { + $folder = new Folder(); + $folder->setId(3); + $folder->setName('name'); + $folder->setOpened(false); + + $this->assertEquals( + [ + 'id' => 3, + 'name' => 'name', + 'opened' => false, + 'feeds' => [] + ], + $folder->toAPI2() + ); + } + + public function testSerialize() { $folder = new Folder(); @@ -83,4 +102,4 @@ class FolderTest extends TestCase $folder->setUserId('15'); $this->assertEquals('15', $folder->getUserId()); } -}
\ No newline at end of file +} |