MCPcopy
hub / github.com/labstack/echo / ToContext

Method ToContext

echotest/context.go:75–78  ·  view source on GitHub ↗

ToContext converts ContextConfig to echo.Context

(t *testing.T)

Source from the content-addressed store, hash-verified

73
74// ToContext converts ContextConfig to echo.Context
75func (conf ContextConfig) ToContext(t *testing.T) *echo.Context {
76 c, _ := conf.ToContextRecorder(t)
77 return c
78}
79
80// ToContextRecorder converts ContextConfig to echo.Context and httptest.ResponseRecorder
81func (conf ContextConfig) ToContextRecorder(t *testing.T) (*echo.Context, *httptest.ResponseRecorder) {

Callers 8

TestToContext_HeadersFunction · 0.95
TestToContext_PathValuesFunction · 0.95
TestToContext_RouteInfoFunction · 0.95
TestToContext_FormValuesFunction · 0.95
TestToContext_JSONBodyFunction · 0.95
TestToContext_JSONBodyFunction · 0.80

Calls 1

ToContextRecorderMethod · 0.95

Tested by 8

TestToContext_HeadersFunction · 0.76
TestToContext_PathValuesFunction · 0.76
TestToContext_RouteInfoFunction · 0.76
TestToContext_FormValuesFunction · 0.76
TestToContext_JSONBodyFunction · 0.76
TestToContext_JSONBodyFunction · 0.64