The Bible NEVER says to test a prophet by prayer. The Bible tells a prophet will be test on the accuracy of their predictions. A prophet of God IS 100% accurate, 100% of the time! One wrong prediction equals a false prophet.
How do we know if a prophet is truly a prophet?
And if thou say in thine heart, How shall we know the word which the LORD hath not spoken?
How do we test if a prophet is truly a prophet?
When a prophet speaketh in the name of the LORD, if the thing follow not, nor come to pass, that [is] the thing which the LORD hath not spoken, [but] the prophet hath spoken it presumptuously: thou shalt not be afraid of him.
What do we do if the prophet fails the test of a prophet and the prophets prophecies did not come to pass or are false?
And that prophet, or that dreamer of dreams, shall be put to death; because he hath spoken to turn [you] away from the LORD your God, which brought you out of the land of Egypt, and redeemed you out of the house of bondage, to thrust thee out of the way which the LORD thy God commanded thee to walk in. So shalt thou put the evil away from the midst of thee.