The law, enacted this year, made it a crime for unauthorized migrants to enter the state. Challengers say immigration is a federal matter.