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

Function TestModuleWorkerInheritsEnv

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

Source from the content-addressed store, hash-verified

221}
222
223func TestModuleWorkerInheritsEnv(t *testing.T) {
224 tester := caddytest.NewTester(t)
225 initServer(t, tester, `
226 {
227 skip_install_trust
228 admin localhost:2999
229 }
230
231 http://localhost:`+testPort+` {
232 route {
233 php {
234 root ../testdata
235 env APP_ENV inherit_this
236 worker worker-with-env.php
237 }
238 }
239 }
240 `, "caddyfile")
241
242 tester.AssertGetResponse("http://localhost:"+testPort+"/worker-with-env.php", http.StatusOK, "Worker has APP_ENV=inherit_this")
243}
244
245func TestNamedModuleWorkers(t *testing.T) {
246 var wg sync.WaitGroup

Callers

nothing calls this directly

Calls 1

initServerFunction · 0.85

Tested by

no test coverage detected