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

Function TestPHPServerDirective

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

Source from the content-addressed store, hash-verified

443}
444
445func TestPHPServerDirective(t *testing.T) {
446 tester := caddytest.NewTester(t)
447 initServer(t, tester, `
448 {
449 skip_install_trust
450 admin localhost:2999
451 http_port `+testPort+`
452 https_port 9443
453 }
454
455 localhost:`+testPort+` {
456 root ../testdata
457 php_server
458 }
459 `, "caddyfile")
460
461 tester.AssertGetResponse("http://localhost:"+testPort, http.StatusOK, "I am by birth a Genevese (i not set)")
462 tester.AssertGetResponse("http://localhost:"+testPort+"/hello.txt", http.StatusOK, "Hello\n")
463 tester.AssertGetResponse("http://localhost:"+testPort+"/not-found.txt", http.StatusOK, "I am by birth a Genevese (i not set)")
464}
465
466func TestPHPServerDirectiveDisableFileServer(t *testing.T) {
467 tester := caddytest.NewTester(t)

Callers

nothing calls this directly

Calls 1

initServerFunction · 0.85

Tested by

no test coverage detected