(t *testing.T)
| 85 | } |
| 86 | |
| 87 | func TestPHPPackedArrayToGoMap(t *testing.T) { |
| 88 | testOnDummyPHPThread(t, func() { |
| 89 | originalSlice := []string{"bar1", "bar2"} |
| 90 | expectedMap := map[string]string{ |
| 91 | "0": "bar1", |
| 92 | "1": "bar2", |
| 93 | } |
| 94 | |
| 95 | phpArray := PHPPackedArray(originalSlice) |
| 96 | defer zendHashDestroy(phpArray) |
| 97 | convertedMap, err := GoMap[string](phpArray) |
| 98 | require.NoError(t, err) |
| 99 | |
| 100 | assert.Equal(t, expectedMap, convertedMap, "convert a packed to an associative array") |
| 101 | }) |
| 102 | } |
| 103 | |
| 104 | func TestPHPAssociativeArrayToPacked(t *testing.T) { |
| 105 | testOnDummyPHPThread(t, func() { |
nothing calls this directly
no test coverage detected