SocialiteManagerTest.php 894 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Laravel\Socialite\Tests;
  3. use Laravel\Socialite\Contracts\Factory;
  4. use Laravel\Socialite\SocialiteServiceProvider;
  5. use Laravel\Socialite\Two\GithubProvider;
  6. use Orchestra\Testbench\TestCase;
  7. class SocialiteManagerTest extends TestCase
  8. {
  9. protected function getEnvironmentSetUp($app)
  10. {
  11. $app['config']->set('services.github', [
  12. 'client_id' => 'github-client-id',
  13. 'client_secret' => 'github-client-secret',
  14. 'redirect' => 'http://your-callback-url',
  15. ]);
  16. }
  17. protected function getPackageProviders($app)
  18. {
  19. return [SocialiteServiceProvider::class];
  20. }
  21. public function test_it_can_instantiate_the_github_driver()
  22. {
  23. $factory = $this->app->make(Factory::class);
  24. $provider = $factory->driver('github');
  25. $this->assertInstanceOf(GithubProvider::class, $provider);
  26. }
  27. }