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

Function TestRouterStatic

router_test.go:689–703  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

687}
688
689func TestRouterStatic(t *testing.T) {
690 path := "/folders/a/files/echo.gif"
691 req := httptest.NewRequest(http.MethodGet, path, nil)
692 rec := httptest.NewRecorder()
693
694 e := New()
695 e.GET(path, handlerFunc)
696
697 c := e.NewContext(req, rec)
698 _ = e.router.Route(c)
699
700 assert.Equal(t, path, c.Path())
701 assert.Equal(t, 0, cap(*c.pathValues))
702 assert.Len(t, *c.pathValues, 0)
703}
704
705func TestRouterParam(t *testing.T) {
706 e := New()

Callers

nothing calls this directly

Calls 5

PathMethod · 0.95
NewFunction · 0.85
NewContextMethod · 0.80
RouteMethod · 0.65
GETMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…