Problem
#461 extends script/examples-web-smoke.sh (shell + curl). #454 adds ExamplesCompileTest @group miniwebapp (lint/build). There is no PHPUnit ServeTest that boots phpc serve against examples/003-MiniWebApp/ with phpc.json "public": "public" (#443 ✅) and asserts route bodies.
Without an in-suite gate, serve regressions for the north-star app only surface via manual curl or the optional shell harness.
Goal
Add test/unit/ServeMiniWebAppTest.php (or extend ServeTest) that:
| Step |
Behavior |
| Setup |
phpc serve 127.0.0.1:<ephemeral> examples/003-MiniWebApp (project mode) |
GET /?route=home |
HTML contains app name from config.php |
GET /?route=hello&name=Dev |
greeting needle |
POST /?route=contact |
thank-you body (#248 parity) |
GET /?route=api/status |
JSON ok (#61) |
Scope
Acceptance criteria
make docker-build-22
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
./script/ci-local.sh --filter ServeMiniWebApp
Dependencies
Links
Problem
#461 extends
script/examples-web-smoke.sh(shell + curl). #454 addsExamplesCompileTest@group miniwebapp(lint/build). There is no PHPUnit ServeTest that bootsphpc serveagainstexamples/003-MiniWebApp/withphpc.json"public": "public"(#443 ✅) and asserts route bodies.Without an in-suite gate, serve regressions for the north-star app only surface via manual curl or the optional shell harness.
Goal
Add
test/unit/ServeMiniWebAppTest.php(or extendServeTest) that:phpc serve 127.0.0.1:<ephemeral> examples/003-MiniWebApp(project mode)/?route=homeconfig.php/?route=hello&name=Dev/?route=contact/?route=api/statusok(#61)Scope
@group miniwebappand skip whilephpc lint --all examples/003-MiniWebAppexits non-zero (skeleton phase)PHP_COMPILER_SKIP_SERVE_TESTS=1(same as Testing: Run HTTP serve integration tests in Docker local CI #234)ServeTest.phpAcceptance criteria
make docker-build-22 docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \ ./script/ci-local.sh --filter ServeMiniWebAppci-local.sh(no GitHub Actions required)Dependencies
breakin route scan loop (public/index.php)publicdocrootLinks
examples/003-MiniWebApp/README.mdcurl recipes