You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I sometimes find myself with the need of asserting that a table in the database contains a given number of records matching a given query constraints.
This new assertion would function similarly to the existing assertDatabaseHas method but would include an additional parameter for the expected number of rows.
To illustrate, here are two practical use cases for this assertion:
I looked at the InteractsWithDatabase trait and I think this addition would be pretty straightforward. If this is something the community and the core team find valuable I am willing and available to implement it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I sometimes find myself with the need of asserting that a table in the database contains a given number of records matching a given query constraints.
This new assertion would function similarly to the existing
assertDatabaseHas
method but would include an additional parameter for the expected number of rows.To illustrate, here are two practical use cases for this assertion:
I looked at the
InteractsWithDatabase
trait and I think this addition would be pretty straightforward. If this is something the community and the core team find valuable I am willing and available to implement it.Beta Was this translation helpful? Give feedback.
All reactions