-
Notifications
You must be signed in to change notification settings - Fork 34
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
FIX Remove implicitly added item #423
FIX Remove implicitly added item #423
Conversation
d0c0890
to
528ebe5
Compare
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.
That's an elegant solution. I'm just thinking we should add a few extra scenarios in the test coverage.
2ae54c9
to
c2a4961
Compare
c2a4961
to
fa265ef
Compare
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.
Consider adding an optional $message
parameter to the assertChangeSetLooksLike
helper method. That could help make the test more readable.
You could provide assumption like:
- Removing an explicitly defined ChangeSetItem removes all its implicit ChangeSetItems.
- Removing an explicitly defined ChangeSetItem does not remove its implicit ChangeSetItem if that item is also referenced by another a third one.
- Removing an explicitly defined ChangeSetItem does not remove its implicit ChangeSetItem if that item is also explicitly added to the changeset
This is more in the nice to have category.
tests/php/ChangeSetTest.php
Outdated
$changeset->addObject($mid1); | ||
$changeset->addObject($mid2); | ||
$changeset->addObject($mid3); | ||
$changeset->addObject($end1); // Item end1 explisitly added to ChangeSet |
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.
$changeset->addObject($end1); // Item end1 explisitly added to ChangeSet | |
$changeset->addObject($end1); // Item end1 explicitly added to ChangeSet |
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.
Updated
fa265ef
to
53c86be
Compare
53c86be
to
d614204
Compare
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.
LGTM
Description
We should remove implicitly added item together with parent item even if ChangeSet was already published.
Parent issue