We return to an old problem with this verse. Could it be that the all knowing God really needs to test the people in order to see whether or not they would keep His commandments?
Indeed, Ibn Ezra’s comments here amount to something like “I already wrote about this earlier.”