While writing some tests for my app using the emulator I couldn't get my detach() tests to work, and tracked it down to the remove() method in EmulatesModelQueries() being broken. Wasn't entirely sure what that broken line was intended to test, whether just the attribute name exists, or the attribute value exists in the named attribute, so went with testing the attribute exists. Lmk if it needs to test for the value existing.
Also added a test for it, as none of the tests exercised remove(). Lmk if you'd prefer that to be moved into a separate test.
Side notes ...
There doesn't seem to be a usable editor code style included in the project, so I had to manually twiddle settings in PHPStorm to un-break some of the formatting I broke in the first commit. Maybe include a pint.json?
The .phpunit.cache has gotten included in git, probably the cache folder name changed at some point. I added it to .gitignore, but of course that doesn't remove previously committed files.
While writing some tests for my app using the emulator I couldn't get my detach() tests to work, and tracked it down to the remove() method in EmulatesModelQueries() being broken. Wasn't entirely sure what that broken line was intended to test, whether just the attribute name exists, or the attribute value exists in the named attribute, so went with testing the attribute exists. Lmk if it needs to test for the value existing.
Also added a test for it, as none of the tests exercised remove(). Lmk if you'd prefer that to be moved into a separate test.
Side notes ...
There doesn't seem to be a usable editor code style included in the project, so I had to manually twiddle settings in PHPStorm to un-break some of the formatting I broke in the first commit. Maybe include a pint.json?
The .phpunit.cache has gotten included in git, probably the cache folder name changed at some point. I added it to .gitignore, but of course that doesn't remove previously committed files.
I added .idea to gitignore, for us PHPStorm folk.