'CakePhp4 - How to assert a count of executed queries in a Phpunit TestCase?

In a TestCase I would like to Assert a count of executed queries. Should I use DebugKit or ConnectionManager ? I found some answer for older CakePhp but none for CakePhp 4.x.

Have you got some receipt ?

Thanks & cheers



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source