CommonPHP UI 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/ui/phpunit.xml.distFrom package/ui:
../../vendor/bin/phpunit -c phpunit.xml.distOn Windows from package/ui:
..\..\vendor\bin\phpunit.bat --configuration phpunit.xml.distThe unit suite covers:
ViewDataconstruction, direct and nested lookup, direct-key precedence, mutation, clone helpers, array access, iteration, counting, JSON serialization, and merging anotherViewData;Templatefactories, file-backed paths, data, clone helpers, and blank-name rejection;Layoutcontent keys, file-backed layouts, clone helpers, and invalid content key rejection;Componentconstructors and factories, component names, template names, paths, and data;Viewconstruction from strings and objects, factory creation, data, layouts, and clone helpers;ComponentRegistryconstruction, registration, shorthand setup, lookup, removal, listing, and exception paths;AbstractRendererdefault driver names and helper normalization behavior;NativePhpRendererpath registration, template resolution, explicit file templates, escaping, layouts, custom content keys, registered and direct components, helper collision behavior, missing templates, missing components, template exception wrapping, UI exception bubbling, and output buffer cleanup;ViewFactoryobject factories, default native renderer setup, shared component registry, component registration, direct renderer swapping, render delegation, runtime driver integration, and driver precedence;- package exception factory messages and previous throwable preservation.
Manual review should still cover downstream integrations that turn rendered strings into HTTP responses, wire third-party template engines, or inject application-specific helpers.