Skip to content

Add ArrayExpressionTest#20766

Open
WarLikeLaux wants to merge 4 commits intoyiisoft:masterfrom
WarLikeLaux:add-ArrayExpressionTest
Open

Add ArrayExpressionTest#20766
WarLikeLaux wants to merge 4 commits intoyiisoft:masterfrom
WarLikeLaux:add-ArrayExpressionTest

Conversation

@WarLikeLaux
Copy link
Contributor

@WarLikeLaux WarLikeLaux commented Mar 3, 2026

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues

What does this PR do?

Adds ArrayExpressionTest - unit tests for yii\db\ArrayExpression.

Before

Tests: 0
Methods: 0% (0/10), Lines: 0% (0/19)
MSI: 0%

After

Tests: 28, Assertions: 47
Methods: 100% (10/10), Lines: 100% (19/19)
MSI: 100% (18/18 mutants killed)

Tests

ArrayExpressionTest (28 tests, 47 assertions):

  • Constructor: default values, type/dimension params, nested ArrayExpression unwrap, QueryInterface passthrough
  • ArrayAccess/Countable/IteratorAggregate interface contract
  • getIterator() exception on QueryInterface, null value handling

Escaped mutants (all equivalent)

None. All 18 mutants killed.

Changelog not required, because no source files changed.

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.62%. Comparing base (068c5a4) to head (ce71233).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20766   +/-   ##
=========================================
  Coverage     78.62%   78.62%           
  Complexity    11566    11566           
=========================================
  Files           376      376           
  Lines         30748    30748           
=========================================
  Hits          24176    24176           
  Misses         6572     6572           

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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