We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1145e8e commit c94f9a4Copy full SHA for c94f9a4
tests/ExampleTest.php
tests/JsonStructureTest.php
@@ -0,0 +1,42 @@
1
+<?php
2
+
3
+use Hyperlink\JsonStructure\Actions\DecodeJsonStructure;
4
5
+test('that the json command returns a valid answer', function () {
6
+ $array = [
7
+ 'key1' => 'value1',
8
+ 'keys1' => [
9
+ 'key2' => 'value2',
10
+ 'key3' => 'value3',
11
+ ],
12
+ 'keys2' => [
13
+ [
14
+ 'key4' => 'value4',
15
+ 'key5' => 'value5',
16
17
18
+ 'key4' => 'value6',
19
+ 'key5' => 'value7',
20
21
22
+ ];
23
24
25
+ $result = call_user_func(new DecodeJsonStructure($array));
26
27
+ $this->assertEquals($result,
28
+ "[
29
+ 'key1',
30
31
+ 'key2',
32
+ 'key3'
33
34
35
+ '*' => [
36
+ 'key4',
37
+ 'key5'
38
+ ]
39
40
+]
41
+");
42
+});
0 commit comments