1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-07 05:36:54 +02:00

feat(tests): improve tests for helpers

This commit is contained in:
Awilum
2021-09-28 23:02:37 +03:00
parent 2a6a93d2d7
commit 851c029372

View File

@@ -163,6 +163,14 @@ test('filterCollection helper', function () {
'Blog' => [0 => ['title' => 'Blog']]],
filterCollection($data, ['return' => 'all',
'group_by' => 'title']));
$this->assertEquals(['home' => ['title' => 'Home']],
filterCollection($data, ['return' => 'all',
'only' => ['home']]));
$this->assertEquals(['home' => ['title' => 'Home']],
filterCollection($data, ['return' => 'all',
'only' => ['home']]));
// param: where and return: all
$this->assertEquals(['about' => ['title' => 'About']],
filterCollection($data, ['return' => 'all',