A helper for mock in PHPUnit