You are here

public function Address::getTestValues in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/Address.php \Drupal\webform\Plugin\WebformElement\Address::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

src/Plugin/WebformElement/Address.php, line 432

Class

Address
Provides a 'address' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function getTestValues(array $element, WebformInterface $webform, array $options = []) {
  return [
    [
      'given_name' => 'John',
      'family_name' => 'Smith',
      'organization' => 'Google Inc.',
      'address_line1' => '1098 Alta Ave',
      'postal_code' => '94043',
      'locality' => 'Mountain View',
      'administrative_area' => 'CA',
      'country_code' => 'US',
      'langcode' => 'en',
    ],
  ];
}