Forked from MattKetmo/FacebookSessionPersistence.php
Created
September 24, 2012 19:18
-
-
Save meonkeys/3777762 to your computer and use it in GitHub Desktop.
Quick (and dirty) fix for running tests using FosFacebookBundle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Foo\BarBundle\Facebook; | |
use FOS\FacebookBundle\Facebook\FacebookSessionPersistence as BaseFacebookSessionPersistence; | |
use Symfony\Component\HttpFoundation\Session\Session; | |
/** | |
* Quick (and dirty) fix for running tests using FosFacebookBundle. | |
* It may have unwanted consequences (not tested)! | |
* | |
* In your config_test.yml: | |
* fos_facebook: | |
* class: | |
* api: Foo\BarBundle\Facebook\FacebookSessionPersistence | |
* | |
* @see https://github.com/FriendsOfSymfony/FOSFacebookBundle/issues/79 | |
*/ | |
class FacebookSessionPersistence extends BaseFacebookSessionPersistence | |
{ | |
public function __construct($config, Session $session, $prefix = self::PREFIX) | |
{ | |
$this->session = $session; | |
$this->prefix = $prefix; | |
// don't start session or call parent constructor | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment