public function MigrateMediaTest::providerTestMediaMigrate in Media Migration 8
Data provider for ::testMediaMigrate().
Return value
array The test cases.
File
- tests/
src/ Functional/ MigrateMediaTest.php, line 192
Class
- MigrateMediaTest
- Tests migration from file entities to media.
Namespace
Drupal\Tests\media_migration\FunctionalCode
public function providerTestMediaMigrate() {
$test_cases = [
'Classic node migration, no initial media types' => [
'Classic node migration' => TRUE,
'Preexisting media types' => FALSE,
],
'Complete node migration, no initial media types' => [
'Classic node migration' => FALSE,
'Preexisting media types' => FALSE,
],
'Classic node migration, preexisting media types' => [
'Classic node migration' => TRUE,
'Preexisting media types' => TRUE,
],
'Complete node migration, preexisting media types' => [
'Classic node migration' => FALSE,
'Preexisting media types' => TRUE,
],
];
// 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;
}