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

Function TestPHPMap

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

Source from the content-addressed store, hash-verified

37}
38
39func TestPHPMap(t *testing.T) {
40 testOnDummyPHPThread(t, func() {
41 originalMap := map[string]string{
42 "foo1": "bar1",
43 "foo2": "bar2",
44 }
45
46 phpArray := PHPMap(originalMap)
47 defer zendHashDestroy(phpArray)
48 convertedMap, err := GoMap[string](phpArray)
49 require.NoError(t, err)
50
51 assert.Equal(t, originalMap, convertedMap, "associative array should be equal after conversion")
52 })
53}
54
55func TestOrderedPHPAssociativeArray(t *testing.T) {
56 testOnDummyPHPThread(t, func() {

Callers

nothing calls this directly

Calls 3

testOnDummyPHPThreadFunction · 0.85
PHPMapFunction · 0.85
zendHashDestroyFunction · 0.85

Tested by

no test coverage detected