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

Function testInput

frankenphp_test.go:302–309  ·  view source on GitHub ↗
(t *testing.T, opts *testOptions)

Source from the content-addressed store, hash-verified

300func TestInput_module(t *testing.T) { testInput(t, nil) }
301func TestInput_worker(t *testing.T) { testInput(t, &testOptions{workerScript: "input.php"}) }
302func testInput(t *testing.T, opts *testOptions) {
303 runTest(t, func(handler func(http.ResponseWriter, *http.Request), _ *httptest.Server, i int) {
304 body, resp := testPost("http://example.com/input.php", fmt.Sprintf("post data %d", i), handler, t)
305
306 assert.Equal(t, fmt.Sprintf("post data %d", i), body)
307 assert.Equal(t, "bar", resp.Header.Get("Foo"))
308 }, opts)
309}
310
311func TestPostSuperGlobals_module(t *testing.T) { testPostSuperGlobals(t, nil) }
312func TestPostSuperGlobals_worker(t *testing.T) {

Callers 2

TestInput_moduleFunction · 0.85
TestInput_workerFunction · 0.85

Calls 3

runTestFunction · 0.85
testPostFunction · 0.85
GetMethod · 0.80

Tested by

no test coverage detected