mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 21:56:33 +02:00
feat(tests): improve tests
This commit is contained in:
@@ -4,6 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
test('encode', function () {
|
||||
$this->assertEquals(65, strings(serializers()->phparray()->encode(['title' => 'Foo', 'content' => 'Bar']))->length());
|
||||
|
||||
registry()->set('flextype.settings.serializers.phparray.encode.wrap', false);
|
||||
$this->assertEquals(49, strings(serializers()->phparray()->encode(['title' => 'Foo', 'content' => 'Bar']))->length());
|
||||
});
|
||||
|
||||
test('decode', function () {
|
||||
|
@@ -4,6 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
test('encode', function () {
|
||||
$this->assertEquals(31, strings(serializers()->phpcode()->encode(['flextype' => registry()->get("flextype.manifest.version")]))->length());
|
||||
|
||||
registry()->set('flextype.settings.serializers.phpcode.encode.wrap', true);
|
||||
$this->assertEquals(47, strings(serializers()->phpcode()->encode(['flextype' => registry()->get("flextype.manifest.version")]))->length());
|
||||
});
|
||||
|
||||
test('decode', function () {
|
||||
|
Reference in New Issue
Block a user