2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
$this->drupalPost('user/'.$this->web_user->uid.'/openid',$edit,t('Add an OpenID'));
if($claimed_id===FALSE){
$this->assertRaw(t('Sorry, that is not a valid OpenID. Ensure you have spelled your ID correctly.'),t('Invalid identity was rejected.'));
return;
}
// OpenID 1 used a HTTP redirect, OpenID 2 uses a HTML form that is submitted automatically using JavaScript.
if($version==2){
// Manually submit form because SimpleTest is not able to execute JavaScript.
$this->assertRaw('<script type="text/javascript">document.getElementById("openid-redirect-form").submit();</script>',t('JavaScript form submission found.'));
// Check we are on the OpenID redirect form.
$this->assertTitle(t('OpenID redirect'),t('OpenID redirect page was displayed.'));
// Submit form to the OpenID Provider Endpoint.
$this->drupalPost(NULL,array(),t('Send'));
}
if(!$claimed_id){
if(!isset($claimed_id)){
$claimed_id=$identity;
}
$this->assertRaw(t('Successfully added %identity',array('%identity'=>$claimed_id)),t('Identity %identity was added.',array('%identity'=>$identity)));