[PHP] Run Blueprint tests with the current SQLite release - #309
Merged
Conversation
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.
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-emptyDB_NAME, defaults to WAL journaling, and blocks older bundled SQLite versions unless the documented compatibility constant is set. The fixture therefore suppliesDB_NAMEin its minimal configuration files and declaresSQLITE_JOURNAL_MODE=DELETEplusWP_SQLITE_UNSAFE_ENABLE_UNSUPPORTED_VERSIONS=true. Tests which replacewp-config.phpretain those database settings.NewSiteResolverapplies 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, matchingRunSqlStep'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 inclass-newsiteresolver.php; no new violations)git diff --check