Closed stevenmaguire closed 9 years ago
Currently the Facebook\Facebook
super service falls back to environment variables if you don't provide the config explicitly. Normally you'd provide the config like this:
$fb = new Facebook\Facebook([
'app_id' => '{id}',
'app_secret' => '{secret}',
]);
But if you have FACEBOOK_APP_ID
and FACEBOOK_APP_SECRET
env vars set, the SDK will just use those and you can do this:
$fb = new Facebook\Facebook();
And it will still work. The tests ensure that at minimum we have an app_id
and app_secret
, but if you happen to have the FACEBOOK_APP_ID
and/or FACEBOOK_APP_SECRET
env variables set in your testing environment, the expected throws won't throw here and/or here. So we just need to unset those env vars before the tests run to ensure the tests will still throw.
Does that make sense? :)
PS: We should probably write tests to ensure the environment variable fallbacks work as well. lol.
From the laundry list in #1, can you describe this in a bit more detail?