Deuteronomy 8:2

2 Remember how the LORD your God led you all the way in the wilderness these forty years, to humble and test you in order to know what was in your heart, whether or not you would keep his commands.

Read Deuteronomy 8:2 Using Other Translations

And thou shalt remember all the way which the LORD thy God led thee these forty years in the wilderness, to humble thee, and to prove thee, to know what was in thine heart, whether thou wouldest keep his commandments, or no.
And you shall remember the whole way that the LORD your God has led you these forty years in the wilderness, that he might humble you, testing you to know what was in your heart, whether you would keep his commandments or not.
Remember how the LORD your God led you through the wilderness for these forty years, humbling you and testing you to prove your character, and to find out whether or not you would obey his commands.