MCPcopy Create free account
hub / github.com/deuill/go-php / TestValueMap

Function TestValueMap

engine/value_test.go:512–532  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

510}
511
512func TestValueMap(t *testing.T) {
513 c, _ := e.NewContext()
514
515 for _, tt := range valueMapTests {
516 val, err := NewValue(tt.value)
517 if err != nil {
518 t.Errorf("NewValue('%v'): %s", tt.value, err)
519 continue
520 }
521
522 actual := val.Map()
523
524 if reflect.DeepEqual(actual, tt.expected) == false {
525 t.Errorf("Value.Map('%v'): expected '%#v', actual '%#v'", tt.value, tt.expected, actual)
526 }
527
528 val.Destroy()
529 }
530
531 c.Destroy()
532}
533
534func TestValuePtr(t *testing.T) {
535 c, _ := e.NewContext()

Callers

nothing calls this directly

Calls 5

MapMethod · 0.95
DestroyMethod · 0.95
DestroyMethod · 0.95
NewValueFunction · 0.85
NewContextMethod · 0.80

Tested by

no test coverage detected