MCPcopy Create free account
hub / github.com/php/frankenphp / testPhpInfo

Function testPhpInfo

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

Source from the content-addressed store, hash-verified

444func TestPhpInfo_module(t *testing.T) { testPhpInfo(t, nil) }
445func TestPhpInfo_worker(t *testing.T) { testPhpInfo(t, &testOptions{workerScript: "phpinfo.php"}) }
446func testPhpInfo(t *testing.T, opts *testOptions) {
447 var logOnce sync.Once
448 runTest(t, func(handler func(http.ResponseWriter, *http.Request), _ *httptest.Server, i int) {
449 body, _ := testGet(fmt.Sprintf("http://example.com/phpinfo.php?i=%d", i), handler, t)
450
451 logOnce.Do(func() {
452 t.Log(body)
453 })
454
455 assert.Contains(t, body, "frankenphp")
456 assert.Contains(t, body, fmt.Sprintf("i=%d", i))
457 }, opts)
458}
459
460func TestPersistentObject_module(t *testing.T) { testPersistentObject(t, nil) }
461func TestPersistentObject_worker(t *testing.T) {

Callers 2

TestPhpInfo_moduleFunction · 0.85
TestPhpInfo_workerFunction · 0.85

Calls 2

runTestFunction · 0.85
testGetFunction · 0.85

Tested by

no test coverage detected