Kevin Magnussen will drive on the opening two days of this week's pre-season test in Bahrain for McLaren.