16

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?

stoefln
  • 14,498
  • 18
  • 79
  • 138
  • 1
    You should have a look to Facebook test users. They have a unique loginURL designed for automated testing. But those will only feet client-side testing for the same reasons you pointed out. https://developers.facebook.com/docs/test_users/ – Alexcode Feb 28 '12 at 16:15
  • Facebook test users is a good idea. It's the user you'll log. But this is not how you can redirect to the login url. – Reuven May 11 '12 at 13:33

2 Answers2

1

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!

Jason Jarrett
  • 3,857
  • 1
  • 27
  • 28
Lusitanian
  • 11,012
  • 1
  • 41
  • 38
  • Goutte is not working for me. Seems like there is a lot of JS stuff going on in the facebook login form... – stoefln Jun 26 '12 at 14:32
0

curl should work just fine for this, and while it doesn't support javascript, you won't need js support for what you're trying to accomplish.

Wedge Martin
  • 777
  • 6
  • 15