The future of the pint of beer has been secured, according to the UK government, following a vote in the European Parliament.