Manchester City were beaten by Brentford in the Premier League in the final fixture before the World Cup begins next week.