Skip to content

Testing: ServeAotTest — static assets from docroot with AOT binary #277

@PurHur

Description

@PurHur

Problem

test/real/ServeTest.php already verifies static style.css from a VM docroot (#150). test/real/ServeAotTest.php only hits the compiled PHP binary (/example.php?name=Dev) and never requests a non-.php asset.

examples/001-SimpleWeb/example.php links <link rel="stylesheet" href="/style.css">. Regressions in bin/serve-aot.php static-file handling would not fail CI.

Goal

Extend ServeAotTest (or sibling test) to:

  1. Build AOT binary for examples/001-SimpleWeb/example.php
  2. phpc serve --aot (or bin/serve-aot.php) docroot
  3. GET /style.css200, Content-Type: text/css, body contains expected rule

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 ServeAotTest

passes with serve tests enabled (no PHP_COMPILER_SKIP_SERVE_TESTS).

Dependencies

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions