MCPcopy Index your code
hub / github.com/php/frankenphp / testRequest

Function testRequest

frankenphp_test.go:111–121  ·  view source on GitHub ↗
(req *http.Request, handler func(http.ResponseWriter, *http.Request), t *testing.T)

Source from the content-addressed store, hash-verified

109}
110
111func testRequest(req *http.Request, handler func(http.ResponseWriter, *http.Request), t *testing.T) (string, *http.Response) {
112 t.Helper()
113
114 w := httptest.NewRecorder()
115 handler(w, req)
116 resp := w.Result()
117 body, err := io.ReadAll(resp.Body)
118 require.NoError(t, err)
119
120 return string(body), resp
121}
122
123func testGet(url string, handler func(http.ResponseWriter, *http.Request), t *testing.T) (string, *http.Response) {
124 t.Helper()

Callers 12

testGetFunction · 0.85
testPostFunction · 0.85
testServerVariableFunction · 0.85
testPostSuperGlobalsFunction · 0.85
testRequestSuperGlobalFunction · 0.85
testCookiesFunction · 0.85
TestMalformedCookieFunction · 0.85
testRequestHeadersFunction · 0.85
testFileUploadFunction · 0.85
testRejectInvalidHeadersFunction · 0.85
FuzzRequestFunction · 0.85

Calls 1

ResultMethod · 0.80

Tested by

no test coverage detected