Commit 8aee36fd authored by webchick's avatar webchick

Issue #2557253 by phenaproxima, neclimdul: MigrateFullDrupalTestBase test...

Issue #2557253 by phenaproxima, neclimdul: MigrateFullDrupalTestBase test discovery gobbles all the memory
parent c17a82f9
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to action.settings.yml.
*
* @group action
* @group migrate_drupal_6
*/
class MigrateActionConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to aggregator.settings.yml.
*
* @group aggregator
* @group migrate_drupal_6
*/
class MigrateAggregatorConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to aggregator_feed entities.
*
* @group aggregator
* @group migrate_drupal_6
*/
class MigrateAggregatorFeedTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade aggregator items.
*
* @group aggregator
* @group migrate_drupal_6
*/
class MigrateAggregatorItemTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade block settings to block.block.*.yml.
*
* @group block
* @group migrate_drupal_6
*/
class MigrateBlockTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade custom blocks.
*
* @group block_content
* @group migrate_drupal_6
*/
class MigrateBlockContentTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to book.settings.yml.
*
* @group book
* @group migrate_drupal_6
*/
class MigrateBookConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade book structure.
*
* @group book
* @group migrate_drupal_6
*/
class MigrateBookTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade comments.
*
* @group comment
* @group migrate_drupal_6
*/
class MigrateCommentTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade comment type.
*
* @group comment
* @group migrate_drupal_6
*/
class MigrateCommentTypeTest extends MigrateDrupal6TestBase {
......
......@@ -10,7 +10,7 @@
/**
* Upgrade comment variables to entity.display.node.*.default.yml.
*
* @group comment
* @group migrate_drupal_6
*/
class MigrateCommentVariableEntityDisplayTest extends MigrateCommentVariableDisplayBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade comment subject variable to core.entity_form_display.comment.*.default.yml
*
* @group comment
* @group migrate_drupal_6
*/
class MigrateCommentVariableEntityFormDisplaySubjectTest extends MigrateDrupal6TestBase {
......
......@@ -10,7 +10,7 @@
/**
* Upgrade comment variables to core.entity_form_display.node.*.default.yml.
*
* @group comment
* @group migrate_drupal_6
*/
class MigrateCommentVariableEntityFormDisplayTest extends MigrateCommentVariableDisplayBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade comment variables to field.storage.node.comment.yml.
*
* @group comment
* @group migrate_drupal_6
*/
class MigrateCommentVariableFieldTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade comment variables to field.instance.node.*.comment.yml.
*
* @group comment
* @group migrate_drupal_6
*/
class MigrateCommentVariableInstanceTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Migrate contact categories to contact.form.*.yml.
*
* @group contact
* @group migrate_drupal_6
*/
class MigrateContactCategoryTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to contact.settings.yml.
*
* @group contact
* @group migrate_drupal_6
*/
class MigrateContactConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to dblog.settings.yml.
*
* @group dblog
* @group migrate_drupal_6
*/
class MigrateDblogConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade field formatter settings to entity.display.*.*.yml.
*
* @group field
* @group migrate_drupal_6
*/
class MigrateFieldFormatterSettingsTest extends MigrateDrupal6TestBase {
......
......@@ -14,7 +14,7 @@
/**
* Migrate field instances.
*
* @group field
* @group migrate_drupal_6
*/
class MigrateFieldInstanceTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Migrate fields.
*
* @group field
* @group migrate_drupal_6
*/
class MigrateFieldTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Migrate field widget settings.
*
* @group field
* @group migrate_drupal_6
*/
class MigrateFieldWidgetSettingsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to file.settings.yml.
*
* @group file
* @group migrate_drupal_6
*/
class MigrateFileConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -17,7 +17,7 @@
/**
* file migration.
*
* @group file
* @group migrate_drupal_6
*/
class MigrateFileTest extends MigrateDrupal6TestBase implements MigrateDumpAlterInterface {
......
......@@ -12,7 +12,7 @@
/**
* Upload entity display.
*
* @group file
* @group migrate_drupal_6
*/
class MigrateUploadEntityDisplayTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upload form entity display.
*
* @group file
* @group migrate_drupal_6
*/
class MigrateUploadEntityFormDisplayTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Uploads migration.
*
* @group file
* @group migrate_drupal_6
*/
class MigrateUploadFieldTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upload field instance migration.
*
* @group file
* @group migrate_drupal_6
*/
class MigrateUploadInstanceTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Migrate association data between nodes and files.
*
* @group file
* @group migrate_drupal_6
*/
class MigrateUploadTest extends MigrateUploadBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade variables to filter.formats.*.yml.
*
* @group filter
* @group migrate_drupal_6
*/
class MigrateFilterFormatTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to forum.settings.yml.
*
* @group forum
* @group migrate_drupal_6
*/
class MigrateForumConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to locale.settings.yml.
*
* @group locale
* @group migrate_drupal_6
*/
class MigrateLocaleConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Menu link migration.
*
* @group menu_link_content
* @group migrate_drupal_6
*/
class MigrateMenuLinkTest extends MigrateDrupal6TestBase {
......
......@@ -16,17 +16,11 @@
abstract class MigrateFullDrupalTestBase extends MigrateDrupalTestBase {
/**
* The test class which discovered migration tests must extend in order to be
* included in this test run.
*/
const BASE_TEST_CLASS = 'Drupal\migrate_drupal\Tests\MigrateDrupalTestBase';
/**
* A list of fully-qualified test classes which should be ignored.
* The group to which tests should belong in order for this test to run them.
*
* @var string[]
* @var string
*/
protected static $blacklist = [];
const TEST_GROUP = '';
/**
* Get the test classes that needs to be run for this test.
......@@ -35,20 +29,8 @@ abstract class MigrateFullDrupalTestBase extends MigrateDrupalTestBase {
* The list of fully-classified test class names.
*/
protected function getTestClassesList() {
$classes = [];
$discovery = \Drupal::getContainer()->get('test_discovery');
foreach (static::$modules as $module) {
foreach ($discovery->getTestClasses($module) as $group) {
foreach (array_keys($group) as $class) {
if (is_subclass_of($class, static::BASE_TEST_CLASS)) {
$classes[] = $class;
}
}
}
}
// Exclude blacklisted classes.
return array_diff($classes, static::$blacklist);
$groups = \Drupal::getContainer()->get('test_discovery')->getTestClasses();
return isset($groups[static::TEST_GROUP]) ? array_keys($groups[static::TEST_GROUP]) : [];
}
/**
......
......@@ -13,7 +13,7 @@
/**
* CCK field revision migration.
*
* @group migrate_drupal
* @group migrate_drupal_6
*/
class MigrateCckFieldRevisionTest extends MigrateNodeTestBase {
......
......@@ -14,7 +14,7 @@
/**
* CCK field content migration.
*
* @group migrate_drupal
* @group migrate_drupal_6
*/
class MigrateCckFieldValuesTest extends MigrateNodeTestBase {
......
......@@ -17,11 +17,7 @@
*/
class MigrateDrupal6Test extends MigrateFullDrupalTestBase {
const BASE_TEST_CLASS = 'Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase';
protected static $blacklist = array(
'Drupal\migrate_drupal\Tests\dependencies\MigrateDependenciesTest',
);
const TEST_GROUP = 'migrate_drupal_6';
/**
* Modules to enable.
......@@ -52,6 +48,7 @@ class MigrateDrupal6Test extends MigrateFullDrupalTestBase {
'migrate_drupal',
'node',
'options',
'path',
'search',
'system',
'simpletest',
......
......@@ -10,7 +10,7 @@
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* @group node
* @group migrate_drupal_6
*/
class MigrateNodeBuilderTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Test migrating node settings into the base_field_bundle_override config entity.
*
* @group node
* @group migrate_drupal_6
*/
class MigrateNodeBundleSettingsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to node.settings.yml.
*
* @group node
* @group migrate_drupal_6
*/
class MigrateNodeConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Node content revisions migration.
*
* @group node
* @group migrate_drupal_6
*/
class MigrateNodeRevisionTest extends MigrateNodeTestBase {
......
......@@ -14,7 +14,7 @@
/**
* Node content migration.
*
* @group node
* @group migrate_drupal_6
*/
class MigrateNodeTest extends MigrateNodeTestBase {
......
......@@ -14,7 +14,7 @@
/**
* Upgrade node types to node.type.*.yml.
*
* @group node
* @group migrate_drupal_6
*/
class MigrateNodeTypeTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Migrate view modes.
*
* @group node
* @group migrate_drupal_6
*/
class MigrateViewModesTest extends MigrateDrupal6TestBase {
......
......@@ -15,7 +15,7 @@
/**
* Url alias migration.
*
* @group path
* @group migrate_drupal_6
*/
class MigrateUrlAliasTest extends MigrateDrupal6TestBase {
......
......@@ -14,7 +14,7 @@
/**
* Upgrade search rank settings to search.page.*.yml.
*
* @group search
* @group migrate_drupal_6
*/
class MigrateSearchPageTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to search.settings.yml.
*
* @group search
* @group migrate_drupal_6
*/
class MigrateSearchSettingsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to simpletest.settings.yml.
*
* @group simpletest
* @group migrate_drupal_6
*/
class MigrateSimpletestConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to statistics.settings.yml.
*
* @group statistics
* @group migrate_drupal_6
*/
class MigrateStatisticsConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to syslog.settings.yml.
*
* @group syslog
* @group migrate_drupal_6
*/
class MigrateSyslogConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -14,7 +14,7 @@
/**
* Upgrade date formats to core.date_format.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateDateFormatTest extends MigrateDrupal6TestBase {
......
......@@ -15,7 +15,7 @@
/**
* Upgrade menus to system.menu.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateMenuTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade cron variable to system.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateSystemCronTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade variables to system.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateSystemFileTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade image gd variables to system.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateSystemImageGdTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade image variables to system.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateSystemImageTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade error_level variable to system.logging.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateSystemLoggingTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade maintenance variables to system.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateSystemMaintenanceTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade performance variables to system.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateSystemPerformanceTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade rss variable to system.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateSystemRssTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade site variables to system.*.yml.
*
* @group system
* @group migrate_drupal_6
*/
class MigrateSystemSiteTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade variables to taxonomy.settings.yml.
*
* @group taxonomy
* @group migrate_drupal_6
*/
class MigrateTaxonomyConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Upgrade taxonomy terms.
*
* @group taxonomy
* @group migrate_drupal_6
*/
class MigrateTaxonomyTermTest extends MigrateDrupal6TestBase {
......
......@@ -13,7 +13,7 @@
/**
* Migrate taxonomy vocabularies to taxonomy.vocabulary.*.yml.
*
* @group taxonomy
* @group migrate_drupal_6
*/
class MigrateTaxonomyVocabularyTest extends MigrateDrupal6TestBase {
......
......@@ -12,7 +12,7 @@
/**
* Upgrade taxonomy term node associations.
*
* @group taxonomy
* @group migrate_drupal_6
*/
class MigrateTermNodeRevisionTest extends MigrateTermNodeTestBase {
......