if your wife cannot take the test for some reason before the end of the two year spouse visa she can apply here to have her spouse visa extended for another two years, but they will want to know why the test was not taken, in our case the wife gave birth and was too busy being a mum,
But once the visa is extended you dont have to wait to the end of it to apply for the ILR, apply as soon as she passes the test