phpunit-query-count-assertions icon indicating copy to clipboard operation
phpunit-query-count-assertions copied to clipboard

A custom assertion for PHPUnit that allows you to count the number of SQL queries used in a test.

Results 2 phpunit-query-count-assertions issues
Sort by recently updated
recently updated
newest added

I'm fixing an n+1 problem and want to test the results within my pipeline. With not much luck so far. I had a similar implementation with Laravels `DB` Facade and...

This PR allows to track queries from a different database, by passing the connection name to `AssertQueryCount::trackQueries()` or after the closure in the available assertions.