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