test: promote the PHPUnit harness to main + CI (unit + integration)#60
Merged
Conversation
The harness had been stranded on a local test-harness branch while 9 unit-test files
accumulated dormant on main (nothing to run them, no CI). This unions the two disjoint
sets onto main and makes them first-class:
- Harness: phpunit.xml, tests/bootstrap.php (PSR-0 Tiger_*/Zend_* autoload, no web boot),
Tiger\Tests\Support\{Unit,Integration}TestCase (registry isolation; migrate-once +
env-gated self-skipping fixture DB), composer test/test:unit/test:integration scripts,
require-dev phpunit.
- CI: .github/workflows/tests.yml — unit matrix (PHP 8.1-8.5) + one integration job on a
MariaDB service. Runs on push to main + every PR (complements version-check/smoke/release-zip).
- Brings the 8 crypto/auth/gateway tests off test-harness (Acl, Ajax/ServiceFactory, AuthTotp,
Crypto, Security, Uuid + 2 integration: OrgUser, schema/model). With main's existing 9
(crypto-signature/license/module/agent) that's 17 files: 128 unit + 8 integration, all green.
- tests/COVERAGE-PLAN.md: the coverage manifest (refreshed) — the running backfill tracker.
Foundation for the test backfill toward the 1.0 @api-freeze gate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ll (119 tests) Three parallel no-DB unit clusters against the priority spine (COVERAGE-PLAN.md §5/§8): - Media (38): Tiger_Media_Storage_Filesystem path-traversal guard (../, ../../, backslash, leading-slash — proven no byte escapes the root) + public/private root split (private url()=''); the disk factory (memoized, default_disk fallback, unknown-adapter throw); Tiger_Media_Image never-upscale + contain math + MIME->GD map; Tiger_Media_Storage_S3 _fullKey traversal guard. - CMS/routing/i18n (49): Tiger_Routing_Overrides reserved-prefix guard (api/auth/admin unclaimable at any priority) + priority-DESC sort + config-tier override; Tiger_Cms_Renderer trust-tier dispatch (html verbatim / phtml executes / md->Parsedown) + shortcode registry; Tiger_I18n_Country bias-sort + iso lookup fallback; Tiger_Location_Place ctor whitelist. - Module install (32): Tiger_Module_Installer zip-slip/tar-slip guard (real malicious ZIP + ustar tar with ../, ../../../, absolute members — nothing escapes) + _validSlug + _readManifest + migrationPaths; Tiger_Module_Discovery capability detection + app-wins-collision + compat/requires passthrough; Tiger_Vendor sha256 gate + semver satisfies. Full unit suite green: 247 tests / 10.6k assertions (exit 0). Two follow-ups surfaced + tracked (not changed here): Tiger_Cms_Renderer markdown lacks Parsedown safe mode (raw HTML passes — current behavior pinned by test); Tiger_Media_Image has 2 no-op imagedestroy() calls (8.5 deprecation). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… waves Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The keystone for the test backfill. The PHPUnit harness had been stranded on a local
test-harnessbranch (never pushed, 20 commits behind main) while 9 unit-test files accumulated dormant onmain— nothing to run them, no CI gate. That is how tests fell behind. This unions the two disjoint test sets onto main and makes tests first-class.What lands
phpunit.xml,tests/bootstrap.php(PSR-0Tiger_*/Zend_*autoload without a web boot),Tiger\Tests\Support\{Unit,Integration}TestCase(process-global registry isolation; the integration base migrates-once and self-skips whenTIGER_TEST_DB_NAMEis unset socomposer testis safe locally), thecomposer test/test:unit/test:integrationscripts, andrequire-dev: phpunit..github/workflows/tests.yml): unit matrix PHP 8.1–8.5 + one integration job on a MariaDB 10.11 service, on push-to-main + every PR. Complements the existing gates (version-check, smoke, release-zip).test-harness(Tiger_Acl_Acl,Tiger_Ajax_ServiceFactory,Tiger_Auth_Totp,Tiger_Crypto,Tiger_Security,Tiger_Uuid+ integrationOrgUser, schema/model). With main's existing 9 → 17 files.tests/COVERAGE-PLAN.md— the ~217-unit coverage manifest, refreshed with current status; the running backfill tracker.Green
tiger_test).Foundation for backfilling the priority spine (crypto/auth → gateway/ACL → tenant/model → install/RCE → media/storage → module services → satellite modules) toward the 1.0
@api-freeze gate.🤖 Generated with Claude Code