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

Function TestContextHeader

engine/context_test.go:153–168  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

151}
152
153func TestContextHeader(t *testing.T) {
154 c, _ := e.NewContext()
155
156 for _, tt := range headerTests {
157 if _, err := c.Eval(tt.script); err != nil {
158 t.Errorf("Context.Eval('%s'): %s", tt.script, err)
159 continue
160 }
161
162 if reflect.DeepEqual(c.Header, tt.expected) == false {
163 t.Errorf("Context.Eval('%s'): expected '%#v', actual '%#v'", tt.script, tt.expected, c.Header)
164 }
165 }
166
167 c.Destroy()
168}
169
170var logTests = []struct {
171 script string

Callers

nothing calls this directly

Calls 3

EvalMethod · 0.95
DestroyMethod · 0.95
NewContextMethod · 0.80

Tested by

no test coverage detected