FriendsOfSymfony/FOSFacebookBundle — Issue #110: Document how to run a functional test of the bundle.
Author: adurieux
Created: 2012-01-31 15:43:37+00:00
State: open

The documentation is missing a simple example simulating an entire authentication cycle through the FOSFacebookBundle.

Something like :

```
$crawler = $client->request( 'GET',$this->router()->generate('_security_login'));
$form = $crawler->selectButton('Submit')->form(array(
'_username' => self::AUTH_USERNAME,
'_password' => self::AUTH_PASSWORD
));
$this->assertTrue($crawler->filter('html:contains("Password")')->count() == 1);
$client->submit($form);
$this->assertEquals(302,$client->getResponse()->getStatusCode());
$client->followRedirect();
$this->assertEquals(200,$client->getResponse()->getStatusCode());
$this->assertTrue(mb_strpos($this->clientAnon()->getResponse(),"Password") === false);
```

I would be glad to help, but I am not really sure on the way the authentication is performed.