Assertion: assertSelectorCount()
stevegrunwell opened this issue · comments
Assert the number of elements that match the given selector.
Example:
public function testPostList()
{
factory(Post::class, 10)->create();
$response = $this->get('/posts');
$this->assertSelectorCount(10, 'li.post-item', $response->getBody());
}