1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-06 21:26:48 +02:00

feat(tests): update tests for types

This commit is contained in:
Awilum
2022-05-07 22:38:36 +03:00
parent 8a89731f22
commit 85d8a620cf

View File

@@ -19,6 +19,8 @@ test('types directive', function () {
entries()->create('type-array', ['foo' => '@type:array 1,2,3,4,5']);
entries()->create('type-array-2', ['foo' => '@type:array [1,2,3,4,5]']);
entries()->create('type-array-3', ['foo' => '@type:array {"foo": "Foo"}']);
entries()->create('type-array-4', ['foo' => '@type:array foo']);
$this->assertEquals(100, entries()->fetch('type-int')['foo']);
$this->assertEquals(100, entries()->fetch('type-integer')['foo']);
@@ -28,4 +30,6 @@ test('types directive', function () {
$this->assertEquals([1,2,3,4,5], entries()->fetch('type-array')['foo']);
$this->assertEquals([1,2,3,4,5], entries()->fetch('type-array-2')['foo']);
$this->assertEquals(['foo' => 'Foo'], entries()->fetch('type-array-3')['foo']);
$this->assertEquals(['foo'], entries()->fetch('type-array-4')['foo']);
});