Boris Johnson, the favorite to replace Theresa May as British prime minister, must appear in court over allegations he lied to the public about Brexit, a judge ruled on Wednesday.