In this episode, we kick things off by setting up a brand new Laravel project, making sure everything is ready for us to write and run tests throughout the course. We'll be working with a Laravel app called "Laravel Teams," and we go through creating it with the Laravel installer. Although we're using Laravel Breeze for a simple setup with Blade (and a bit of Alpine), you can use a different starter kit or roll your own if you prefer.
Next, we wire up authentication and pick PEST as our testing framework (though PHPunit is also an option if that's your preference). We then configure MySQL as our database, run migrations, and make sure the site loads up—just to confirm everything's working by registering an account.
After confirming the app is running, we check out the default tests that come with Breeze and PEST. To keep things tidy, we clean up the tests directory by deleting the profile and auth tests, leaving just the basic example tests (which we're planning to replace anyway).
A quick but important step: we tweak our phpunit.xml to make sure our tests use SQLite in-memory, so we don't accidentally mess up our "real" database while testing. Once that's sorted, we verify that PEST runs and all tests pass with a nice green checkmark. We even get rid of the remaining example tests so we're set up for a clean slate.
By the end of this episode, you should have a fresh Laravel project, a starter kit in place, PEST set up and working, and a clean environment ready for writing your own tests as we explore building out team functionality together.