Deuteronomy 8:2

2 Remember how the Lord your God led you on this long journey through the desert these past forty years, sending hardships to test you, so that he might know what you intended to do and whether you would obey his commands.

Deuteronomy 8:2 In-Context

1 "Obey faithfully all the laws that I have given you today, so that you may live, increase in number, and occupy the land that the Lord promised to your ancestors.
2 Remember how the Lord your God led you on this long journey through the desert these past forty years, sending hardships to test you, so that he might know what you intended to do and whether you would obey his commands.
3 He made you go hungry, and then he gave you manna to eat, food that you and your ancestors had never eaten before. He did this to teach you that you must not depend on bread alone to sustain you, but on everything that the Lord says.
4 During these forty years your clothes have not worn out, nor have your feet swollen up.
5 Remember that the Lord your God corrects and punishes you just as parents discipline their children.
Scripture taken from the Good News Translation - Second Edition, Copyright 1992 by American Bible Society. Used by Permission.