Skip to content

Testing: ServeTest MiniWebApp routes via phpc serve (skipped until #67) #470

@PurHur

Description

@PurHur

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions