MCPcopy Index your code
hub / github.com/php/frankenphp / TestPHPPackedArray

Function TestPHPPackedArray

types_test.go:74–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

72}
73
74func TestPHPPackedArray(t *testing.T) {
75 testOnDummyPHPThread(t, func() {
76 originalSlice := []string{"bar1", "bar2"}
77
78 phpArray := PHPPackedArray(originalSlice)
79 defer zendHashDestroy(phpArray)
80 convertedSlice, err := GoPackedArray[string](phpArray)
81 require.NoError(t, err)
82
83 assert.Equal(t, originalSlice, convertedSlice, "slice should be equal after conversion")
84 })
85}
86
87func TestPHPPackedArrayToGoMap(t *testing.T) {
88 testOnDummyPHPThread(t, func() {

Callers

nothing calls this directly

Calls 3

testOnDummyPHPThreadFunction · 0.85
PHPPackedArrayFunction · 0.85
zendHashDestroyFunction · 0.85

Tested by

no test coverage detected