Backup of db before drupal security update
[yaffs-website] / web / core / modules / migrate_drupal_ui / tests / src / Functional / d6 / MigrateUpgrade6Test.php
1 <?php
2
3 namespace Drupal\Tests\migrate_drupal_ui\Functional\d6;
4
5 use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase;
6 use Drupal\user\Entity\User;
7
8 /**
9  * Tests Drupal 6 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 MigrateUpgrade6Test extends MigrateUpgradeTestBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   protected function setUp() {
21     parent::setUp();
22     $this->loadFixture(drupal_get_path('module', 'migrate_drupal') . '/tests/fixtures/drupal6.php');
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   protected function getSourceBasePath() {
29     return __DIR__ . '/files';
30   }
31
32   /**
33    * {@inheritdoc}
34    */
35   protected function getEntityCounts() {
36     return [
37       'aggregator_item' => 1,
38       'aggregator_feed' => 1,
39       'block' => 35,
40       'block_content' => 2,
41       'block_content_type' => 1,
42       'comment' => 3,
43       'comment_type' => 3,
44       'contact_form' => 5,
45       'configurable_language' => 5,
46       'editor' => 2,
47       'field_config' => 73,
48       'field_storage_config' => 48,
49       'file' => 7,
50       'filter_format' => 7,
51       'image_style' => 5,
52       'language_content_settings' => 2,
53       'migration' => 105,
54       'node' => 16,
55       'node_type' => 13,
56       'rdf_mapping' => 7,
57       'search_page' => 2,
58       'shortcut' => 2,
59       'shortcut_set' => 1,
60       'action' => 22,
61       'menu' => 8,
62       'taxonomy_term' => 7,
63       'taxonomy_vocabulary' => 6,
64       'tour' => 4,
65       'user' => 7,
66       'user_role' => 6,
67       'menu_link_content' => 4,
68       'view' => 14,
69       'date_format' => 11,
70       'entity_form_display' => 19,
71       'entity_form_mode' => 1,
72       'entity_view_display' => 43,
73       'entity_view_mode' => 14,
74       'base_field_override' => 38,
75     ];
76   }
77
78   /**
79    * Executes all steps of migrations upgrade.
80    */
81   public function testMigrateUpgrade() {
82     parent::testMigrateUpgrade();
83
84     // Ensure migrated users can log in.
85     $user = User::load(2);
86     $user->passRaw = 'john.doe_pass';
87     $this->drupalLogin($user);
88   }
89
90 }