single-table-inheritance
single-table-inheritance copied to clipboard
Create a test case for mutated attributes
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
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.