President Donald Trump's executive order denying U.S. citizenship to the children of parents living in the country illegally has faced the first of what will be many legal tests.