Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:tests:router

This is an old revision of the document!


tests/api/router.php

Source: tests/api/router.php · 24 lines, ~55 statements · namespace: (global) · `declare(strict_types=1)`: no


PHP Built-in Server Router (tests only)

Router script passed to `php -S` for the API integration tests. Routes every /api/v1/* request to api/index.php (which handles routing itself) and lets everything else fall through to the static-file handler so the local test server behaves like the production web server.

Usage:

php -S 127.0.0.1:PORT -t <project-root> tests/api/router.php

Includes

^ Mode ^ Target ^ Line ^
| ''require'' | ''require __DIR__ . '/../../api/index.php';'' | 19 |

Generated by 'tools/gendoc'.

scriptlog/tests/router.1790413766.txt.gz · Last modified: by admin