(t *testing.T)
| 295 | } |
| 296 | |
| 297 | func TestEnv(t *testing.T) { |
| 298 | tester := caddytest.NewTester(t) |
| 299 | initServer(t, tester, ` |
| 300 | { |
| 301 | skip_install_trust |
| 302 | admin localhost:2999 |
| 303 | http_port `+testPort+` |
| 304 | https_port 9443 |
| 305 | |
| 306 | frankenphp { |
| 307 | worker { |
| 308 | file ../testdata/worker-env.php |
| 309 | num 1 |
| 310 | env FOO bar |
| 311 | } |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | localhost:`+testPort+` { |
| 316 | route { |
| 317 | php { |
| 318 | root ../testdata |
| 319 | env FOO baz |
| 320 | } |
| 321 | } |
| 322 | } |
| 323 | `, "caddyfile") |
| 324 | |
| 325 | tester.AssertGetResponse("http://localhost:"+testPort+"/worker-env.php", http.StatusOK, "bazbar") |
| 326 | } |
| 327 | |
| 328 | func TestJsonEnv(t *testing.T) { |
| 329 | tester := caddytest.NewTester(t) |
nothing calls this directly
no test coverage detected