Testing
Este conteúdo não está disponível em sua língua ainda.
Use PHP 8.3 or later and an npm-supported Node.js version (22.22.2+, 24.15.0+ on the 24 line, or 26+).
composer update --no-pluginsnpm ci --ignore-scriptsnpx playwright install --only-shell chromiumTIME_PICKER_DEBUG=1 composer --no-plugins testsTIME_PICKER_DEBUG=0 composer --no-plugins testsnpm testnpm run test:domPHPUnit covers framework integration and Bootstrap markup. The browser suite tests display, form values, events, keyboard controls and lifecycle against both asset flavors. The jsdom suite exercises the source used to build the distributed files. Local browser checks use Chromium by default. CI runs Chromium, Firefox and WebKit.
npx playwright install --with-deps --only-shell chromium firefox webkitTIME_PICKER_BROWSERS='chromium firefox webkit' npm testVerify installed consumers
Section titled “Verify installed consumers”This script creates a Composer archive, installs the package in an isolated application and exercises its published
assets, popup placement and editing, ActiveForm, PJAX replacement and HTTP POST. Use TIME_PICKER_BROWSERS to select
the engines for this script as well.
bash scripts/verify-consumer.sh 2.0.55TIME_PICKER_DEPENDENCIES=lowest bash scripts/verify-consumer.sh 2.0.55bash scripts/verify-consumer.sh 22.0.x-devVerify build and quality
Section titled “Verify build and quality”npm run buildnpm run check:assetscomposer --no-plugins staticcomposer --no-plugins ecs-checkcomposer --no-plugins check-dependenciesThe build regenerates the minified JavaScript and CSS and preserves the license banners. The check compares their bytes with the distributed files.
Coverage and mutation
Section titled “Coverage and mutation”Install PCOV for Infection.
composer --no-plugins mutationnpm run coveragenpm run mutationThe build workflow produces PHP coverage and reports it to Codecov. PHPStan, ECS, Composer Require Checker and Infection
are hard gates; Infection requires 100% MSI with uncovered code included. JavaScript line, function and branch coverage
and Stryker require 100%; the minified assets are checked by npm run check:assets and the browser suites.
Repository quality checks
Section titled “Repository quality checks”Make the CLI tools used by the shared quality workflow available on PATH: actionlint with its ShellCheck helper,
codespell, EditorConfig Checker, markdownlint-cli2, Prettier and yamllint. Run all checks:
composer --no-plugins qualityEach tool also has its own script:
composer --no-plugins actionlintcomposer --no-plugins codespellcomposer --no-plugins editorconfig-checkercomposer --no-plugins markdownlintcomposer --no-plugins prettiercomposer --no-plugins yamllintThe linter configuration lives in .github/linters, and the Prettier configuration in .prettierrc.json and
.prettierignore. CI uses the same files.
Workflow security checks
Section titled “Workflow security checks”Make zizmor and Gitleaks available on PATH. Audit the current workflow files with the same pedantic persona used by
the shared security workflow:
composer --no-plugins zizmorScan Git history for secrets with the repository’s Gitleaks configuration:
composer --no-plugins gitleaksRun both checks. Findings make the command fail; inspect them rather than disabling the checks.
composer --no-plugins securityZizmor needs GitHub API access for its online audits. If the tool runs offline, report that limit separately. To request an offline audit explicitly:
composer --no-plugins zizmor -- --offlineReport hosted CI execution and its PHP/OS matrix separately from these local commands. Keep generated reports in ignored
internal/.
Tool references
Section titled “Tool references”- Actionlint for GitHub Actions workflow linting.
- Codespell for spelling checks.
- Composer Require Checker for dependency definition checks.
- Easy Coding Standard (ECS) for coding standards.
- EditorConfig Checker for EditorConfig compliance.
- Gitleaks for secret scanning.
- Infection for mutation testing.
- Markdownlint-cli2 for Markdown linting.
- PHPStan for static analysis.
- PHPUnit for unit tests.
- Prettier for Markdown and YAML formatting checks.
- Yamllint for YAML linting.
- Zizmor for GitHub Actions security audits.