McLaren emerged as the fastest team in Formula One pre-season testing in Bahrain, with Ferrari as their closest competitor.