Test taking

Is there a certain time that's better to take a test? I hear weighing yourself in the morning will get you the best results.. Is that the same for a pregnancy test?