Fix failing tests

refs: https://github.com/cakephp/cakephp/commit/db1876d837f4e70b5833cbe7d0841173860756a5