Nonparametric goodness-of-fit methods based on phi-divergences