(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func TestOrderedPHPAssociativeArray(t *testing.T) { |
| 56 | testOnDummyPHPThread(t, func() { |
| 57 | originalArray := AssociativeArray[string]{ |
| 58 | Map: map[string]string{ |
| 59 | "foo1": "bar1", |
| 60 | "foo2": "bar2", |
| 61 | }, |
| 62 | Order: []string{"foo2", "foo1"}, |
| 63 | } |
| 64 | |
| 65 | phpArray := PHPAssociativeArray(originalArray) |
| 66 | defer zendHashDestroy(phpArray) |
| 67 | convertedArray, err := GoAssociativeArray[string](phpArray) |
| 68 | require.NoError(t, err) |
| 69 | |
| 70 | assert.Equal(t, originalArray, convertedArray, "associative array should be equal after conversion") |
| 71 | }) |
| 72 | } |
| 73 | |
| 74 | func TestPHPPackedArray(t *testing.T) { |
| 75 | testOnDummyPHPThread(t, func() { |
nothing calls this directly
no test coverage detected