Commit 81bb46eb authored by catch's avatar catch

Issue #2889443 by quietone: Some migrations missing a label

parent 9a666c18
<?php
namespace Drupal\Tests\migrate_drupal_ui\Kernel;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\KernelTests\FileSystemModuleDiscoveryDataProviderTrait;
use Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase;
/**
* Tests that labels exist for all migrations.
*
* @group migrate_drupal_ui
*/
class MigrationLabelExistTest extends MigrateDrupalTestBase {
use FileSystemModuleDiscoveryDataProviderTrait;
/**
* Tests that labels exist for all migrations.
*/
public function testLabelExist() {
// Install all available modules.
$module_handler = $this->container->get('module_handler');
$modules = $this->coreModuleListDataProvider();
$modules_enabled = $module_handler->getModuleList();
$modules_to_enable = array_keys(array_diff_key($modules, $modules_enabled));
$this->enableModules($modules_to_enable);
/** @var \Drupal\migrate\Plugin\MigrationPluginManager $plugin_manager */
$plugin_manager = $this->container->get('plugin.manager.migration');
// Get all the migrations
$migrations = $plugin_manager->createInstances(array_keys($plugin_manager->getDefinitions()));
/** @var \Drupal\migrate\Plugin\Migration $migration */
foreach ($migrations as $migration) {
$migration_id = $migration->getPluginId();
$this->assertNotEmpty($migration->label(), new FormattableMarkup('Label found for @migration_id.', ['@migration_id' => $migration_id]));
}
}
}
id: d7_system_authorize
label: Drupal 7 file transfer authorize configuration
migration_tags:
- Drupal 7
source:
......
id: d7_system_date
label: Drupal 7 system date configuration
migration_tags:
- Drupal 7
source:
......
id: d7_system_mail
label: Drupal 7 system mail configuration
migration_tags:
- Drupal 7
source:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment