public function WebformMigrateTestBase::setUp in Webform: Migrate 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/Migrate/d7/WebformMigrateTestBase.php \Drupal\Tests\webform_migrate\Kernel\Migrate\d7\WebformMigrateTestBase::setUp()
Overrides MigrateDrupalTestBase::setUp
File
- tests/
src/ Kernel/ Migrate/ d7/ WebformMigrateTestBase.php, line 32
Class
- WebformMigrateTestBase
- Base class for Webform migration kernel tests.
Namespace
Drupal\Tests\webform_migrate\Kernel\Migrate\d7Code
public function setUp() {
parent::setUp();
$this
->loadFixture($this
->getDatabaseFixtureFilePath());
$module_handler = \Drupal::moduleHandler();
$this
->installEntitySchema('file');
$this
->installSchema('file', 'file_usage');
if ($module_handler
->moduleExists('node')) {
$this
->installEntitySchema('node');
$this
->installSchema('node', 'node_access');
}
if ($module_handler
->moduleExists('comment')) {
$this
->installEntitySchema('comment');
$this
->installSchema('comment', 'comment_entity_statistics');
}
if ($module_handler
->moduleExists('webform')) {
$this
->installEntitySchema('webform_submission');
$this
->installSchema('webform', 'webform');
}
// Webform node assumes that node.body field storage is always present.
// Let's install all default configuration.
$module_list = array_keys($module_handler
->getModuleList());
$this
->installConfig($module_list);
}