Repair code mock for view helper tests