paul-a-byford
5 months ago
148
2
Testing

SQLite :memory: testing results inconsistent with MySql?

Posted 5 months ago by paul-a-byford

Hey Everyone, I've got an app with API resources where I've been using MySql for php unit tests. I attempted to move across to use sqlite :memory: as the testing having read about the potential speed/performance benefits.

After making the change I found a few examples of strange test results, where the API resource has started returning certain attributes values as blank, rather than than the value it should return.

More specifically the cases I've found of this problem seem to relate to where I've used eloquent Accessors to return the value. The strange aspect is that I use accessors on multiple fields, some return fine and others do not.

Any advice appreciated!

Please sign in or create an account to participate in this conversation.