Ejemplo n.º 1
0
 public function testHasIdentity()
 {
     $authService = $this->prophesize(AuthenticationService::class);
     $adapter = $this->prophesize(AdapterInterface::class);
     $authenticator = new Authenticator($authService->reveal(), $adapter->reveal());
     $authService->hasIdentity()->willReturn(true);
     $result = $authenticator->hasIdentity();
     $this->assertTrue($result);
 }
Ejemplo n.º 2
0
 /**
  * @param AdapterInterface $adapter
  * @return Result
  */
 public function connect(AdapterInterface $adapter)
 {
     return $this->authService->authenticate($adapter);
 }