Skip to content

Testing: MiniWebAppJitProjectTest — PATH_INFO hello + contact POST (#587 phase 2) #1759

Description

@PurHur

Problem

#587 landed MiniWebAppJitProjectTest with a single assertion: home via ?route=home query string. AOT execute coverage is full-matrix (#764 ✅, #1529 ✅: hello PATH_INFO, contact POST, api/status). JIT project smoke still has no signal that PATH_INFO routing or POST bodies work under bin/jit.php for the full MiniWebApp graph.

Regressions in JIT lowering for $_SERVER['PATH_INFO'], $_POST, or template includes on non-home routes would only surface when someone manually curls PATH_INFO URLs through JIT.

Goal

Extend test/unit/MiniWebAppJitProjectTest.php (same @group llvm, MINIWEBAPP_JIT_PROJECT_GATE opt-in):

Test CGI env helper Assert
testPathInfoHelloShowsName MiniWebAppCgiEnv::pathInfoHello('Dev') body contains greeting + Dev
testContactPostThankYou MiniWebAppCgiEnv::contactPost(...) body contains thank-you / form ack

Reuse helpers from MiniWebAppAotExecuteTest / MiniWebAppCgiEnv — do not duplicate env strings.

Implementation hints

Piece File Notes
Env fixtures test/MiniWebAppCgiEnv.php Add JIT-specific helpers if missing (mirror AOT)
Test class test/unit/MiniWebAppJitProjectTest.php @group miniwebapp-jit-project
CI script/ci-common.sh Runs when MINIWEBAPP_JIT_PROJECT_GATE=1 (unchanged until #730)
Blockers #475, #58 Skip individual tests with message if JIT throws not jittable

Acceptance criteria

MINIWEBAPP_JIT_PROJECT_GATE=1 ./script/ci-local.sh --filter MiniWebAppJitProjectTest
# or Docker:
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev bash -lc \
  'MINIWEBAPP_JIT_PROJECT_GATE=1 vendor/bin/phpunit --filter MiniWebAppJitProjectTest'

All three routes (home query, hello PATH_INFO, contact POST) pass or skip with explicit blocker issue — not silent empty stdout.

Dependencies

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions