TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
Testing: How to actually write tests?
1 points
by
jeykeu
over 2 years ago
2 comments
zach_garwood
over 2 years ago
You could streamline the test a bit by using `assertSeeInOrder()`:<p><pre><code> $posts = ... $titles = $posts->pluck('title'); $this->get('/posts') ... ->assertSeeInOrder($titles);</code></pre>
jeykeu
over 2 years ago
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.