abstract class ContentEntityAutosaveFormTestBase in Autosave Form 8
Base test class for testing autosave support for entity forms.
Hierarchy
- class \Drupal\Tests\BrowserTestBase extends \PHPUnit\Framework\TestCase uses FunctionalTestSetupTrait, TestSetupTrait, AssertLegacyTrait, BlockCreationTrait, ConfigTestTrait, ContentTypeCreationTrait, NodeCreationTrait, PhpunitCompatibilityTrait, RandomGeneratorTrait, TestRequirementsTrait, UiHelperTrait, UserCreationTrait, XdebugRequestTrait
- class \Drupal\FunctionalJavascriptTests\WebDriverTestBase
- class \Drupal\Tests\autosave_form\FunctionalJavascript\AutosaveFormTestBase
- class \Drupal\Tests\autosave_form\FunctionalJavascript\ContentEntity\ContentEntityAutosaveFormTestBase
- class \Drupal\Tests\autosave_form\FunctionalJavascript\AutosaveFormTestBase
- class \Drupal\FunctionalJavascriptTests\WebDriverTestBase
Expanded class hierarchy of ContentEntityAutosaveFormTestBase
File
- tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php, line 16
Namespace
Drupal\Tests\autosave_form\FunctionalJavascript\ContentEntityView source
abstract class ContentEntityAutosaveFormTestBase extends AutosaveFormTestBase {
/**
* The entity type to be tested.
*
* @var string
*/
protected $entityType;
/**
* The bundle of the entity type to be tested.
*
* @var string
*/
protected $bundle;
/**
* The original entity title.
*
* @var string
*/
protected $originalEntityTitle;
/**
* The changed entity title.
*
* @var string
*/
protected $changedEntityTitle;
/**
* The name of the field with unlimited cardinality to test ajax requests.
*
* @var string
*/
protected $unlimitedCardinalityField = 'autosave_unlimited_field';
/**
* The name of the required test field.
*
* @var string
*/
protected $requiredField = 'autosave_required_field';
/**
* Count of the changes to make.
*
* @var int
*/
protected $testAutosaveFormExistingEntityChangesCount = 5;
/**
* {@inheritdoc}
*/
protected function prepareSetUp() {
$this
->createMultipleTestField();
$this
->createRequiredTestField();
parent::prepareSetUp();
$this->originalEntityTitle = NULL;
$this->changedEntityTitle = NULL;
}
/**
* Tests autosave.
*/
public function testAutosaveForms() {
// It looks like phantomjs is crashing if an ajax autosave form request is
// still running when we go the next test and visit the entity form of
// different entity in which case the currently running ajax autosave form
// request will be aborted. In order to prevent this crash we re-log the
// user prior to each test.
$this
->doTestAutosaveFormNewEntity();
$this
->relogUser();
$this
->doTestAutosaveFormExistingEntity();
$this
->relogUser();
$this
->doTestSavingRestoredEntityForm();
$this
->relogUser();
$this
->doTestConcurrentEditing();
$this
->relogUser();
$this
->doTestAutosaveAfterFormValidationFail();
$this
->relogUser();
$this
->doTestAutosaveStatesPurgingOnConfigEvent();
}
/**
* Tests that the autosave form library is not loaded on new entity forms.
*/
protected function doTestAutosaveFormNewEntity() {
$this
->drupalGet($this
->getCreateNewEntityURL());
$this
->assertAutosaveFormLibraryLoaded(FALSE);
}
/**
* Tests the autosave support on entity forms.
*/
protected function doTestAutosaveFormExistingEntity() {
$entity = $this
->createTestEntity();
$entity_id = $entity
->id();
$entity_form_edit_url = $entity
->toUrl('edit-form');
$this
->drupalGet($entity_form_edit_url);
$this
->assertAutosaveFormLibraryLoaded(TRUE);
$this
->assertOriginalEntityTitleAsPageTitle();
// Wait for at least having two autosave submits being executed and assert
// that with no changes there will be no autosave states created.
$this
->assertTrue($this
->waitForAutosaveSubmits(2));
$this
->assertEquals(0, $this
->getCountAutosaveEntries($entity_id));
$latest_autosave_timestamp_per_change = $this
->makeAllEntityFormChanges($entity_id);
// Test the autosave restore of each change.
for ($change_id = $this->testAutosaveFormExistingEntityChangesCount; $change_id > 0; $change_id--) {
// Reload page otherwise new auto saves will be done and time checks get incorrect
$this
->drupalGet($entity_form_edit_url);
if (($last_autosave_timestamp = $this
->getLastAutosaveTimestamp($entity_id)) && $last_autosave_timestamp > $latest_autosave_timestamp_per_change[$change_id]) {
$delete_timestamps = range($latest_autosave_timestamp_per_change[$change_id] + 1, $last_autosave_timestamp);
$this
->deleteAutosavedStates($delete_timestamps);
}
$this
->reloadPageAndRestore($entity_form_edit_url, $this
->getLastAutosaveTimestamp($entity_id));
$this
->assertCorrectlyRestoredEntityFormState($change_id);
}
}
/**
* Tests saving an entity form restored from an autosaved state.
*/
protected function doTestSavingRestoredEntityForm() {
$entity = $this
->createTestEntity();
$entity_form_edit_url = $entity
->toUrl('edit-form');
$this
->drupalGet($entity_form_edit_url);
$this
->makeAllEntityFormChanges($entity
->id());
// Assure that an autosave submission has run.
$this
->assertTrue($this
->waitForAutosaveSubmits(1));
$this
->reloadPageAndRestore($entity_form_edit_url, $this
->getLastAutosaveTimestamp($entity
->id()));
$this
->saveForm();
$this
->finalizeTestSavingRestoredEntityForm($entity
->id());
}
/**
* Submits the current form.
*/
protected function saveForm() {
$this
->drupalPostForm(NULL, [], t('Save'));
}
/**
* Tests concurrent editing.
*/
protected function doTestConcurrentEditing() {
$entity = $this
->createTestEntity();
// This test supports only entities implementing the entity changed
// interface.
if (!$entity instanceof EntityChangedInterface) {
return;
}
// Make one change and assert that an autosave entry has been created for
// it.
$entity_form_edit_url = $entity
->toUrl('edit-form');
$this
->drupalGet($entity_form_edit_url);
$this
->assertTrue($this
->waitForAutosaveSubmits(1));
$this
->makeEntityFormChange(1);
$this
->assertTrue($this
->waitForAutosaveSubmits(2));
$this
->assertTrue($this
->getCountAutosaveEntries($entity
->id()) > 0);
$this
->assertAutosaveIsRunning(TRUE);
// Meanwhile simulate saving by another user in the background.
$entity
->setChangedTime($entity
->getChangedTime() + 1)
->save();
// Ensure that after the entity is being saved in the background the
// autosave submission is disabled by expecting maximum of one autosave
// submission which will show the alert message on the page. If when the
// following code is executed the autosave submission has not yet run then
// there will be one autosave submission and afterwards autosave submission
// should be disabled. If however when the following code is executed the
// autosave submission has already run then autosave submission should have
// been disabled already. In both cases we assert that we expect zero or
// one autosave submission, but not more than one.
$this
->assertFalse($this
->waitForAutosaveSubmits(2));
$this
->assertAutosaveIsRunning(FALSE);
$this
->assertEquals(0, $this
->getCountAutosaveEntries($entity
->id()));
$message = $this
->config('autosave_form.messages')
->get('entity_saved_in_background_alert_message');
$this
->assertSession()
->responseContains($message);
}
/**
* Tests the autosave message not being shown on reload after validation fail.
*/
protected function doTestAutosaveAfterFormValidationFail() {
// Create a test entity and ensure that the required field is not filled in
// order to trigger a validation error on entity form submission.
$entity = $this
->createTestEntity();
// Disable the HTML5 validation as it prevents the form submission when a
// required field is empty, which however we want to do on purpose to test
// how autosave_form behaves when a form is returned with validation errors,
// but for that it has to be submitted first.
\Drupal::state()
->set('disable_html5_validation', TRUE);
$entity_form_edit_url = $entity
->toUrl('edit-form');
$this
->drupalGet($entity_form_edit_url);
// Assure that the initial autosave submission for gathering initial input
// has run.
$this
->assertTrue($this
->waitForAutosaveSubmits(1));
// Make the first change to trigger an autosave state creation, but do not
// fill the required field.
$this
->alterTitleField();
// Ensure a validation fail will occur.
$this
->emptyRequiredFieldTestAutosaveAfterFormValidationFail();
// Ensure an autosave state is saved.
$this
->assertTrue($this
->waitForAutosaveSubmits(2));
$before_submission_autosave_entries = $this
->getCountAutosaveEntries($entity
->id());
$this
->assertTrue($before_submission_autosave_entries > 0);
// Submit the form.
$this
->saveForm();
// Do not prevent the HTML5 validation anymore.
\Drupal::state()
->delete('disable_html5_validation');
$this
->logHtmlOutput(__FUNCTION__ . ' after validation fail.');
// Ensure the validation fail message is shown.
$error_messages = $this
->getSession()
->getPage()
->find('css', '.messages--error');
$this
->assertNotNull($error_messages);
// Ensure that the autosave resume/discard message is not shown.
$this
->assertAutosaveResumeDiscardMessageIsShown(FALSE, $this
->getLastAutosaveTimestamp($entity
->id()));
// Ensure that autosave submissions are running.
$this
->assertTrue($this
->waitForAutosaveSubmits(2));
// Ensure no further autosave states are being created without changes.
$this
->assertEquals($before_submission_autosave_entries, $this
->getCountAutosaveEntries($entity
->id()));
}
/**
* Tests that autosave states are purged on modifying a form related config.
*/
protected function doTestAutosaveStatesPurgingOnConfigEvent() {
$entity = $this
->createTestEntity();
$entity_id = $entity
->id();
$entity_form_edit_url = $entity
->toUrl('edit-form');
$create_autosave_state = function () use ($entity_form_edit_url, $entity_id) {
$this
->drupalGet($entity_form_edit_url);
// Wait for at least having two autosave submits being executed, make a
// change wait for two more autosave submits and ensure an autosave state
// has been created.
$this
->assertTrue($this
->waitForAutosaveSubmits(2));
$this
->makeEntityFormChange(1);
$this
->assertTrue($this
->waitForAutosaveSubmits(2));
$this
->assertEquals(1, $this
->getCountAutosaveEntries($entity_id));
};
// Make a non-significant modification on a form related config and ensure
// that the autosave state hasn't been purged.
$create_autosave_state();
$field_config = FieldConfig::loadByName($this->entityType, $this->bundle, $this->unlimitedCardinalityField);
$field_config
->setLabel('New Label Test AutosaveState Purge')
->save();
$this
->assertEquals(1, $this
->getCountAutosaveEntries($entity_id));
// Modify a form related config and ensure that the autosave state has been
// purged.
$field_storage = FieldStorageConfig::loadByName($this->entityType, $this->unlimitedCardinalityField);
$field_storage
->setCardinality(10)
->save();
$this
->assertEquals(0, $this
->getCountAutosaveEntries($entity_id));
// Delete a form related config and ensure that the autosave state has been
// purged.
$create_autosave_state();
$field_storage = FieldStorageConfig::loadByName($this->entityType, $this->unlimitedCardinalityField);
$field_storage
->delete();
$this
->assertEquals(0, $this
->getCountAutosaveEntries($entity_id));
// Create a form related config and ensure that the autosave state has been
// purged.
$create_autosave_state();
$this
->createMultipleTestField();
$this
->assertEquals(0, $this
->getCountAutosaveEntries($entity_id));
}
/**
* Empties a required field.
*
* Helper method for ::doTestAutosaveAfterFormValidationFail() to empty a
* required field on the entity form in order to trigger a form validation
* fail on form submission.
*/
protected function emptyRequiredFieldTestAutosaveAfterFormValidationFail() {
$this
->fillTestField($this->requiredField, 0, '');
}
/**
* Tests correctly saved entity after autosave restore.
*
* Helper method for ::doTestSavingRestoredEntityForm() to test the saved
* entity.
*
* @param mixed $entity_id
* The ID of the entity.
*/
protected function finalizeTestSavingRestoredEntityForm($entity_id) {
$entity = $this
->reloadEntity($entity_id);
// Change 1.
$this
->assertEquals($entity
->label(), $this->changedEntityTitle);
// Changes 2, 3 and 4.
$this
->assertEquals(2, $entity
->get($this->unlimitedCardinalityField)
->count());
$this
->assertEquals('delta 0', $entity
->get($this->unlimitedCardinalityField)
->get(0)->value);
$this
->assertEquals('delta 1', $entity
->get($this->unlimitedCardinalityField)
->get(1)->value);
// Change 5.
$this
->assertEquals('required test field', $entity
->get($this->requiredField)
->get(0)->value);
}
/**
* Executes all change steps.
*
* @param mixed $entity_id
* The ID of the entity.
*
* @return array
* An array keyed by the change ID and having as value the latest autosave
* timestamp.
*/
protected function makeAllEntityFormChanges($entity_id) {
$this
->logHtmlOutput(__FUNCTION__ . ' before changes are made');
// Assure the first autosave submission for gathering the initial input has
// been executed before making any changes, otherwise it might happen that
// a change is made too fast and makes its way into the initial user input
// used for comparison in order to determine if a new autosave state has
// to be created or not.
$this
->assertTrue($this
->waitForAutosaveSubmits(1));
$latest_autosave_timestamp_per_change = [];
for ($change_id = 1; $change_id <= $this->testAutosaveFormExistingEntityChangesCount; $change_id++) {
$before_change_autosave_entries = $this
->getCountAutosaveEntries($entity_id);
$this
->makeEntityFormChange($change_id);
// Assert that a new autosave has been created, but wait for at least two
// autosave submits to exclude any race conditions.
$this
->assertTrue($this
->waitForAutosaveSubmits(2));
$after_change_autosave_entries = $this
->getCountAutosaveEntries($entity_id);
$this
->assertTrue($after_change_autosave_entries > $before_change_autosave_entries);
// Wait for at least two more autosave submits to ensure no additional
// autosave states are being created.
$this
->assertTrue($this
->waitForAutosaveSubmits(2));
$this
->assertEquals($after_change_autosave_entries, $this
->getCountAutosaveEntries($entity_id));
$latest_autosave_timestamp_per_change[$change_id] = $this
->getLastAutosaveTimestamp($entity_id);
}
$this
->logHtmlOutput(__FUNCTION__ . ' after changes are made');
return $latest_autosave_timestamp_per_change;
}
/**
* Makes a change by the given change/step ID.
*
* @param $change_id
* The change id of the change to make.
*/
protected function makeEntityFormChange($change_id) {
$this
->logHtmlOutput(__FUNCTION__ . ' before change ' . $change_id);
switch ($change_id) {
case 1:
// Alter the title field.
$this
->alterTitleField();
break;
case 2:
// Fill the first item of the test field and assert that a new autosave
// entry has been created.
$this
->fillTestField($this->unlimitedCardinalityField, 0, 'delta 0');
break;
case 3:
// Add new item to the test field and assert that a new autosave entry has
// been created.
$new_delta_expected = 1;
$this
->addItemToUnlimitedTestField($new_delta_expected);
break;
case 4:
// Fill the new item of the test field and assert that a new autosave
// entry has been created.
$field_delta = 1;
$this
->fillTestField($this->unlimitedCardinalityField, $field_delta, 'delta 1');
break;
case 5:
// Fill the required test field.
$this
->fillTestField($this->requiredField, 0, 'required test field');
break;
}
$this
->logHtmlOutput(__FUNCTION__ . ' after change ' . $change_id);
}
/**
* Tests the restored autosave state by the change ID.
*
* @param $change_id
* The change ID for which to test the restored autosaved state.
*
* @see ::makeEntityFormChange().
*/
protected function assertCorrectlyRestoredEntityFormState($change_id) {
$page = $this
->getSession()
->getPage();
$this
->logHtmlOutput(__FUNCTION__ . ' before restore of change ' . $change_id);
switch ($change_id) {
case 5:
$test_field_delta_0 = $page
->findField($this->requiredField . '[0][value]');
$this
->assertNotEmpty($test_field_delta_0);
$this
->assertEquals('required test field', $test_field_delta_0
->getValue());
case 4:
$test_field_delta_1 = $page
->findField($this->unlimitedCardinalityField . '[1][value]');
$this
->assertNotEmpty($test_field_delta_1);
$this
->assertEquals('delta 1', $test_field_delta_1
->getValue());
case 3:
// Not applying because of case 4.
if ($change_id == 3) {
$test_field_delta_1 = $page
->findField($this->unlimitedCardinalityField . '[1][value]');
$this
->assertNotEmpty($test_field_delta_1);
$this
->assertEquals('', $test_field_delta_1
->getValue());
}
case 2:
$test_field_delta_0 = $page
->findField($this->unlimitedCardinalityField . '[0][value]');
$this
->assertNotEmpty($test_field_delta_0);
$this
->assertEquals('delta 0', $test_field_delta_0
->getValue());
case 1:
$this
->assertOriginalEntityTitleAsPageTitle();
$entity_type = \Drupal::entityTypeManager()
->getDefinition($this->entityType);
$this
->assertEquals($this->changedEntityTitle, $page
->findField($entity_type
->getKey('label') . '[0][value]')
->getValue());
break;
}
$this
->logHtmlOutput(__FUNCTION__ . ' after restore of change ' . $change_id);
}
/**
* Alters the title field of the entity.
*
* @param string $changed_title
* The title to use to set on the title form field.
*/
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);
}
}
/**
* Fields a field item by its name and delta.
*
* @param $field_name
* The name of the field.
* @param $delta
* The delta item of the field.
* @param $value
* The value.
*/
protected function fillTestField($field_name, $delta, $value) {
$this
->getSession()
->getPage()
->fillField("{$field_name}[{$delta}][value]", $value);
}
/**
* Adds a new item to the unlimited test field.
*
* @param $delta
* The new excepted delta.
*/
protected function addItemToUnlimitedTestField($delta) {
$this
->logHtmlOutput(__FUNCTION__ . ' before adding a new item to unlimited field');
$page = $this
->getSession()
->getPage();
$add_button = $page
->find('css', '[data-drupal-selector="edit-' . Html::cleanCssIdentifier($this->unlimitedCardinalityField) . '-add-more"]');
$this
->assertTrue(!empty($add_button));
$add_button
->press();
$result = $this
->assertSession()
->waitForElement('css', "[name=\"{$this->unlimitedCardinalityField}[{$delta}][value]\"]");
$this
->assertNotEmpty($result);
$this
->logHtmlOutput(__FUNCTION__ . ' after adding a new item to unlimited field');
}
/**
* Returns the currently rendered page title.
*
* @return string|NULL
* The page title.
*/
protected function getCurrentPageTitle() {
$element = $this
->getSession()
->getPage()
->find('css', '.page-title');
$title = !empty($element) ? $element
->getText() : NULL;
return $title;
}
/**
* Asserts that page title matches the original entity title.
*/
protected function assertOriginalEntityTitleAsPageTitle() {
$current_title = $this
->getCurrentPageTitle();
$this
->assertTrue(strpos($current_title, $this->originalEntityTitle) !== FALSE);
}
/**
* Gets the count of autosave states.
*
* @param mixed $entity_id
* The ID of the entity.
*
* @return int
* The count of autosave entries.
*/
protected function getCountAutosaveEntries($entity_id) {
$count = \Drupal::database()
->select(AutosaveEntityFormStorageInterface::AUTOSAVE_ENTITY_FORM_TABLE)
->condition('entity_id', $entity_id)
->countQuery()
->execute()
->fetchField();
return $count !== FALSE ? $count : 0;
}
/**
* Gets the count of autosave unique session entries.
*
* @return int
* The count of autosave unique session entries.
*/
protected function getCountAutosaveSessionEntries() {
$count = \Drupal::database()
->select(AutosaveEntityFormStorageInterface::AUTOSAVE_ENTITY_FORM_TABLE)
->groupBy('form_session_id')
->countQuery()
->execute()
->fetchField();
return $count !== FALSE ? $count : 0;
}
/**
* Returns the timestamp of the last autosave entry for the given entity ID.
*
* @param mixed $entity_id
* The ID of the entity.
*
* @return int|null
* The timestamp of the last autosave entry.
*/
protected function getLastAutosaveTimestamp($entity_id) {
$timestamp = \Drupal::database()
->select(AutosaveEntityFormStorageInterface::AUTOSAVE_ENTITY_FORM_TABLE, 't')
->fields('t', [
'timestamp',
])
->condition('entity_id', $entity_id)
->orderBy('timestamp', 'DESC')
->execute()
->fetchField();
return $timestamp !== FALSE ? $timestamp : NULL;
}
/**
* Deletes the autosaved states.
*
* @param $timestamps
* (optional) If specified, only the autosaved states with the given
* timestamps will be deleted.
*/
protected function deleteAutosavedStates(array $timestamps = NULL) {
$query = \Drupal::database()
->delete(AutosaveEntityFormStorageInterface::AUTOSAVE_ENTITY_FORM_TABLE);
if (isset($timestamps)) {
$query
->condition('timestamp', $timestamps, 'IN');
}
$query
->execute();
}
/**
* Creates a new test entity.
*
* @return \Drupal\Core\Entity\ContentEntityInterface
* The newly created entity.
*/
protected function createTestEntity() {
$entity_type_manager = \Drupal::entityTypeManager();
$entity_type = $entity_type_manager
->getDefinition($this->entityType);
$storage = $entity_type_manager
->getStorage($this->entityType);
$values = [
'type' => $this->bundle,
];
if ($label_field_name = $entity_type
->getKey('label')) {
$values[$label_field_name] = 'original title';
}
$entity = $storage
->create($values);
if ($entity instanceof EntityOwnerInterface) {
$entity
->setOwner($this->webUser);
}
elseif ($entity_type
->hasKey('uid')) {
$entity
->set('uid', $this->webUser
->id());
}
$entity
->save();
$this->originalEntityTitle = $entity
->label();
return $entity;
}
/**
* Returns the test entity
*
* @param mixed $id
* The ID of the entity to load.
*
* @return \Drupal\Core\Entity\EntityInterface|null
* An entity object. NULL if no matching entity is found.
*/
protected function reloadEntity($id) {
$storage = \Drupal::entityTypeManager()
->getStorage($this->entityType);
$storage
->resetCache([
$id,
]);
return $storage
->load($id);
}
/**
* Creates a multiple field to test ajax submits with.
*/
protected function createMultipleTestField() {
if (!FieldStorageConfig::loadByName($this->entityType, $this->unlimitedCardinalityField)) {
// Create an unlimited cardinality field.
FieldStorageConfig::create([
'field_name' => $this->unlimitedCardinalityField,
'entity_type' => $this->entityType,
'type' => 'text',
'cardinality' => -1,
])
->save();
}
if (!FieldConfig::loadByName($this->entityType, $this->bundle, $this->unlimitedCardinalityField)) {
// Attach an instance of the field to the content type.
FieldConfig::create([
'field_name' => $this->unlimitedCardinalityField,
'entity_type' => $this->entityType,
'bundle' => $this->bundle,
'label' => $this
->randomMachineName() . '_label',
])
->save();
$this
->getEntityFormDisplay($this->entityType, $this->bundle, 'default')
->setComponent($this->unlimitedCardinalityField, [
'type' => 'text_textfield',
])
->save();
}
}
/**
* Creates a required test field to test ajax submits with.
*/
protected function createRequiredTestField() {
if (!FieldStorageConfig::loadByName($this->entityType, $this->requiredField)) {
// Create a required test field.
FieldStorageConfig::create([
'field_name' => $this->requiredField,
'entity_type' => $this->entityType,
'type' => 'text',
'cardinality' => 1,
])
->save();
}
if (!FieldConfig::loadByName($this->entityType, $this->bundle, $this->requiredField)) {
// Attach an instance of the field to the content type.
FieldConfig::create([
'field_name' => $this->requiredField,
'entity_type' => $this->entityType,
'bundle' => $this->bundle,
'label' => $this->requiredField,
'required' => TRUE,
])
->save();
$this
->getEntityFormDisplay($this->entityType, $this->bundle, 'default')
->setComponent($this->requiredField, [
'type' => 'text_textfield',
])
->save();
}
}
/**
* Logs out and logs in the web user.
*/
protected function relogUser() {
$this
->drupalLogout();
$this
->drupalLogin($this->webUser);
}
/**
* Returns the URL for creating a new entity.
*
* @return string
* The url for creating a new entity.
*/
protected abstract function getCreateNewEntityURL();
/**
* Returns the entity form display associated with a bundle and form mode.
*
* This is just a wrapper around
* Drupal\Core\Entity\EntityDisplayRepository::getFormDisplay() for Drupal
* versions >= 8.8, with a fallback to entity_get_form_display() for prior
* Drupal versions.
*
* @param string $entity_type
* The entity type.
* @param string $bundle
* The bundle.
* @param string $form_mode
* The form mode.
*
* @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface
* The entity form display associated with the given form mode.
*
* @todo Remove this once Drupal 8.7 is no longer supported.
*/
private function getEntityFormDisplay($entity_type, $bundle, $form_mode) {
if (version_compare(\Drupal::VERSION, '8.8', '>=')) {
return \Drupal::service('entity_display.repository')
->getFormDisplay($entity_type, $bundle, $form_mode);
}
else {
// Because this code only runs for older Drupal versions, we do not need
// or want IDEs or the Upgrade Status module warning people about this
// deprecated code usage. Setting the function name dynamically
// circumvents those warnings.
$function = 'entity_get_form_display';
return $function($entity_type, $bundle, $form_mode);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AssertHelperTrait:: |
protected static | function | Casts MarkupInterface objects into strings. | |
AssertLegacyTrait:: |
protected | function | Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertTrue() instead. | |
AssertLegacyTrait:: |
protected | function | Asserts whether an expected cache tag was present in the last response. | |
AssertLegacyTrait:: |
protected | function | Asserts that the element with the given CSS selector is not present. | |
AssertLegacyTrait:: |
protected | function | Asserts that the element with the given CSS selector is present. | |
AssertLegacyTrait:: |
protected | function | Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertEquals() instead. | |
AssertLegacyTrait:: |
protected | function | Passes if the raw text IS found escaped on the loaded page, fail otherwise. | |
AssertLegacyTrait:: |
protected | function | Asserts that a field exists with the given name or ID. | |
AssertLegacyTrait:: |
protected | function | Asserts that a field exists with the given ID and value. | |
AssertLegacyTrait:: |
protected | function | Asserts that a field exists with the given name and value. | |
AssertLegacyTrait:: |
protected | function | Asserts that a field exists in the current page by the given XPath. | |
AssertLegacyTrait:: |
protected | function | Asserts that a checkbox field in the current page is checked. | |
AssertLegacyTrait:: |
protected | function | Asserts that a field exists in the current page with a given Xpath result. | |
AssertLegacyTrait:: |
protected | function | Checks that current response header equals value. | |
AssertLegacyTrait:: |
protected | function | Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertSame() instead. | |
AssertLegacyTrait:: |
protected | function | Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertEquals() instead. | |
AssertLegacyTrait:: |
protected | function | Passes if a link with the specified label is found. | |
AssertLegacyTrait:: |
protected | function | Passes if a link containing a given href (part) is found. | |
AssertLegacyTrait:: |
protected | function | Asserts whether an expected cache tag was absent in the last response. | |
AssertLegacyTrait:: |
protected | function | Passes if the raw text is not found escaped on the loaded page. | |
AssertLegacyTrait:: |
protected | function | Asserts that a field does NOT exist with the given name or ID. | |
AssertLegacyTrait:: |
protected | function | Asserts that a field does not exist with the given ID and value. | |
AssertLegacyTrait:: |
protected | function | Asserts that a field does not exist with the given name and value. | |
AssertLegacyTrait:: |
protected | function | Asserts that a field does not exist or its value does not match, by XPath. | |
AssertLegacyTrait:: |
protected | function | Asserts that a checkbox field in the current page is not checked. | |
AssertLegacyTrait:: |
protected | function | Passes if a link with the specified label is not found. | |
AssertLegacyTrait:: |
protected | function | Passes if a link containing a given href (part) is not found. | |
AssertLegacyTrait:: |
protected | function | Asserts that a select option does NOT exist in the current page. | |
AssertLegacyTrait:: |
protected | function | Triggers a pass if the Perl regex pattern is not found in the raw content. | |
AssertLegacyTrait:: |
protected | function | Passes if the raw text IS not found on the loaded page, fail otherwise. | 1 |
AssertLegacyTrait:: |
protected | function | Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertNotEquals() instead. | |
AssertLegacyTrait:: |
protected | function | Passes if the page (with HTML stripped) does not contains the text. | 1 |
AssertLegacyTrait:: |
protected | function | Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertNotSame() instead. | |
AssertLegacyTrait:: |
protected | function | Passes if the text is found MORE THAN ONCE on the text version of the page. | |
AssertLegacyTrait:: |
protected | function | Asserts that a select option in the current page exists. | |
AssertLegacyTrait:: |
protected | function | Asserts that a select option with the visible text exists. | |
AssertLegacyTrait:: |
protected | function | Asserts that a select option in the current page is checked. | |
AssertLegacyTrait:: |
protected | function | Triggers a pass if the Perl regex pattern is found in the raw content. | |
AssertLegacyTrait:: |
protected | function | Passes if the raw text IS found on the loaded page, fail otherwise. | 1 |
AssertLegacyTrait:: |
protected | function | Asserts the page responds with the specified response code. | 1 |
AssertLegacyTrait:: |
protected | function | Passes if the page (with HTML stripped) contains the text. | 1 |
AssertLegacyTrait:: |
protected | function | Helper for assertText and assertNoText. | |
AssertLegacyTrait:: |
protected | function | Pass if the page title is the given string. | |
AssertLegacyTrait:: |
protected | function | Passes if the text is found ONLY ONCE on the text version of the page. | |
AssertLegacyTrait:: |
protected | function | Passes if the internal browser's URL matches the given path. | |
AssertLegacyTrait:: |
protected | function | Builds an XPath query. | |
AssertLegacyTrait:: |
protected | function | Helper: Constructs an XPath for the given set of attributes and value. | |
AssertLegacyTrait:: |
protected | function | Get all option elements, including nested options, in a select. | |
AssertLegacyTrait:: |
protected | function | Gets the current raw content. | |
AssertLegacyTrait:: |
protected | function | Deprecated Scheduled for removal in Drupal 10.0.0. Use self::assertTrue() instead. | |
AssertLegacyTrait:: |
protected | function | ||
AutosaveFormTestBase:: |
protected | property |
The theme to install as the default for testing. Overrides BrowserTestBase:: |
|
AutosaveFormTestBase:: |
protected | property | The autosave submission interval in milliseconds. | |
AutosaveFormTestBase:: |
protected static | property |
Modules to enable. Overrides BrowserTestBase:: |
1 |
AutosaveFormTestBase:: |
protected | property |
Profile to use. Overrides BrowserTestBase:: |
|
AutosaveFormTestBase:: |
protected | property | The user to test with. | |
AutosaveFormTestBase:: |
protected | function | Asserts that the autosave form library is loaded. | |
AutosaveFormTestBase:: |
protected | function | Asserts whether autosave is currently running. | |
AutosaveFormTestBase:: |
protected | function | Asserts whether the autosave resume/discard message is shown or not. | |
AutosaveFormTestBase:: |
abstract protected | function | Returns the user permissions. | 1 |
AutosaveFormTestBase:: |
protected | function | Logs the html of the current page. | |
AutosaveFormTestBase:: |
protected | function | Prepares the user before login. | |
AutosaveFormTestBase:: |
protected | function | Presses the autosave restore button. | |
AutosaveFormTestBase:: |
protected | function | Loads the page and submits the autosave restore. | |
AutosaveFormTestBase:: |
protected | function |
Overrides BrowserTestBase:: |
|
AutosaveFormTestBase:: |
protected | function | Waits for the autosave restore button to disappear. | |
AutosaveFormTestBase:: |
protected | function | Waits until a specific count of autosave submits have been triggered. | |
AutosaveFormTestBase:: |
protected | function | Waits for the specified selector and to disappear. | |
BlockCreationTrait:: |
protected | function | Creates a block instance based on default settings. Aliased as: drupalPlaceBlock | |
BrowserHtmlDebugTrait:: |
protected | property | The Base URI to use for links to the output files. | |
BrowserHtmlDebugTrait:: |
protected | property | Class name for HTML output logging. | |
BrowserHtmlDebugTrait:: |
protected | property | Counter for HTML output logging. | |
BrowserHtmlDebugTrait:: |
protected | property | Counter storage for HTML output logging. | |
BrowserHtmlDebugTrait:: |
protected | property | Directory name for HTML output logging. | |
BrowserHtmlDebugTrait:: |
protected | property | HTML output output enabled. | |
BrowserHtmlDebugTrait:: |
protected | property | The file name to write the list of URLs to. | |
BrowserHtmlDebugTrait:: |
protected | property | HTML output test ID. | |
BrowserHtmlDebugTrait:: |
protected | function | Formats HTTP headers as string for HTML output logging. | |
BrowserHtmlDebugTrait:: |
protected | function | Logs a HTML output message in a text file. | |
BrowserHtmlDebugTrait:: |
protected | function | Creates the directory to store browser output. | |
BrowserTestBase:: |
protected | property | The base URL. | |
BrowserTestBase:: |
protected | property | The config importer that can be used in a test. | |
BrowserTestBase:: |
protected | property | An array of custom translations suitable for drupal_rewrite_settings(). | |
BrowserTestBase:: |
protected | property | The database prefix of this test run. | |
BrowserTestBase:: |
protected | property | Mink session manager. | |
BrowserTestBase:: |
protected | property | ||
BrowserTestBase:: |
protected | property | The original container. | |
BrowserTestBase:: |
protected | property | The original array of shutdown function callbacks. | |
BrowserTestBase:: |
protected | property | ||
BrowserTestBase:: |
protected | property | The app root. | |
BrowserTestBase:: |
protected | property | Browser tests are run in separate processes to prevent collisions between code that may be loaded by tests. | |
BrowserTestBase:: |
protected | property | Time limit in seconds for the test. | |
BrowserTestBase:: |
protected | property | The translation file directory for the test environment. | |
BrowserTestBase:: |
protected | function | Clean up the Simpletest environment. | |
BrowserTestBase:: |
protected | function | Configuration accessor for tests. Returns non-overridden configuration. | |
BrowserTestBase:: |
protected | function | Translates a CSS expression to its XPath equivalent. | |
BrowserTestBase:: |
protected | function | Gets the value of an HTTP response header. | |
BrowserTestBase:: |
protected | function | Returns all response headers. | |
BrowserTestBase:: |
public static | function | Ensures test files are deletable. | |
BrowserTestBase:: |
protected | function | Gets an instance of the default Mink driver. | |
BrowserTestBase:: |
protected | function | Obtain the HTTP client for the system under test. | |
BrowserTestBase:: |
protected | function | Helper function to get the options of select field. | |
BrowserTestBase:: |
protected | function |
Provides a Guzzle middleware handler to log every response received. Overrides BrowserHtmlDebugTrait:: |
|
BrowserTestBase:: |
public | function | Returns Mink session. | |
BrowserTestBase:: |
protected | function | Get session cookies from current session. | |
BrowserTestBase:: |
protected | function |
Retrieves the current calling line in the class under test. Overrides BrowserHtmlDebugTrait:: |
|
BrowserTestBase:: |
public | function | Installs Drupal into the Simpletest site. | 1 |
BrowserTestBase:: |
protected | function | Registers additional Mink sessions. | |
BrowserTestBase:: |
protected | function | Transforms a nested array into a flat array suitable for drupalPostForm(). | |
BrowserTestBase:: |
protected | function | Performs an xpath search on the contents of the internal browser. | |
BrowserTestBase:: |
public | function | 1 | |
BrowserTestBase:: |
public | function | Prevents serializing any properties. | |
ConfigTestTrait:: |
protected | function | Returns a ConfigImporter object to import test configuration. | |
ConfigTestTrait:: |
protected | function | Copies configuration objects from source storage to target storage. | |
ContentEntityAutosaveFormTestBase:: |
protected | property | The bundle of the entity type to be tested. | 1 |
ContentEntityAutosaveFormTestBase:: |
protected | property | The changed entity title. | |
ContentEntityAutosaveFormTestBase:: |
protected | property | The entity type to be tested. | 1 |
ContentEntityAutosaveFormTestBase:: |
protected | property | The original entity title. | |
ContentEntityAutosaveFormTestBase:: |
protected | property | The name of the required test field. | |
ContentEntityAutosaveFormTestBase:: |
protected | property | Count of the changes to make. | |
ContentEntityAutosaveFormTestBase:: |
protected | property | The name of the field with unlimited cardinality to test ajax requests. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Adds a new item to the unlimited test field. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Alters the title field of the entity. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Tests the restored autosave state by the change ID. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Asserts that page title matches the original entity title. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Creates a multiple field to test ajax submits with. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Creates a required test field to test ajax submits with. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Creates a new test entity. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Deletes the autosaved states. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Tests the autosave message not being shown on reload after validation fail. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Tests the autosave support on entity forms. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Tests that the autosave form library is not loaded on new entity forms. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Tests that autosave states are purged on modifying a form related config. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Tests concurrent editing. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Tests saving an entity form restored from an autosaved state. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Empties a required field. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Fields a field item by its name and delta. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Tests correctly saved entity after autosave restore. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Gets the count of autosave states. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Gets the count of autosave unique session entries. | |
ContentEntityAutosaveFormTestBase:: |
abstract protected | function | Returns the URL for creating a new entity. | 1 |
ContentEntityAutosaveFormTestBase:: |
protected | function | Returns the currently rendered page title. | |
ContentEntityAutosaveFormTestBase:: |
private | function | Returns the entity form display associated with a bundle and form mode. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Returns the timestamp of the last autosave entry for the given entity ID. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Executes all change steps. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Makes a change by the given change/step ID. | |
ContentEntityAutosaveFormTestBase:: |
protected | function |
Prepares the test setup. Overrides AutosaveFormTestBase:: |
1 |
ContentEntityAutosaveFormTestBase:: |
protected | function | Returns the test entity | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Logs out and logs in the web user. | |
ContentEntityAutosaveFormTestBase:: |
protected | function | Submits the current form. | |
ContentEntityAutosaveFormTestBase:: |
public | function | Tests autosave. | |
ContentTypeCreationTrait:: |
protected | function | Creates a custom content type based on default settings. Aliased as: drupalCreateContentType | 1 |
FunctionalTestSetupTrait:: |
protected | property | The flag to set 'apcu_ensure_unique_prefix' setting. | 1 |
FunctionalTestSetupTrait:: |
protected | property | The class loader to use for installation and initialization of setup. | |
FunctionalTestSetupTrait:: |
protected | property | The config directories used in this test. | |
FunctionalTestSetupTrait:: |
protected | property | The "#1" admin user. | |
FunctionalTestSetupTrait:: |
protected | function | Execute the non-interactive installer. | 1 |
FunctionalTestSetupTrait:: |
protected | function | Returns all supported database driver installer objects. | |
FunctionalTestSetupTrait:: |
protected | function | Initialize various configurations post-installation. | 2 |
FunctionalTestSetupTrait:: |
protected | function | Initializes the kernel after installation. | |
FunctionalTestSetupTrait:: |
protected | function | Initialize settings created during install. | |
FunctionalTestSetupTrait:: |
protected | function | Initializes user 1 for the site to be installed. | |
FunctionalTestSetupTrait:: |
protected | function | Installs the default theme defined by `static::$defaultTheme` when needed. | |
FunctionalTestSetupTrait:: |
protected | function | Returns the parameters that will be used when Simpletest installs Drupal. | 9 |
FunctionalTestSetupTrait:: |
protected | function | Prepares the current environment for running the test. | 23 |
FunctionalTestSetupTrait:: |
protected | function | Creates a mock request and sets it on the generator. | |
FunctionalTestSetupTrait:: |
protected | function | Prepares site settings and services before installation. | 2 |
FunctionalTestSetupTrait:: |
protected | function | Resets and rebuilds the environment after setup. | |
FunctionalTestSetupTrait:: |
protected | function | Rebuilds \Drupal::getContainer(). | |
FunctionalTestSetupTrait:: |
protected | function | Resets all data structures after having enabled new modules. | |
FunctionalTestSetupTrait:: |
protected | function | Changes parameters in the services.yml file. | |
FunctionalTestSetupTrait:: |
protected | function | Sets up the base URL based upon the environment variable. | |
FunctionalTestSetupTrait:: |
protected | function | Rewrites the settings.php file of the test site. | |
NodeCreationTrait:: |
protected | function | Creates a node based on default settings. Aliased as: drupalCreateNode | |
NodeCreationTrait:: |
public | function | Get a node from the database based on its title. Aliased as: drupalGetNodeByTitle | |
PhpunitCompatibilityTrait:: |
public | function | Returns a mock object for the specified class using the available method. | |
PhpunitCompatibilityTrait:: |
public | function | Compatibility layer for PHPUnit 6 to support PHPUnit 4 code. | |
RandomGeneratorTrait:: |
protected | property | The random generator. | |
RandomGeneratorTrait:: |
protected | function | Gets the random generator for the utility methods. | |
RandomGeneratorTrait:: |
protected | function | Generates a unique random string containing letters and numbers. | 1 |
RandomGeneratorTrait:: |
public | function | Generates a random PHP object. | |
RandomGeneratorTrait:: |
public | function | Generates a pseudo-random string of ASCII characters of codes 32 to 126. | |
RandomGeneratorTrait:: |
public | function | Callback for random string validation. | |
RefreshVariablesTrait:: |
protected | function | Refreshes in-memory configuration and state information. | 3 |
SessionTestTrait:: |
protected | property | The name of the session cookie. | |
SessionTestTrait:: |
protected | function | Generates a session cookie name. | |
SessionTestTrait:: |
protected | function | Returns the session name in use on the child site. | |
StorageCopyTrait:: |
protected static | function | Copy the configuration from one storage to another and remove stale items. | |
TestRequirementsTrait:: |
private | function | Checks missing module requirements. | |
TestRequirementsTrait:: |
protected | function | Check module requirements for the Drupal use case. | 1 |
TestRequirementsTrait:: |
protected static | function | Returns the Drupal root directory. | |
TestSetupTrait:: |
protected static | property | An array of config object names that are excluded from schema checking. | |
TestSetupTrait:: |
protected | property | The dependency injection container used in the test. | |
TestSetupTrait:: |
protected | property | The DrupalKernel instance used in the test. | |
TestSetupTrait:: |
protected | property | The site directory of the original parent site. | |
TestSetupTrait:: |
protected | property | The private file directory for the test environment. | |
TestSetupTrait:: |
protected | property | The public file directory for the test environment. | |
TestSetupTrait:: |
protected | property | The site directory of this test run. | |
TestSetupTrait:: |
protected | property | Set to TRUE to strict check all configuration saved. | 2 |
TestSetupTrait:: |
protected | property | The temporary file directory for the test environment. | |
TestSetupTrait:: |
protected | property | The test run ID. | |
TestSetupTrait:: |
protected | function | Changes the database connection to the prefixed one. | |
TestSetupTrait:: |
protected | function | Gets the config schema exclusions for this test. | |
TestSetupTrait:: |
public static | function | Returns the database connection to the site running Simpletest. | |
TestSetupTrait:: |
protected | function | Generates a database prefix for running tests. | 2 |
UiHelperTrait:: |
protected | property | The current user logged in using the Mink controlled browser. | |
UiHelperTrait:: |
protected | property | The number of meta refresh redirects to follow, or NULL if unlimited. | |
UiHelperTrait:: |
protected | property | The number of meta refresh redirects followed during ::drupalGet(). | |
UiHelperTrait:: |
protected | function | Builds an a absolute URL from a system path or a URL object. | |
UiHelperTrait:: |
protected | function | Checks for meta refresh tag and if found call drupalGet() recursively. | |
UiHelperTrait:: |
protected | function | Clicks the element with the given CSS selector. | |
UiHelperTrait:: |
protected | function | Follows a link by complete name. | |
UiHelperTrait:: |
protected | function | Searches elements using a CSS selector in the raw content. | |
UiHelperTrait:: |
protected | function | Retrieves a Drupal path or an absolute path. | 3 |
UiHelperTrait:: |
protected | function | Logs in a user using the Mink controlled browser. | |
UiHelperTrait:: |
protected | function | Logs a user out of the Mink controlled browser and confirms. | |
UiHelperTrait:: |
protected | function | Executes a form submission. | |
UiHelperTrait:: |
protected | function | Returns whether a given user account is logged in. | |
UiHelperTrait:: |
protected | function | Takes a path and returns an absolute path. | |
UiHelperTrait:: |
protected | function | Retrieves the plain-text content from the current page. | |
UiHelperTrait:: |
protected | function | Get the current URL from the browser. | |
UiHelperTrait:: |
protected | function | Prepare for a request to testing site. | 1 |
UiHelperTrait:: |
protected | function | Fills and submits a form. | |
UserCreationTrait:: |
protected | function | Checks whether a given list of permission names is valid. | |
UserCreationTrait:: |
protected | function | Creates an administrative role. | |
UserCreationTrait:: |
protected | function | Creates a role with specified permissions. Aliased as: drupalCreateRole | |
UserCreationTrait:: |
protected | function | Create a user with a given set of permissions. Aliased as: drupalCreateUser | |
UserCreationTrait:: |
protected | function | Grant permissions to a user role. | |
UserCreationTrait:: |
protected | function | Switch the current logged in user. | |
UserCreationTrait:: |
protected | function | Creates a random user account and sets it as current user. | |
WebDriverTestBase:: |
protected | property | Disables CSS animations in tests for more reliable testing. | |
WebDriverTestBase:: |
protected | property |
To use a legacy phantomjs based approach, please use PhantomJSDriver::class. Overrides BrowserTestBase:: |
2 |
WebDriverTestBase:: |
protected | function | Asserts that the element with the given CSS selector is not visible. | |
WebDriverTestBase:: |
protected | function | Asserts that the element with the given CSS selector is visible. | |
WebDriverTestBase:: |
protected | function | Waits for the given time or until the given JS condition becomes TRUE. | |
WebDriverTestBase:: |
public | function |
Returns WebAssert object. Overrides UiHelperTrait:: |
1 |
WebDriverTestBase:: |
protected | function | Creates a screenshot. | |
WebDriverTestBase:: |
protected | function |
Gets the current Drupal javascript settings and parses into an array. Overrides BrowserTestBase:: |
|
WebDriverTestBase:: |
protected | function |
Returns headers in HTML output format. Overrides BrowserHtmlDebugTrait:: |
|
WebDriverTestBase:: |
protected | function |
Get the Mink driver args from an environment variable, if it is set. Can
be overridden in a derived class so it is possible to use a different
value for a subset of tests, e.g. the JavaScript tests. Overrides BrowserTestBase:: |
|
WebDriverTestBase:: |
protected | function |
Visits the front page when initializing Mink. Overrides BrowserTestBase:: |
|
WebDriverTestBase:: |
protected | function |
Initializes Mink sessions. Overrides BrowserTestBase:: |
1 |
WebDriverTestBase:: |
protected | function |
Install modules defined by `static::$modules`. Overrides FunctionalTestSetupTrait:: |
|
WebDriverTestBase:: |
protected | function |
Overrides BrowserTestBase:: |
1 |
XdebugRequestTrait:: |
protected | function | Adds xdebug cookies, from request setup. |