Added gradient test for smooth_phi.