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
$exists=(bool)$this->connection->queryRange('SELECT 1 FROM {users_field_data} WHERE uid = :uid AND default_langcode = 1',0,1,array(':name'=>$form_state->getValue('owner_uid')))->fetchField();
$exists=(bool)$this->connection->queryRange('SELECT 1 FROM {users_field_data} WHERE uid = :uid AND default_langcode = 1',0,1,array(':uid'=>$form_state->getValue('owner_uid')))->fetchField();
if(!$exists){
$form_state->setErrorByName('owner_uid',t('Enter a valid username.'));
$this->assertText(t('The action has been successfully saved.'),'The node_assign_owner_action action has been successfully updated.');
$this->assertNoText($action_label,'The old label for the node_assign_owner_action action does not appear on the actions administration page after updating.');
$this->assertText($new_action_label,'The new label for the node_assign_owner_action action appears on the actions administration page after updating.');
// Make sure that the action was actually deleted.
$this->assertRaw(t('The action %action has been deleted.',['%action'=>$new_action_label]),'The delete confirmation message appears after deleting the node_assign_owner_action action.');
$this->drupalGet('admin/config/system/actions');
$this->assertResponse(200);
$this->assertNoText($new_action_label,'The label for the node_assign_owner_action action does not appear on the actions administration page after deleting.');
$action=Action::load($aid);
$this->assertFalse($action,'The node_assign_owner_action action is not available after being deleted.');