Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:tests:optionshandlertest

This is an old revision of the document!


tests/api/unit/OptionsHandlerTest.php

Source: tests/api/unit/OptionsHandlerTest.php · 106 lines, ~449 statements · namespace: (global) · `declare(strict_types=1)`: no


Options Handler Test

Tests the OPTIONS preflight handler in api/index.php and the 404 behaviour of ApiRouter::dispatch for unmatched routes.

The OPTIONS handler always answers 204 with an Allow header computed from the route table. For an unknown path it falls back to the full method list plus OPTIONS. Only non-OPTIONS dispatch of an unknown path returns 404.

Includes

^ Mode ^ Target ^ Line ^
| ''require'' | ''require_once __DIR__ . '/../ApiTestCase.php';'' | 16 |

Types declared here


Generated by 'tools/gendoc'.

scriptlog/tests/optionshandlertest.1790413764.txt.gz · Last modified: by admin