public function testAuthFailsForbidden()
{
$GLOBALS['cfg']['Server']['SignonSession'] = 'newSession';
$_COOKIE['newSession'] = '42';
$this->object = $this->getMockBuilder('PMA\\libraries\\plugins\\auth\\AuthenticationSignon')->disableOriginalConstructor()->setMethods(array('auth'))->getMock();
$this->object->expects($this->exactly(1))->method('auth');
$GLOBALS['login_without_password_is_forbidden'] = true;
$this->object->authFails();
$this->assertEquals('Login without a password is forbidden by configuration ' . '(see AllowNoPassword)', $_SESSION['PMA_single_signon_error_message']);
}