Repository navigation
test: migrate the tests to Testo on cycle/testing - #52
Merged
Merged
Conversation
Assisted-By: Claude Opus 5.5 <[email protected]>
cycle/testing runs each Feature/Common class against every driver, so the generator of per-driver subclasses has nothing left to produce. Assisted-By: Claude Opus 5.5 <[email protected]>
A mechanical pass kept apart from the harness move, so the hand-made changes review on their own. Assisted-By: Claude Opus 5.5 <[email protected]>
DatabaseTestCase and OrmTestCase of cycle/testing replace the copied BaseTest, TableTrait, Loggable, TableRenderer and TestLogger; ListenerTestCase, SchemaTestCase and IntegrationTestCase stay in tests/Support as helpers specific to this package. Assisted-By: Claude Opus 5.5 <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
PHPUnit and the Rector bridge are no longer used once every test runs on Testo. Assisted-By: Claude Opus 5.5 <[email protected]>
The package compose file waits for the database itself, and DB_REQUIRED=1 makes an unreachable database fail the job instead of skipping its tests. Assisted-By: Claude Opus 5.5 <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The PHPUnit coverage job ran all drivers, so a SQLite-only run drops the lines only the server drivers reach. Assisted-By: Claude Opus 5.5 <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
The orm-behaviors template of cycle/testing replaces the local CaseTemplate and its copy script. Assisted-By: Claude Opus 5.5 <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
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.
What was changed
^0.1.1, from its VCS repository until it reaches Packagist) instead of PHPUnit.testo.phpdeclares aUnitsuite andFeature/<Driver>andRegression/<Driver>suites for SQLite, MySQL, Postgres and SQLServer.tests/Behavior/Functional/Driver/Commonmoved totests/Feature/Common, which cycle/testing runs against every driver; unit tests live intests/Unit.DatabaseTestCase/OrmTestCaseand theSimpleContainerof cycle/testing replace the copied base classes and utilities;ListenerTestCase,SchemaTestCaseandIntegrationTestCasestay intests/Support.test,test:unit,test:<driver>, plusdb:up/db:downfor the databases from the cycle/testing compose file.composer test:new-case -- <N>writes a runnable regression case intotests/Regression/Issue<N>from theorm-behaviorstemplate of cycle/testing..github/workflows/testing.ymlcalls the sharedcycle/gh-actionsTesto workflow with coverage on. Unit and SQLite run on PHP 8.2–8.6 with highest dependencies and on 8.2 with lowest; MySQL, Postgres and SQLServer run on PHP 8.2 and 8.6 (highest, plus lowest on 8.2); every job runs withDB_REQUIRED=1, so an unreachable database fails the job instead of skipping; coverage goes to Codecov with one flag per suite. It replacesmain.yml(Unit + SQLite, coverage on every driver) andci-mysql.yml,ci-pgsql.yml,ci-mssql.yml.driver-sqlite)CaseTemplatesample case, which is gone together withtests/generate-case.php; the generated case runs the same 3 tests. JUnit results of the SQLite and Unit runs match the PHPUnit ones test by test.phpunit.xml,tests/bootstrap.php,tests/docker-compose.yml, the stub generatortests/generate.phpand the per-driver stubs it produced,BaseTest,BaseListenerTest,TableTrait,Loggable,TableRenderer,TestLoggerand the localSimpleContainer.Why?
One harness for all Cycle packages: databases, the driver matrix and isolation come from cycle/testing instead of per-repo copies.
Checklist