Deuteronomy 8:2

8:2 You shall remember all the way which Yahweh your God has led you these forty years in the wilderness, that he might humble you, to prove you, to know what was in your heart, whether you would keep his commandments, or not.
-World English Bible

Other Translation

8:2 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.
-King James Version