(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func TestPHP(t *testing.T) { |
| 77 | var wg sync.WaitGroup |
| 78 | tester := caddytest.NewTester(t) |
| 79 | initServer(t, tester, ` |
| 80 | { |
| 81 | skip_install_trust |
| 82 | admin localhost:2999 |
| 83 | http_port `+testPort+` |
| 84 | https_port 9443 |
| 85 | } |
| 86 | |
| 87 | localhost:`+testPort+` { |
| 88 | route { |
| 89 | php { |
| 90 | root ../testdata |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | `, "caddyfile") |
| 95 | |
| 96 | for i := range 100 { |
| 97 | wg.Add(1) |
| 98 | |
| 99 | go func(i int) { |
| 100 | tester.AssertGetResponse(fmt.Sprintf("http://localhost:"+testPort+"/index.php?i=%d", i), http.StatusOK, fmt.Sprintf("I am by birth a Genevese (%d)", i)) |
| 101 | wg.Done() |
| 102 | }(i) |
| 103 | } |
| 104 | wg.Wait() |
| 105 | } |
| 106 | |
| 107 | func TestLargeRequest(t *testing.T) { |
| 108 | tester := caddytest.NewTester(t) |
nothing calls this directly
no test coverage detected