Assert how many errors the log of the request of the page holds, as the debug toolbar counts them.
Examples
Then the debug toolbar should show 0 logged errors
Then the debug toolbar should show 1 logged error
And the debug toolbar should show 0 logged errors
Then the debug toolbar should show 2 logged errors
Then the debug toolbar should show 0 logged errors
Pattern
Then(/^the debug toolbar should show (\d+) logged errors?$/, …)
Part of @webship-js/symfony-steps (github.com/webship/symfony-steps), a step pack for Webship-js 2.0.x.