While vote to topple his government has failed, it signals a new series of tests for the prime minister.