Esempio 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);
 }
Esempio n. 2
0
 /**
  * @param AdapterInterface $adapter
  * @return Result
  */
 public function connect(AdapterInterface $adapter)
 {
     return $this->authService->authenticate($adapter);
 }