3 namespace Drupal\Tests\migrate_drupal_ui\Functional\d6;
5 use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeExecuteTestBase;
6 use Drupal\user\Entity\User;
9 * Tests Drupal 6 upgrade using the migrate UI.
11 * The test method is provided by the MigrateUpgradeTestBase class.
13 * @group migrate_drupal_ui
15 class MigrateUpgrade6Test extends MigrateUpgradeExecuteTestBase {
22 public static $modules = [
24 'content_translation',
31 'migration_provider_test',
37 protected function setUp() {
39 $this->loadFixture(drupal_get_path('module', 'migrate_drupal') . '/tests/fixtures/drupal6.php');
45 protected function getSourceBasePath() {
46 return __DIR__ . '/files';
52 protected function getEntityCounts() {
54 'aggregator_item' => 1,
55 'aggregator_feed' => 2,
58 'block_content_type' => 1,
60 // The 'standard' profile provides the 'comment' comment type, and the
61 // migration creates 12 comment types, one per node type.
64 'configurable_language' => 5,
67 'field_storage_config' => 58,
71 'language_content_settings' => 2,
74 // The 'book' module provides the 'book' node type, and the migration
75 // creates 12 node types.
84 'taxonomy_vocabulary' => 7,
88 'menu_link_content' => 5,
91 'entity_form_display' => 29,
92 'entity_form_mode' => 1,
93 'entity_view_display' => 53,
94 'entity_view_mode' => 14,
95 'base_field_override' => 38,
102 protected function getEntityCountsIncremental() {
103 $counts = $this->getEntityCounts();
104 $counts['block_content'] = 3;
105 $counts['comment'] = 7;
106 $counts['entity_view_display'] = 53;
107 $counts['entity_view_mode'] = 14;
109 $counts['menu_link_content'] = 6;
110 $counts['node'] = 18;
111 $counts['taxonomy_term'] = 9;
113 $counts['view'] = 16;
120 protected function getAvailablePaths() {
154 // Include modules that do not have an upgrade path and are enabled in the
155 // source database, defined in the $noUpgradePath property
156 // in MigrateUpgradeForm.
173 protected function getMissingPaths() {
179 // This module is in the missing path list because it is installed on the
180 // source site but it is not installed on the destination site.
186 * Executes all steps of migrations upgrade.
188 public function testMigrateUpgradeExecute() {
189 parent::testMigrateUpgradeExecute();
191 // Ensure migrated users can log in.
192 $user = User::load(2);
193 $user->passRaw = 'john.doe_pass';
194 $this->drupalLogin($user);