MCPcopy Index your code
hub / github.com/labstack/echo / TestToContext_Headers

Function TestToContext_Headers

echotest/context_test.go:55–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestToContext_Headers(t *testing.T) {
56 testConf := ContextConfig{
57 Headers: http.Header{echo.HeaderXRequestID: []string{"ABC"}},
58 }
59 c := testConf.ToContext(t)
60
61 id := c.Request().Header.Get(echo.HeaderXRequestID)
62
63 assert.Equal(t, "ABC", id)
64}
65
66func TestToContext_PathValues(t *testing.T) {
67 testConf := ContextConfig{

Callers

nothing calls this directly

Calls 3

ToContextMethod · 0.95
RequestMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…