You are here

public function WebformLocationGeocomplete::getTestValues in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_location_geocomplete/src/Plugin/WebformElement/WebformLocationGeocomplete.php \Drupal\webform_location_geocomplete\Plugin\WebformElement\WebformLocationGeocomplete::getTestValues()

Get test values for an element.

Parameters

array $element: An element.

\Drupal\webform\WebformInterface $webform: A webform.

array $options: Options used to generate a test value.

Return value

mixed A test value for an element.

Overrides WebformCompositeBase::getTestValues

File

modules/webform_location_geocomplete/src/Plugin/WebformElement/WebformLocationGeocomplete.php, line 158

Class

WebformLocationGeocomplete
Provides an 'location' element using Geocomplete.

Namespace

Drupal\webform_location_geocomplete\Plugin\WebformElement

Code

public function getTestValues(array $element, WebformInterface $webform, array $options = []) {
  return [
    [
      'value' => 'The White House, 1600 Pennsylvania Ave NW, Washington, DC 20500, USA',
    ],
    [
      'value' => 'London SW1A 1AA, United Kingdom',
    ],
    [
      'value' => 'Moscow, Russia, 10307',
    ],
  ];
}