Skip to content

Add unit tests for RBAC#20785

Open
WarLikeLaux wants to merge 3 commits intoyiisoft:masterfrom
WarLikeLaux:add-rbac-tests
Open

Add unit tests for RBAC#20785
WarLikeLaux wants to merge 3 commits intoyiisoft:masterfrom
WarLikeLaux:add-rbac-tests

Conversation

@WarLikeLaux
Copy link
Contributor

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

What does this PR do?

Fixes trailing space in PhpManager::addChild() exception message, but mainly adds focused RBAC manager tests and closes uncovered branches in BaseManager, PhpManager, and DbManager. Moves 9 duplicate tests from PhpManagerTest/DbManagerTestCase into ManagerTestCase.

Coverage

File Tests Lines MSI
BaseManager.php 29 59/59 (100%) 98% (63/64)
PhpManager.php 35 → 57 260/298 (87%) → 298/298 (100%) 94% (215/230) → 99% (268/273)
DbManager.php 50 → 70 416/451 (92%) → 451/451 (100%) 67% (272/405) → 69% (309/443)

Changelog not required - the only source change is a trailing space fix in an exception message in PhpManager::addChild().

@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20785      +/-   ##
============================================
+ Coverage     78.62%   78.90%   +0.27%     
  Complexity    11566    11566              
============================================
  Files           376      376              
  Lines         30748    30748              
============================================
+ Hits          24176    24262      +86     
+ Misses         6572     6486      -86     

☔ 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