Skip to content
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

Create a test case for mutated attributes #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sarahmarshy
Copy link

These changes show a failure test case for newFromBuilder when an object has mutated attributes.

This basically comes from using the setRawAttributesFunction here when filtering out attributes.

If you used a loop for setting attributes, I think this could be fixed.

Related to #70

@jonspalmer
Copy link
Owner

jonspalmer commented Sep 4, 2021

I'm not sure I understand the test case here. The first test you added show's everything working as you'd expect using classes. newFromBuilder is an internal API and isn't intended to be called directly like this so the fact this test case files isn't necessarily a surprise.

Note also that the second new test fails if you remove the SingleTableInheritanceTrait. That indicates this pattern is just broken in general in Eloquent vs this being a problem with this package.

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.

2 participants