The law was challenged in response to raids in inner Johannesburg seemingly targeting illegal immigrants and the highest court has pronounced itself 10 days before an election in…