Tests Backend module
Checks PHP backend assumptions; database doubles are not live MariaDB evidence.
PHP tests and their limits
Backend tests inspect API foundation, account/order workflows, pricing/payment contracts and documentation publishing with controlled test doubles. They are particularly useful for rejecting missing auth, malformed requests, incorrect status changes and WordPress publisher overwrite behaviour before a server is touched.
Additional evidence still needed
Mocks are not a live MariaDB session. Real SQL defaults, unique indexes, email delivery and provider webhook verification need their own staging/sandbox tests. When a backend test uses a fake repository, state that clearly in its report. Extend tests for each new route and every negative path that might reveal sensitive information or create duplicate financial operations.
Extending coverage
When adding a new endpoint, start with an authorized success and denied/invalid request, then add expiry, replay, race and service-failure cases. When changing documentation update logic, ensure the test suite verifies stable page IDs, normal revision calls and resistance to a manually edited page or occupied slug.
Source files in this module
- tests/backend/docs-publisher-test.php
- tests/backend/foundation-test.php
- tests/backend/milestones-5-6-integration-doubles.php
- tests/backend/milestones-5-7-test.php
- tests/backend/milestones-7-10-test.php
Maintenance and evidence
Check all affected file references and the matching human-readable user/architecture page when source changes. Run the module’s contract or governance checks; staging, payment and native hardware tests remain independent of source inventory coverage.