(t *testing.T, opts *testOptions)
| 490 | testLog_error_log(t, &testOptions{workerScript: "log-error_log.php"}) |
| 491 | } |
| 492 | func testLog_error_log(t *testing.T, opts *testOptions) { |
| 493 | var buf fmt.Stringer |
| 494 | opts.logger, buf = newTestLogger(t) |
| 495 | |
| 496 | runTest(t, func(handler func(http.ResponseWriter, *http.Request), _ *httptest.Server, i int) { |
| 497 | req := httptest.NewRequest("GET", fmt.Sprintf("http://example.com/log-error_log.php?i=%d", i), nil) |
| 498 | w := httptest.NewRecorder() |
| 499 | handler(w, req) |
| 500 | |
| 501 | assert.Contains(t, buf.String(), fmt.Sprintf("request %d", i)) |
| 502 | }, opts) |
| 503 | } |
| 504 | |
| 505 | func TestLog_frankenphp_log_module(t *testing.T) { testLog_frankenphp_log(t, &testOptions{}) } |
| 506 | func TestLog_frankenphp_log_worker(t *testing.T) { |
no test coverage detected