Jonathan Edwards said this quote
“ For when God is said by these things to try men and prove them, to see what is in their hearts and whether they will keep His commandments or no, we are not to understand, that it is for His own information, or that He may obtain evidence Himself of their sincerity (for he needs no trials for His information); but chiefly for their conviction, and to exhibit evidence to their consciences...So when God tempted or tried Abraham with that difficult command of offering up his son, it was not for His satisfaction, whether he feared God or no, but for Abraham's own greater satisfaction and comfort, and the more clear manifestation of the favour of God to him. ”