Skip to content

Testing: MiniWebAppAotExecuteTest CLI smoke (#485, #676 step 2) #747

@PurHur

Description

@PurHur

Problem

#568 ✅ closed — ExamplesCompileTest::test003MiniWebAppEventuallyRuns() already runs phpc build --project and asserts .phpc/bin/app exists. There is still no dedicated test that executes the binary with CGI env and route needles (#676 step 2).

#485 title tracks this gap but body still references pre-#568 skip state. Shell smoke (#738) and PHPUnit execute should share the same env contract.

Goal

test/unit/MiniWebAppAotExecuteTest.php (or extend ExamplesCompileTest):

Step Assert
Build phpc build --project examples/003-MiniWebApp exit 0
GET home (query) QUERY_STRING=route=home → stdout contains app_name from config.php
GET hello QUERY_STRING=route=hello&name=DevHello Dev
PATH_INFO PATH_INFO=/hello + QUERY_STRING=name=Dev → greeting (#489)
POST contact REQUEST_METHOD=POST, body name=PostDev → thank-you

@group miniwebapp, @group llvm, @group aot-link.

Implementation hints

Piece File Notes
Test class test/unit/MiniWebAppAotExecuteTest.php Extract from #454 if method grows too large
Env helper runBinaryWithCgiEnv(string $binary, array $env): string Mirror MiniWebAppVmCliTest / #491
Build reuse ExamplesCompileTest::llvmProcessEnv() Same LLVM skip message
Order #676 step 2 Land before #738 shell smoke and #478 HTTP

Acceptance criteria

./script/ci-local.sh --filter MiniWebAppAotExecute
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  ./script/ci-local.sh --filter MiniWebAppAotExecute

Once #568 link is green, prefer fail over skip for execute regressions.

Dependencies

Verification

Local/Docker only — not GitHub Actions.

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