You are here

public function WebformMigrateTest::providerWebformMigrations in Webform: Migrate 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/Migrate/d7/WebformMigrateTest.php \Drupal\Tests\webform_migrate\Kernel\Migrate\d7\WebformMigrateTest::providerWebformMigrations()

Data provider for ::testWebformMigrations().

Return value

array The test cases.

File

tests/src/Kernel/Migrate/d7/WebformMigrateTest.php, line 104

Class

WebformMigrateTest
Tests webform migrations.

Namespace

Drupal\Tests\webform_migrate\Kernel\Migrate\d7

Code

public function providerWebformMigrations() {
  $test_cases = [
    'Classic node migration' => [
      'Classic node migration' => TRUE,
    ],
    'Complete node migration' => [
      'Classic node migration' => FALSE,
    ],
  ];

  // Drupal 8.8.x only has 'classic' node migrations.
  // @see https://www.drupal.org/node/3105503
  if (version_compare(\Drupal::VERSION, '8.9', '<')) {
    $test_cases = array_filter($test_cases, function ($test_case) {
      return $test_case['Classic node migration'];
    });
  }
  return $test_cases;
}