-
-
Notifications
You must be signed in to change notification settings - Fork 0
test: Add verification for accessibility of protected method beforeInsertRootNode
in subclasses of NestedSetsBehavior
.
#33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nsertRootNode` in subclasses of `NestedSetsBehavior`.
WalkthroughA new test method was added to the Changes
Sequence Diagram(s)sequenceDiagram
participant Test as NestedSetsBehaviorTest
participant Model as ExtendableMultipleTree
participant Behavior as ExtendableNestedSetsBehavior
Test->>Model: Create instance with tree attribute
Test->>Behavior: Retrieve nested sets behavior
Test->>Behavior: Call exposedBeforeInsertRootNode(Model)
Behavior->>Behavior: Call protected beforeInsertRootNode(Model)
Behavior-->>Test: Return (method called)
Test->>Model: Assert lft, rgt, depth attributes
Possibly related PRs
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 phpcs (3.7.2)tests/NestedSetsBehaviorTest.php📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings
⏰ Context from checks skipped due to timeout of 90000ms (14)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 90 90
===========================================
Files 2 2
Lines 469 469
===========================================
Hits 469 469 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new test to verify that the protected method beforeInsertRootNode remains accessible to subclasses of NestedSetsBehavior. Key changes include:
- Adding a new test method to ensure the protected method is exposed via an accessor.
- Verifying the method's effect on node attributes (lft, rgt, depth).
Comments suppressed due to low confidence (1)
tests/NestedSetsBehaviorTest.php:2130
- [nitpick] Consider adding a short docblock comment for the test method to outline its purpose and explain the logic behind exposing and testing the protected method. This would improve clarity for anyone reviewing the test in the future.
public function testProtectedBeforeInsertRootNodeRemainsAccessibleToSubclasses(): void
Summary by CodeRabbit