In app level unit tests that involve models that are using Eloquence, if the test isn't updated to use a stub like the unit tests of this package, then the tests will fail if there are enough unit tests that affect the model.
For example just running unit tests that would touch something eloquence wise (in my case Mappable and Mutable), outside of running individual tests which pass, will fail.
Here is output of a test which ends up trigger this error when run in my test suite but not in an individual test. And no that's not a copy paste error, that is directly from the run, and note that this is the second test to fail, but is 65th out of 90 in my test suite
phpunit --filter testPriceChangesAreStored
PHPUnit 8.0.4 by Sebastian Bergmann and contributors.
. 1 / 1 (100%)
Time: 340 ms, Memory: 26.00 MB
OK (1 test, 12 assertions)
Other tests I was able to swap the usage to a EloquentStub like your unit tests, but that's just not always applicable to fix things.
The Observer test here is testing that changes in a new system make their way into a legacy system, where the models receiving the new system changes are utilizing Eloquence, Mutable, and Mappable as the field names are....less than ideal, and the legacy system has Y/N booleans that Mutable handles. It is worth noting that any amount of testing seems to trigger this issue once you are testing the same App level model over even a few tests in the same run.
In app level unit tests that involve models that are using Eloquence, if the test isn't updated to use a stub like the unit tests of this package, then the tests will fail if there are enough unit tests that affect the model.
For example just running unit tests that would touch something eloquence wise (in my case Mappable and Mutable), outside of running individual tests which pass, will fail.
Here is output of a test which ends up trigger this error when run in my test suite but not in an individual test. And no that's not a copy paste error, that is directly from the run, and note that this is the second test to fail, but is 65th out of 90 in my test suite
Individual Run:
Other tests I was able to swap the usage to a EloquentStub like your unit tests, but that's just not always applicable to fix things.
The Observer test here is testing that changes in a new system make their way into a legacy system, where the models receiving the new system changes are utilizing Eloquence, Mutable, and Mappable as the field names are....less than ideal, and the legacy system has Y/N booleans that Mutable handles. It is worth noting that any amount of testing seems to trigger this issue once you are testing the same App level model over even a few tests in the same run.