/**
  * @ expectedException \Bolt\Extension\Bolt\ClientLogin\Exception\InvalidAuthorisationRequestException
  * @ expectedExceptionMessage No provider access code.
  */
 public function testProcessNoAccessCode()
 {
     $this->markTestIncomplete('This test has not been implemented yet.');
     $app = $this->getApp(true, 'endpoint');
     $base = new Remote($app, $app['request_stack']);
     $base->process('/gum-tree/koala');
 }
 /**
  * @covers ::logout
  */
 public function testLogout()
 {
     $this->markTestIncomplete('This test has not been implemented yet.');
     $app = $this->getApp();
     $extension = new Extension($app);
     $app['extensions']->register($extension);
     $app['extensions']->initialize();
     $request = Request::create('/authenticate/login');
     $requestStack = new RequestStack();
     $requestStack->push($request);
     $app['request'] = $request;
     $app['request_stack'] = $requestStack;
     $base = new Remote($app, $app['request_stack']);
     $response = $base->logout('/gum-tree/koala');
     $this->assertSame('/gum-tree/koala', $response->getTargetUrl());
     $this->assertSame(302, $response->getStatusCode());
     $this->assertTrue($response->isRedirect('/gum-tree/koala'));
 }
 /**
  * @covers ::login
  */
 public function testLoginIsLoggedIn()
 {
     $this->markTestIncomplete('This test has not been implemented yet.');
     $app = $this->getApp();
     $extension = new Extension($app);
     $app['extensions']->register($extension);
     $app['extensions']->initialize();
     $provider = $app['clientlogin.config']->getProvider('Google');
     $provider['enabled'] = true;
     $app['clientlogin.config']->set('providers', array('Google' => $provider));
     $request = Request::create('/authenticate/login');
     $request->query->add(array('provider' => 'Google'));
     $requestStack = new RequestStack();
     $requestStack->push($request);
     $app['request'] = $request;
     $app['request_stack'] = $requestStack;
     $app['clientlogin.session'] = $this->getClientLoginSession($app, true);
     $this->setLoggedInSession($app);
     $base = new Remote($app, $app['request_stack']);
     $response = $base->login('/gum-tree/koala');
     $this->assertInstanceOf('\\Symfony\\Component\\HttpFoundation\\RedirectResponse', $response);
     $this->assertSame('/gum-tree/koala', $response->getTargetUrl());
     $this->assertSame(302, $response->getStatusCode());
     $this->assertTrue($response->isRedirect('/gum-tree/koala'));
 }