Skip to content

test: raise line coverage - #22

Merged
roxblnfk merged 3 commits into
1.xfrom
test/coverage
Nov 20, 2026
Merged

roxblnfk merged 3 commits into
1.xfrom
test/coverage

Conversation

@roxblnfk

Copy link
Copy Markdown
Member

What was changed

  • Tests only: the mock layer (FakePDO, TestPDO, TestPDOStatement, the wrap drivers, StubDriver::create()), the Purger fallback for other drivers, makeCompositeFK(), fetchSchema(), invalid column definitions, SchemaSource::empty()/fromFile(), and OrmTestCase::extractEntity()/assertEntitySynced().
  • Local line coverage on Unit + SQLite: 89.2% → 98.2%.

Why?

Line coverage comes first, then mutation work resumes on top of it.

Checklist

  • Closes: no issue
  • Tested
    • composer test:unit and composer test:sqlite pass locally; the server suites run in CI only
    • Unit tests added
  • Documentation: not needed

Review notes

  • Bug, src left alone: TestPDOStatement::bindParam() and bindColumn() forward ...\func_get_args(), which copies the variable, so the reference is lost. A value changed after bindParam() never reaches the query, and a variable bound with bindColumn() is never filled. Only SQL Server's LOB binding calls bindParam(), and it executes straight away, so nothing in the harness hits this today. The tests check only the return values of these two methods.
  • Covered only by the server suites: Purger lines 61-64 (MySQL) and 99-111 (SQL Server). Feature/Common/PurgerTest reaches them on those drivers.
  • Unreachable from these suites: ContextInjectingInstance::hasInstance(). In Testo, only the bench handler calls it.

@roxblnfk
roxblnfk requested a review from a team November 20, 2026 19:50
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.64%. Comparing base (91610eb) to head (edebdc9).

Additional details and impacted files
@@            Coverage Diff             @@
##              1.x      #22      +/-   ##
==========================================
+ Coverage   89.70%   98.64%   +8.93%     
==========================================
  Files          43       43              
  Lines        1030     1030              
==========================================
+ Hits          924     1016      +92     
+ Misses        106       14      -92     
Flag Coverage Δ
mysql 59.23% <ø> (+2.55%) ⬆️
postgres 58.74% <ø> (+2.55%) ⬆️
sqlite 57.85% <ø> (+2.55%) ⬆️
sqlserver 59.92% <ø> (+2.65%) ⬆️
unit 98.24% <ø> (+8.99%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

No test ran a statement through the wrap drivers or read FakePDO beyond a select, so the mock layer was the least covered part of the harness.

Assisted-By: Claude Opus 5.5
@roxblnfk
roxblnfk merged commit fc7c08c into 1.x Nov 20, 2026
22 checks passed
@roxblnfk
roxblnfk deleted the test/coverage branch November 20, 2026 19:56
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