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:
@@ -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',
|
||||
|
Reference in New Issue
Block a user