From 6291f62024cb9e154fc4e88a52e797abde97bf43 Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 16 Oct 2020 17:11:53 +0300 Subject: [PATCH] feat(core): add test for Entries fetchCollection() method #477 --- tests/Entries/EntriesTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Entries/EntriesTest.php b/tests/Entries/EntriesTest.php index 21a13d75..8bc7cc5d 100644 --- a/tests/Entries/EntriesTest.php +++ b/tests/Entries/EntriesTest.php @@ -44,3 +44,12 @@ test('test fetch single entry', function () { $fetch = flextype('entries')->fetch('zed'); $this->assertEquals('Zed', $fetch['title']); }); + +test('test fetch collection entry', function () { + // 1 + flextype('entries')->create('foo', []); + flextype('entries')->create('foo/bar', []); + flextype('entries')->create('foo/baz', []); + $fetch = flextype('entries')->fetchCollection('foo'); + $this->assertTrue(count($fetch) > 0); +});