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

Function TestEnv

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

Source from the content-addressed store, hash-verified

295}
296
297func 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
328func TestJsonEnv(t *testing.T) {
329 tester := caddytest.NewTester(t)

Callers

nothing calls this directly

Calls 1

initServerFunction · 0.85

Tested by

no test coverage detected