Skip to content

Commit 21abe56

Browse files
committed
query count
1 parent db8e0af commit 21abe56

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

database-testing.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,12 @@ Assert that a given model does not exist in the database:
202202
$user->delete();
203203

204204
$this->assertModelMissing($user);
205+
206+
<a name="expects-database-query-count"></a>
207+
#### expectsDatabaseQueryCount
208+
209+
The `expectsDatabaseQueryCount` method may be invoked at the beginning of your test to specify the total number of database queries that you expect to be run during the test. If the actual number of executed queries does not exactly match this expectation, the test will fail:
210+
211+
$this->expectsDatabaseQueryCount(5);
212+
213+
// Test...

0 commit comments

Comments
 (0)