authCheck() public method

this function DOES NOT check authentication - it just checks/provides authentication credentials required to connect to the MySQL server usually with $GLOBALS['dbi']->connect() it returns false if something is missing - which usually leads to auth() which displays login form it returns true if all seems ok which usually leads to auth_set_user() it directly switches to authFails() if user inactivity timeout is reached
public authCheck ( ) : boolean
return boolean whether we get authentication settings or not
 /**
  * Test for PMA\libraries\plugins\auth\AuthenticationConfig::authCheck (mocking the object itself)
  *
  * @return void
  */
 public function testAuthCheckAuthFails()
 {
     $GLOBALS['server'] = 1;
     $_REQUEST['old_usr'] = '';
     $_REQUEST['pma_username'] = '';
     $_COOKIE['pmaServer-1'] = 'pmaServ1';
     $_COOKIE['pmaUser-1'] = 'pmaUser1';
     $_COOKIE['pma_iv-1'] = base64_encode('testiv09testiv09');
     $GLOBALS['cfg']['blowfish_secret'] = 'secret';
     $_SESSION['last_access_time'] = 1;
     $GLOBALS['cfg']['CaptchaLoginPrivateKey'] = '';
     $GLOBALS['cfg']['CaptchaLoginPublicKey'] = '';
     $GLOBALS['cfg']['LoginCookieValidity'] = 0;
     $_SESSION['last_access_time'] = -1;
     // mock for blowfish function
     $this->object = $this->getMockBuilder('PMA\\libraries\\plugins\\auth\\AuthenticationCookie')->disableOriginalConstructor()->setMethods(array('authFails'))->getMock();
     $this->object->expects($this->once())->method('authFails');
     $this->assertFalse($this->object->authCheck());
     $this->assertTrue($GLOBALS['no_activity']);
 }