protected function WebformMigrateAssertionsTrait::assertWebform5Values in Webform: Migrate 8
Same name and namespace in other branches
- 8.2 tests/src/Traits/WebformMigrateAssertionsTrait.php \Drupal\Tests\webform_migrate\Traits\WebformMigrateAssertionsTrait::assertWebform5Values()
Assertions of the webform_5 configuration entity.
1 call to WebformMigrateAssertionsTrait::assertWebform5Values()
- WebformMigrateTest::testWebformMigrations in tests/
src/ Kernel/ Migrate/ d7/ WebformMigrateTest.php - Tests the migration of webforms and webform submissions.
File
- tests/
src/ Traits/ WebformMigrateAssertionsTrait.php, line 279
Class
- WebformMigrateAssertionsTrait
- Trait for webform migration tests.
Namespace
Drupal\Tests\webform_migrate\TraitsCode
protected function assertWebform5Values() {
$webform = $this->container
->get('entity_type.manager')
->getStorage('webform')
->load('webform_5');
assert($webform instanceof WebformInterface);
$this
->assertEquals([
'uid' => 2,
'status' => 'open',
'langcode' => 'en',
'dependencies' => [],
'open' => NULL,
'close' => NULL,
'weight' => 0,
'template' => FALSE,
'archive' => FALSE,
'id' => 'webform_5',
'title' => 'Coffee Questionnaire',
'description' => NULL,
'category' => NULL,
'elements' => "brewing_styles:\n '#type': checkboxes\n '#options':\n drip_brew: 'Drip Brew'\n pour_over: 'Pour Over'\n cold_brew: 'Cold Brew'\n espresso: 'Espresso'\n ristretto: 'Ristretto'\n '#multiple': true\n '#title': 'Brewing Styles'\n '#description': \"Brewing styles you like\"\ndrinks:\n '#type': checkboxes\n '#options':\n espresso: 'Espresso (short black)'\n double_espresso: 'Double Espresso (doppio)'\n red_eye: 'Red Eye'\n black_eye: 'Black Eye'\n long_black: 'Long Black'\n macchiato: 'Macchiato'\n long_macchiato: 'Long Macchiato'\n cortado: 'Cortado'\n breve: 'Breve'\n cappuccino: 'Cappuccino'\n flat_white: 'Flat White'\n cafe_latte: 'Cafe Latte'\n mocha: 'Mocha'\n vienna: 'Vienna'\n affogato: 'Affogato'\n cafe_au_lait: 'Cafe au Lait'\n iced_coffee: 'Iced Coffee'\n '#multiple': true\n '#title': 'Drinks'\n '#description': \"Please choose the coffee styles you like\"\n '#required': true\n",
'css' => '',
'javascript' => '',
'settings' => [
'page' => TRUE,
'page_submit_path' => '',
'page_confirm_path' => '',
'wizard_progress_bar' => TRUE,
'preview' => 0,
'draft' => '0',
'draft_auto_save' => FALSE,
'confirmation_type' => 'page',
'confirmation_url' => '',
'confirmation_message' => '',
'limit_total' => NULL,
'limit_user' => 1,
],
'access' => [
'create' => [
'roles' => [
'authenticated',
],
'users' => [],
],
],
'handlers' => [
'email_1' => [
'id' => 'email',
'label' => 'Email 1',
'handler_id' => 'email_1',
'status' => TRUE,
'conditions' => [],
'weight' => 1,
'settings' => [
'to_mail' => 'info@drupal7-webform.localhost',
'from_mail' => 'default',
'from_name' => 'Coffee Questionnaire',
'subject' => 'default',
'body' => 'default',
'html' => FALSE,
'attachments' => FALSE,
'excluded_elements' => [],
'states' => [
'completed',
],
'to_options' => [],
'cc_mail' => '',
'cc_options' => [],
'bcc_mail' => '',
'bcc_options' => [],
'from_options' => [],
'ignore_access' => FALSE,
'exclude_empty' => TRUE,
'exclude_empty_checkbox' => FALSE,
'exclude_attachments' => FALSE,
'twig' => FALSE,
'debug' => FALSE,
'reply_to' => '',
'return_path' => '',
'sender_mail' => '',
'sender_name' => '',
'theme_name' => '',
'parameters' => [],
],
'notes' => '',
],
],
'variants' => [],
], $this
->getImportantEntityProperties($webform));
}