Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing oAuth / facebook authentication with WebTestCase in Symfony2

I'm trying to get a FacebookLoginTest running. Problem is: the Symfony2 client does not send real HTTP requests, so it does not work on URLs of other services (like facebook).

I know I could work with cUrl,... but I see so many obstacles there: session, javascript, redirects.

Any ideas how we could get this running? Anyone got a automatic oAuth test running?

like image 861
stoefln Avatar asked May 12 '11 10:05

stoefln


1 Answers

Your best bet might be Goutte https://github.com/fabpot/Goutte which is a wrapper around the Sf2 components you're using combined with an HTTP client. Good luck!

like image 102
Lusitanian Avatar answered Oct 07 '22 16:10

Lusitanian