CommonPHP Web includes a package-local PHPUnit configuration and unit tests.
From the package directory:
composer installFrom the monorepo, the root vendor directory can also satisfy the test suite because tests/bootstrap.php checks both package and workspace autoloaders.
From the monorepo root:
vendor/bin/phpunit -c package/web/phpunit.xml.distOn Windows:
vendor\bin\phpunit.bat -c package\web\phpunit.xml.distThe unit suite covers:
AbstractPagedefaults and template/data/layout hooks;PageRegistryregistration, lookup, iteration, removal, clearing, class resolution, and invalid entries;PageRenderContextrequest, route, parameter, label, and immutable attribute helpers;PageResolverregistered pages, page classes, callables, route handlers, controller strings, controller arrays, static handlers, invalid handlers, missing classes, and wrapped failures;PageResponserendering pages, views, templates, headers, content length, omitted bodies, bodyless statuses, and renderer failures;PageResponseFactoryroute-result normalization, HTML/text responses, redirects,204,404,405, error responses, header preservation, and body suppression;RedirectResponseredirect constructors, header handling, location updates, and validation failures;ViewPageRendererintegration withViewFactory;WebSurfacedependency accessors, prefix support, root mounts, route helpers, groups, manual routes, registered pages, handler result normalization, controller handlers, routing failures, dispatch failures, scheme failures, andHEADrequests;- package exception factory methods.
Manual review should still cover application-specific templates, middleware order in HttpApplication, and production renderer driver configuration.