2 comments

[ 2.0 ms ] story [ 23.4 ms ] thread
Write tests in Laravel using PHPUnit and the Given-When-Then pattern. I also explain how to use the “Red-Green-Refactor” approach with TDD.
You could streamline the test a bit by using `assertSeeInOrder()`:

  $posts = ...
  $titles = $posts->pluck('title');
  $this->get('/posts')
     ...
     ->assertSeeInOrder($titles);