-
Notifications
You must be signed in to change notification settings - Fork 207
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
Tests with sqlite in-memory #104
Tests with sqlite in-memory #104
Conversation
This diff renders database as used in automated test suite independent of configured production database connection - you can freely run tests without affecting your production database. I tested the above by turning off my local MySQL server - test suite did not complain and ran exactly as it had before I turned my local server off. I am aiming to enable more aggressive and comprehensive automated testing, at unit, integration and functional levels. For example, assuming Laravel's functionality is up to it, it now should be possible to write a functional test that creates a new user (possibly with some problems) and verify that the new user gets created cleanly or not at all..
@CyberiaResurrection You have changed the default DB to sqlite. Is it working for you with left and inner joins with tables ? |
I haven't changed the default for production - that remains at whatever has already been set (currently mysql), only for running tests. Give me a bit and I'll push up a test case. |
As promised, a test case illustrating how to do a basic join using Laravel's database abstraction layer. |
Sorry, that was a rather long-winded way of saying yes, they work. I was also trying to give you a way to independently check that joins work. |
Is there anything else you want me to provide? |
No direct bug fixes here, but laying the ground work to easily write (and use) more comprehensive and aggressive tests. As a nice side effect, migrations and seeds get a workout with each test run.
The immediate use case I had in mind when making these changes was tackling #95, since that looks like it might need a functional test to fully characterise underlying issue - I have no doubt blank first and/or last name is part of issue, but it might not be all of it.