Skip to content

[PHP] Run Blueprint tests with the current SQLite release - #309

Merged
adamziel merged 4 commits into
trunkfrom
codex/sqlite-plugin-3-tests
Aug 14, 2026
Merged

[PHP] Run Blueprint tests with the current SQLite release#309
adamziel merged 4 commits into
trunkfrom
codex/sqlite-plugin-3-tests

Conversation

@adamziel

@adamziel adamziel commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Blueprint step tests now install and run against the current SQLite Database Integration release instead of version 2.2.23.

The fixture uses RunnerConfiguration's unversioned plugin URL, which currently serves 3.0.0. SQLite 3.0 requires a non-empty DB_NAME, defaults to WAL journaling, and blocks older bundled SQLite versions unless the documented compatibility constant is set. The fixture therefore supplies DB_NAME in its minimal configuration files and declares SQLITE_JOURNAL_MODE=DELETE plus WP_SQLITE_UNSAFE_ENABLE_UNSUPPORTED_VERSIONS=true. Tests which replace wp-config.php retain those database settings.

NewSiteResolver applies Blueprint constants before core installation opens the database connection. The normal constants step still runs later and remains idempotent. The SQL error test also puts its successful setup query and failing query on separate lines, matching RunSqlStep's line-by-line execution.

Testing

vendor/bin/phpunit -c phpunit.xml components/Blueprints/Tests/Unit/Steps/DefineConstantsStepTest.php (10 tests, 15 assertions)

vendor/bin/phpunit -c phpunit.xml --filter '/(RunSQLStepTest|SetSiteOptionsStepTest)/' components/Blueprints/Tests/Unit/Steps (11 tests, 33 assertions)

vendor/bin/phpcs -d memory_limit=1G components/Blueprints/SiteResolver/class-newsiteresolver.php components/Blueprints/Tests/Unit/Steps/StepTestCase.php components/Blueprints/Tests/Unit/Steps/DefineConstantsStepTest.php components/Blueprints/Tests/Unit/Steps/RunSQLStepTest.php (one pre-existing unused-parameter warning in class-newsiteresolver.php; no new violations)

git diff --check

@adamziel adamziel changed the title [PHP] Run Blueprint tests with SQLite integration 3.0 [PHP] Run Blueprint tests with the current SQLite release Aug 14, 2026
@adamziel
adamziel merged commit 8b93dd8 into trunk Aug 14, 2026
29 checks passed
@adamziel
adamziel deleted the codex/sqlite-plugin-3-tests branch August 14, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant