Collisional effects on spectral line shape from the Doppler to the collisional regime: A rigorous test of a unified model