Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> why do your tests need to go over HTTP at all?

Just off the top of my head, how would you check file_get_contents which can take a url as a parameter?

You can't just throw http://www.google.com/ in there. You might be compiling on a machine that's not on the net, firewalled, etc.

It becomes useful for functionality that normally relies on an external http server to work.

The OP also mentions several more scenarios where it is useful and even necessary.



That's a slightly different scenario - you're exercising client protocol functionality. (Incidentally, you don't need a webserver for that, you just need a very stupid socket server that will return a file. Also, file_get_contents looks like it can access ftp/ssh/gopher URLs so if you need a webserver, you also need servers that speak those other protocols).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: