TE
科技回声
首页
24小时热榜
最新
最佳
问答
展示
工作
中文
GitHub
Twitter
首页
Testing: How to actually write tests?
1 点
作者
jeykeu
超过 2 年前
2 条评论
zach_garwood
超过 2 年前
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
超过 2 年前
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.