protected function ContentEntityAutosaveFormTestBase::alterTitleField in Autosave Form 8
Alters the title field of the entity.
Parameters
string $changed_title: The title to use to set on the title form field.
2 calls to ContentEntityAutosaveFormTestBase::alterTitleField()
- ContentEntityAutosaveFormTestBase::doTestAutosaveAfterFormValidationFail in tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php - Tests the autosave message not being shown on reload after validation fail.
- ContentEntityAutosaveFormTestBase::makeEntityFormChange in tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php - Makes a change by the given change/step ID.
File
- tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php, line 495
Class
- ContentEntityAutosaveFormTestBase
- Base test class for testing autosave support for entity forms.
Namespace
Drupal\Tests\autosave_form\FunctionalJavascript\ContentEntityCode
protected function alterTitleField($changed_title = 'changed title') {
if ($label_field_name = \Drupal::entityTypeManager()
->getDefinition($this->entityType)
->getKey('label')) {
$this->changedEntityTitle = $changed_title;
$this
->getSession()
->getPage()
->fillField($label_field_name . '[0][value]', $this->changedEntityTitle);
}
}