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

Function testLog_error_log

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

Source from the content-addressed store, hash-verified

490 testLog_error_log(t, &testOptions{workerScript: "log-error_log.php"})
491}
492func 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
505func TestLog_frankenphp_log_module(t *testing.T) { testLog_frankenphp_log(t, &testOptions{}) }
506func TestLog_frankenphp_log_worker(t *testing.T) {

Callers 2

TestLog_error_log_moduleFunction · 0.85
TestLog_error_log_workerFunction · 0.85

Calls 3

newTestLoggerFunction · 0.85
runTestFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected