Will an iPhone connect to wifi for testing purposes?

I am buying a cheap used iPhone for testing purposes while learning to create iOS apps. I do not want to activate it or pay $70/month just to be able to use it for testing while working on my app projects at home.
(broke ass student already using a cheap flip phone)

Do I need to activate it, or can it get internet access via my 802.11 wifi linksys wireless G ? trying to do this cheaply and creatively.

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.