Categories
Laravel Samuel Test Driven Laravel Series

List Of Hard Stops In Test Driven Laravel Series

We have recently started a new continuing education series called Test Driven Laravel. Only a few episodes in and this has already proved to be an excellent and well made series of tutorials. If you would like to check this series out head over to https://adamwathan.me/test-driven-laravel/

First Hard Stop:

Setting up blank laravel install using the Laravel Composer Tool. Written about here

Second Hard Stop:

on the “getting green” episode once we have created a provider, a controller and a view we get to the point where we need to add $concert = Concert::find($id);

For my local install this causes an issue when we run the test ./vendor/bin/phpunit.

I get the error Fatal error: Class 'App\Http\Controllers\Concert' not found

Fix for this Written about here

Third Hard Stop
On the unit testing presentation logic episode anytime the test snippet is run we keep getting the same error even after we have created a new file in test/unit/ConcertTest.php and followed along with all of Adams steps we keep getting the same error when running the test command:

./vendor/bin/phpunit

We get the error:

Failed asserting that the page contains the HTML [December 6, 2016]. Please check the content above.

Fix for this written about here

Fourth Hard Stop

When we get past the previous ** error we run into an issue on the very last test of this episode. When Adam runs the last test he gets all greens and the lesson is over, when we run the test we get:

ConcertTest::can_get_formatted_date
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table: concerts

This was an issue in the very beginning of the lesson where we forgot to add in use DatabaseMigrations;. You will want to add this code to the ConcertTest.php inside of the ConcertTest class.

Fifth Hard Stop

Setting up phpstorm to run unit tests instead of running them in the command line, this allows us to run individual tests instead of all the tests at once