Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / migrate_drupal_ui / tests / src / Functional / d7 / MigrateUpgrade7Test.php
1 <?php
2
3 namespace Drupal\Tests\migrate_drupal_ui\Functional\d7;
4
5 use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase;
6 use Drupal\user\Entity\User;
7
8 /**
9  * Tests Drupal 7 upgrade using the migrate UI.
10  *
11  * The test method is provided by the MigrateUpgradeTestBase class.
12  *
13  * @group migrate_drupal_ui
14  */
15 class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   public static $modules = ['file'];
21
22   /**
23    * {@inheritdoc}
24    */
25   protected function setUp() {
26     parent::setUp();
27     $this->loadFixture(drupal_get_path('module', 'migrate_drupal') . '/tests/fixtures/drupal7.php');
28   }
29
30   /**
31    * {@inheritdoc}
32    */
33   protected function getSourceBasePath() {
34     return __DIR__ . '/files';
35   }
36
37   /**
38    * {@inheritdoc}
39    */
40   protected function getEntityCounts() {
41     return [
42       'aggregator_item' => 10,
43       'aggregator_feed' => 1,
44       'block' => 25,
45       'block_content' => 1,
46       'block_content_type' => 1,
47       'comment' => 1,
48       'comment_type' => 8,
49       // Module 'language' comes with 'en', 'und', 'zxx'. Migration adds 'is'.
50       'configurable_language' => 4,
51       'contact_form' => 3,
52       'editor' => 2,
53       'field_config' => 53,
54       'field_storage_config' => 40,
55       'file' => 3,
56       'filter_format' => 7,
57       'image_style' => 6,
58       'language_content_settings' => 2,
59       'migration' => 73,
60       'node' => 3,
61       'node_type' => 6,
62       'rdf_mapping' => 7,
63       'search_page' => 2,
64       'shortcut' => 6,
65       'shortcut_set' => 2,
66       'action' => 16,
67       'menu' => 6,
68       'taxonomy_term' => 18,
69       'taxonomy_vocabulary' => 4,
70       'tour' => 4,
71       'user' => 4,
72       'user_role' => 3,
73       'menu_link_content' => 7,
74       'view' => 14,
75       'date_format' => 11,
76       'entity_form_display' => 18,
77       'entity_form_mode' => 1,
78       'entity_view_display' => 29,
79       'entity_view_mode' => 14,
80       'base_field_override' => 9,
81     ];
82   }
83
84   /**
85    * Executes all steps of migrations upgrade.
86    */
87   public function testMigrateUpgrade() {
88     parent::testMigrateUpgrade();
89
90     // Ensure migrated users can log in.
91     $user = User::load(2);
92     $user->passRaw = 'a password';
93     $this->drupalLogin($user);
94   }
95
96 }