Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Console] FixTreeHelper::addChild
when providing a string#61080
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:7.3
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ping@smnandre |
Oops... I missed that, indeed 😶 PR seems very legit 👍 That said, I think it'd be better to add a new test inTreeNodeTest, since this isn’t really the Helper’s responsibility here.. (and I realize there’s currently no test that simply does $node->addChild('string') in TreeNodeTest ... re 😶 ) |
I've added the test in TreeNodeTest and also checked that the content is used correctly. I've kept the test in the helper since it's the visible issue, but I can remove it if it's too redundant. |
TreeHelper::addChild
when providing a string
Uh oh!
There was an error while loading.Please reload this page.
When using the tree helper, the method addChild allow to pass a string instead of an instance of TreeNode, for example :
This method was creating the TreeNode from the string and using the parent as the children iterator, leading to an error like
LogicException: Cycle detected at node: "Child 1"
This commit remove this second parameter.