Allah told Adam;
And do not approach ( هَٰذِهِ )Haadhi*hi al-shajarah – THIS tree. (al A’raf 7:19)
By Allah telling Adam not to approach ‘THIS’ tree, it implied thatTHIS Tree was near to where Adam lived.
If Allah said to Adam – Do not approach; ’tilka’ ( تلك ) meaning ‘That‘ [feminine form of dhalika ( ذلك ) [= That]]Tree (shajarah), it would imply the tree was FAR from where Adam lived in the Gardens of Eden.
This one word ‘This’ (haadhihi ) shows that Allah tested Adam by placing the forbidden tree close to where he lived in the Gardens. Just like when we have desires close to us and we are tested by them.