Skip to content

Commit 1d9fc41

Browse files
committed
create test that indirectly checks it works
1 parent d400fe5 commit 1d9fc41

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

caddy/caddy_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,27 @@ func TestPHPServerDirective(t *testing.T) {
462462
tester.AssertGetResponse("http://localhost:"+testPort+"/not-found.txt", http.StatusOK, "I am by birth a Genevese (i not set)")
463463
}
464464

465+
func TestPHPServerDirectiveWorker(t *testing.T) {
466+
tester := caddytest.NewTester(t)
467+
initServer(t, tester, `
468+
{
469+
skip_install_trust
470+
admin localhost:2999
471+
http_port `+testPort+`
472+
https_port 9443
473+
}
474+
475+
localhost:`+testPort+` {
476+
root ../testdata
477+
php_server {
478+
worker worker-with-counter.php
479+
}
480+
}
481+
`, "caddyfile")
482+
483+
tester.AssertGetResponse("http://localhost:"+testPort+"/worker-with-counter.php", http.StatusOK, "requests:1")
484+
}
485+
465486
func TestPHPServerDirectiveDisableFileServer(t *testing.T) {
466487
tester := caddytest.NewTester(t)
467488
initServer(t, tester, `

0 commit comments

Comments
 (0)