AssertDatabaseCount for condition set #46472
Unanswered
andumy
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
There is currently no method to assert in a database test how many entries are for a specific set of key/values condition.
Ideally, there should be a method that combines
assertDatabaseCount
withassertDatabaseHas
Solution
Illuminate\Testing\Constraints\HasCountInDatabase
Illuminate\Foundation\Testing\Concerns\InteractsWithDatabase
Beta Was this translation helpful? Give feedback.
All reactions