Posts tagged with testing
Just want to note down my experiences when doing unit testing with Laravel.
Use Mockery to mock all the dependencies if possible to save time when executing the tests.
Database Testing with Sqlite (in memory)
If the tests involve a very complex SQL query/database, then should first try to do the testing using SQLite in memory. This will speed up execution time a lot as the database will be destroyed and re-created every time a single method runs. A database running in memory will speed up the process.
However, there are some...