0

im using behat to test my symfony2 projects specifically a test project i have to be a sandbox for my bundles.

One of the bundles to test is my FacebookBundle that integrate facebook api into symfony2 projects. This bundle provide several twig extensions. In the authenticate url of the bundles project i use one of this twig extensions to render the facebook login url but when i test it with behat i get this error:

 An exception has been thrown during the rendering of a template ("Notice: Undefined index: HTTP_HOST in /var/www/vendor/facebook/php-sdk/src/base_facebook.php line 1187") in TestBundle:Default:auth.html.twig at line 13.

But i dont see any reason why this is happening, the project work just fine but testing with behat faild.

Any help, thanks

EDIT

Extrange im testing this project on travis and there all behat test pass, see travis: travis-ci.org/bitgandtter/bundles/jobs/37200512

EDIT2

It seams only happend with symfony2 driver for mink, i chage to goutte and work just fine, i review the code and symfony2 driver extend from mink-browse-kit driver, it will be nice to have some configuration options over it, i will keep digging to find the issue

Community
  • 1
  • 1
bitgandtter
  • 2,179
  • 6
  • 31
  • 60
  • The Facebook API is using `$_SERVER['HTTP_HOST']`, which doesn't exist on the CLI. I believe you can specify one in `server_parameters` for testing purposes. – ceejayoz Oct 06 '14 at 16:03
  • any reference to server_parameters configuration on symfony projects? or any other project – bitgandtter Oct 06 '14 at 17:56
  • https://github.com/alistairstead/BehatMage/blob/master/behat.yml.dist has an example that may help – ceejayoz Oct 06 '14 at 18:02

0 Answers0