protected function WebformMigrateAssertionsTrait::assertWebform4Values in Webform: Migrate 8
Same name and namespace in other branches
- 8.2 tests/src/Traits/WebformMigrateAssertionsTrait.php \Drupal\Tests\webform_migrate\Traits\WebformMigrateAssertionsTrait::assertWebform4Values()
Assertions of the webform_4 configuration entity.
1 call to WebformMigrateAssertionsTrait::assertWebform4Values()
- 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 212
Class
- WebformMigrateAssertionsTrait
- Trait for webform migration tests.
Namespace
Drupal\Tests\webform_migrate\TraitsCode
protected function assertWebform4Values() {
$webform = $this->container
->get('entity_type.manager')
->getStorage('webform')
->load('webform_4');
assert($webform instanceof WebformInterface);
$this
->assertEquals([
'uid' => 1,
'status' => 'open',
'langcode' => 'en',
'dependencies' => [],
'open' => NULL,
'close' => NULL,
'weight' => 0,
'template' => FALSE,
'archive' => FALSE,
'id' => 'webform_4',
'title' => 'A Webform host node with the default "webform" type',
'description' => NULL,
'category' => NULL,
'elements' => "grid:\n '#type': webform_likert\n '#questions':\n 'd7_sitebuild': 'How much you value Drupal 7 in terms of site building capabilities?'\n 'd7_theming': 'How much you value Drupal 7 in terms of theme development?'\n 'd7_backend': 'How much you value Drupal 7 in terms of module development?'\n 'd9_sitebuild': 'How much you value Drupal 8 or Drupal 9 in terms of site building capabilities?'\n 'd9_theming': 'How much you value Drupal 8 or Drupal 9 in terms of theme development?'\n 'd9_backend': 'How much you value Drupal 8 or Drupal 9 in terms of module development?'\n '#answers':\n 'hard': 'Hard'\n 'neutral': 'Not too hard, but can be easier'\n 'easy': 'Easy'\n '#title': 'Grid'\n '#description': \"Please evaluate how Drupal fits your needs\"\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' => 'Webform (default "webform" #1) confirmation message',
'limit_total' => NULL,
'limit_user' => 1,
],
'access' => [
'create' => [
'roles' => [
'anonymous',
'authenticated',
],
'users' => [],
],
],
'handlers' => [],
'variants' => [],
], $this
->getImportantEntityProperties($webform));
}