(t *testing.T)
| 409 | } |
| 410 | |
| 411 | func TestCustomCaddyVariablesInEnv(t *testing.T) { |
| 412 | tester := caddytest.NewTester(t) |
| 413 | initServer(t, tester, ` |
| 414 | { |
| 415 | skip_install_trust |
| 416 | admin localhost:2999 |
| 417 | http_port `+testPort+` |
| 418 | https_port 9443 |
| 419 | |
| 420 | frankenphp { |
| 421 | worker { |
| 422 | file ../testdata/worker-env.php |
| 423 | num 1 |
| 424 | env FOO world |
| 425 | } |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | localhost:`+testPort+` { |
| 430 | route { |
| 431 | map 1 {my_customvar} { |
| 432 | default "hello " |
| 433 | } |
| 434 | php { |
| 435 | root ../testdata |
| 436 | env FOO {my_customvar} |
| 437 | } |
| 438 | } |
| 439 | } |
| 440 | `, "caddyfile") |
| 441 | |
| 442 | tester.AssertGetResponse("http://localhost:"+testPort+"/worker-env.php", http.StatusOK, "hello world") |
| 443 | } |
| 444 | |
| 445 | func TestPHPServerDirective(t *testing.T) { |
| 446 | tester := caddytest.NewTester(t) |
nothing calls this directly
no test coverage detected