Improve assertion

Refs https://github.com/dereuromark/CakePHP-DatabaseLog/pull/6/files#r21189560