1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 14:16:46 +02:00

feat(core): add test for Entries fetchCollection() method #477

This commit is contained in:
Awilum
2020-10-16 17:11:53 +03:00
parent a6b6e80897
commit 6291f62024

View File

@@ -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);
});