(t *testing.T, url string, expected string)
| 232 | } |
| 233 | |
| 234 | func assertRequestBody(t *testing.T, url string, expected string) { |
| 235 | r := httptest.NewRequest("GET", url, nil) |
| 236 | w := httptest.NewRecorder() |
| 237 | |
| 238 | req, err := NewRequestWithContext(r, WithRequestDocumentRoot(testDataPath, false)) |
| 239 | assert.NoError(t, err) |
| 240 | err = ServeHTTP(w, req) |
| 241 | assert.NoError(t, err) |
| 242 | resp := w.Result() |
| 243 | body, _ := io.ReadAll(resp.Body) |
| 244 | assert.Equal(t, expected, string(body)) |
| 245 | } |
| 246 | |
| 247 | // create a mix of possible transitions of workers and regular threads |
| 248 | func allPossibleTransitions(worker1Path string, worker2Path string) []func(*phpThread) { |
no test coverage detected