(t *testing.T)
| 122 | } |
| 123 | |
| 124 | func TestNestedMixedArray(t *testing.T) { |
| 125 | testOnDummyPHPThread(t, func() { |
| 126 | originalArray := map[string]any{ |
| 127 | "string": "value", |
| 128 | "int": int64(123), |
| 129 | "float": 1.2, |
| 130 | "true": true, |
| 131 | "false": false, |
| 132 | "nil": nil, |
| 133 | "packedArray": []any{"bar1", "bar2"}, |
| 134 | "associativeArray": AssociativeArray[any]{ |
| 135 | Map: map[string]any{"foo1": "bar1", "foo2": "bar2"}, |
| 136 | Order: []string{"foo2", "foo1"}, |
| 137 | }, |
| 138 | } |
| 139 | |
| 140 | phpArray := PHPMap(originalArray) |
| 141 | defer zendHashDestroy(phpArray) |
| 142 | convertedArray, err := GoMap[any](phpArray) |
| 143 | require.NoError(t, err) |
| 144 | |
| 145 | assert.Equal(t, originalArray, convertedArray, "nested mixed array should be equal after conversion") |
| 146 | }) |
| 147 | } |
nothing calls this directly
no test coverage detected