mirror of
https://github.com/flextype/flextype.git
synced 2025-08-10 15:14:20 +02:00
feat(tests): improve tests for Collection #477
This commit is contained in:
@@ -46,6 +46,15 @@ test('test collect_filter() method', function () {
|
||||
$this->assertContains(collect_filter($random, ['return' => 'first']), $data);
|
||||
$this->assertContains(collect_filter($random, ['return' => 'last']), $data);
|
||||
|
||||
// return: exists
|
||||
$this->assertTrue(collect_filter($data, ['return' => 'exists']));
|
||||
|
||||
// return: shuffle
|
||||
$this->assertNotEquals(
|
||||
collect_filter($data, ['return' => 'shuffle']),
|
||||
collect_filter($data, ['return' => 'shuffle'])
|
||||
);
|
||||
|
||||
// return: count
|
||||
$this->assertEquals(3, collect_filter($data, ['return' => 'count']));
|
||||
|
||||
|
Reference in New Issue
Block a user