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

Function TestLargeRequest

caddy/caddy_test.go:107–133  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestLargeRequest(t *testing.T) {
108 tester := caddytest.NewTester(t)
109 initServer(t, tester, `
110 {
111 skip_install_trust
112 admin localhost:2999
113 http_port `+testPort+`
114 https_port 9443
115 }
116
117 localhost:`+testPort+` {
118 route {
119 php {
120 root ../testdata
121 }
122 }
123 }
124 `, "caddyfile")
125
126 tester.AssertPostResponseBody(
127 "http://localhost:"+testPort+"/large-request.php",
128 []string{},
129 bytes.NewBufferString(strings.Repeat("f", 1_048_576)),
130 http.StatusOK,
131 "Request body size: 1048576 (unknown)",
132 )
133}
134
135func TestWorker(t *testing.T) {
136 var wg sync.WaitGroup

Callers

nothing calls this directly

Calls 1

initServerFunction · 0.85

Tested by

no test coverage detected