3 namespace Drupal\Tests\migrate_drupal_ui\Functional\d7;
5 use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeExecuteTestBase;
6 use Drupal\user\Entity\User;
9 * Tests Drupal 7 upgrade using the migrate UI.
11 * The test method is provided by the MigrateUpgradeTestBase class.
13 * @group migrate_drupal_ui
15 class MigrateUpgrade7Test extends MigrateUpgradeExecuteTestBase {
22 public static $modules = [
25 'content_translation',
32 'migration_provider_test',
38 protected function setUp() {
40 $this->loadFixture(drupal_get_path('module', 'migrate_drupal') . '/tests/fixtures/drupal7.php');
46 protected function getSourceBasePath() {
47 return __DIR__ . '/files';
53 protected function getEntityCounts() {
55 'aggregator_item' => 11,
56 'aggregator_feed' => 1,
59 'block_content_type' => 1,
61 // The 'standard' profile provides the 'comment' comment type, and the
62 // migration creates 6 comment types, one per node type.
64 // Module 'language' comes with 'en', 'und', 'zxx'. Migration adds 'is'.
65 'configurable_language' => 4,
69 'field_storage_config' => 46,
73 'language_content_settings' => 2,
83 'taxonomy_term' => 18,
84 'taxonomy_vocabulary' => 4,
88 'menu_link_content' => 8,
91 'entity_form_display' => 17,
92 'entity_form_mode' => 1,
93 'entity_view_display' => 28,
94 'entity_view_mode' => 14,
95 'base_field_override' => 9,
102 protected function getEntityCountsIncremental() {
103 $counts = $this->getEntityCounts();
104 $counts['block_content'] = 2;
105 $counts['comment'] = 2;
107 $counts['menu_link_content'] = 9;
109 $counts['taxonomy_term'] = 19;
117 protected function getAvailablePaths() {
150 // Include modules that do not have an upgrade path and are enabled in the
151 // source database, defined in the $noUpgradePath property
152 // in MigrateUpgradeForm.
170 protected function getMissingPaths() {
175 // These modules are in the missing path list because they are installed
176 // on the source site but they are not installed on the destination site.
184 * Executes all steps of migrations upgrade.
186 public function testMigrateUpgradeExecute() {
187 parent::testMigrateUpgradeExecute();
189 // Ensure migrated users can log in.
190 $user = User::load(2);
191 $user->passRaw = 'a password';
192 $this->drupalLogin($user);