The government breezed through a confidence vote that took place after midnight on Friday as it gained the support of its own MPs but no other members of Parliament.