mirror of
https://github.com/flextype/flextype.git
synced 2025-08-06 13:16:45 +02:00
feat(tests): add tests for helpers
This commit is contained in:
@@ -99,19 +99,19 @@ test('slugify helper', function () {
|
||||
});
|
||||
|
||||
test('collection helper', function () {
|
||||
$this->assertEquals([], collection([]));
|
||||
$this->assertEquals([], collection([])->toArray());
|
||||
});
|
||||
|
||||
test('collectionFromJson helper', function () {
|
||||
$this->assertEquals(['foo'], collectionFromJson("{\"foo\"}"));
|
||||
$this->assertEquals(['foo'], collectionFromJson("{\"foo\"}")->toArray());
|
||||
});
|
||||
|
||||
test('collectionFromString helper', function () {
|
||||
$this->assertEquals(['foo', 'bar'], collectionFromString('foo, bar', ','));
|
||||
$this->assertEquals(['foo', 'bar'], collectionFromString('foo, bar', ',')->toArray());
|
||||
});
|
||||
|
||||
test('collectionWithRange helper', function () {
|
||||
$this->assertEquals([0, 1], collectionWithRange(0, 1, 1));
|
||||
$this->assertEquals([0, 1], collectionWithRange(0, 1, 1)->toArray());
|
||||
});
|
||||
|
||||
test('filterCollection helper', function () {
|
||||
|
Reference in New Issue
Block a user