This Is My Faith - Al-fatlawi, Ali - الصفحة ٦٧ - More on Qualities of the Glorious Allah
Eternal, the Everlasting and the Old, and accordingly, His knowledge is as eternal, as everlasting and as old He is. This knowledge actually exists even before anything is created; He has knowledge to what when and where and how is going to be created taking into consideration every single possible detail.
This is eternal knowledge and it is not going to change; to show us His Omniscience, the Glorious Allah put it into thorough examination and testing to tell us that We know it all not only before testing you but even before you were existed, yet We test you to show what We already knew was going to take place.
Anwar: Very Good. So, His knowledge is comprehensive?
Hasan: His knowledge is so comprehensive that no one can ever surround it; He is Infinite and so is His knowledge. So, how is it possible to surround any of it? There are many Verses from the Noble Quran that prove this. I am going to give you some examples:
(And Allah knoweth all that is in the heavens and all that is in the earth, and Allah is Aware of all things)٤٩;١٦.