예제 #1
0
 /** @test */
 public function it_can_add_connections()
 {
     $connections = ['foo' => ['bar' => 'baz'], 'baz' => ['foo' => 'bar']];
     $this->manager->addConnections($connections);
     $this->assertCount(2, $this->manager->getConnections());
     $this->assertEquals(['bar' => 'baz'], $this->manager->getConnection('foo'));
 }
예제 #2
0
 /**
  * Registers Sentinel Social.
  *
  * @return void
  */
 protected function registerSentinelSocial()
 {
     $this->app['sentinel.addons.social'] = $this->app->share(function ($app) {
         $manager = new Manager($app['sentinel'], $app['sentinel.addons.social.repository'], $app['sentinel.addons.social.request'], $app['sentinel.addons.social.session'], $app['events']);
         $connections = $app['config']->get('cartalyst.sentinel-addons.social.connections');
         $manager->addConnections($connections);
         return $manager;
     });
     $this->app->alias('sentinel.addons.social', 'Cartalyst\\Sentinel\\Addons\\Social\\Manager');
 }