Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / node / tests / src / Kernel / Migrate / d6 / MigrateNodeTestBase.php
1 <?php
2
3 namespace Drupal\Tests\node\Kernel\Migrate\d6;
4
5 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
6 use Drupal\user\Entity\User;
7
8 /**
9  * Base class for Node migration tests.
10  */
11 abstract class MigrateNodeTestBase extends MigrateDrupal6TestBase {
12
13   /**
14    * {@inheritdoc}
15    */
16   protected function setUp() {
17     parent::setUp();
18
19     $this->installEntitySchema('node');
20     $this->installConfig(['node']);
21     $this->installSchema('node', ['node_access']);
22     $this->installSchema('system', ['sequences']);
23
24     // Create a new user which needs to have UID 1, because that is expected by
25     // the assertions from
26     // \Drupal\migrate_drupal\Tests\d6\MigrateNodeRevisionTest.
27     User::create([
28       'uid' => 1,
29       'name' => $this->randomMachineName(),
30       'status' => 1,
31     ])->enforceIsNew()->save();
32
33     $this->migrateUsers(FALSE);
34     $this->migrateFields();
35     $this->executeMigration('d6_node_settings');
36   }
37
38 }