class MigrateShortcutSetUsersTest
Same name and namespace in other branches
- 11.x core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php \Drupal\Tests\shortcut\Kernel\Migrate\d7\MigrateShortcutSetUsersTest
- 10 core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php \Drupal\Tests\shortcut\Kernel\Migrate\d7\MigrateShortcutSetUsersTest
- 8.9.x core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php \Drupal\Tests\shortcut\Kernel\Migrate\d7\MigrateShortcutSetUsersTest
Test shortcut_set_users migration.
@group shortcut
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase implements \Drupal\migrate\MigrateMessageInterface extends \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase extends \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait extends \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\shortcut\Kernel\Migrate\d7\MigrateShortcutSetUsersTest extends \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase
- class \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase uses \Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait extends \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase
- class \Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase extends \Drupal\Tests\migrate\Kernel\MigrateTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateTestBase implements \Drupal\migrate\MigrateMessageInterface extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of MigrateShortcutSetUsersTest
File
-
core/
modules/ shortcut/ tests/ src/ Kernel/ Migrate/ d7/ MigrateShortcutSetUsersTest.php, line 13
Namespace
Drupal\Tests\shortcut\Kernel\Migrate\d7View source
class MigrateShortcutSetUsersTest extends MigrateDrupal7TestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'link',
'field',
'shortcut',
'menu_link_content',
];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->installEntitySchema('shortcut');
$this->installEntitySchema('menu_link_content');
$this->installSchema('shortcut', [
'shortcut_set_users',
]);
$this->migrateUsers(FALSE);
$this->executeMigration('d7_shortcut_set');
$this->executeMigration('d7_menu');
$this->executeMigration('d7_shortcut');
$this->executeMigration('d7_shortcut_set_users');
}
/**
* Tests the shortcut set migration.
*/
public function testShortcutSetUsersMigration() {
// Check if migrated user has correct migrated shortcut set assigned.
$account = User::load(2);
$shortcut_set = shortcut_current_displayed_set($account);
/** @var \Drupal\shortcut\ShortcutSetInterface $shortcut_set */
$this->assertSame('shortcut_set_2', $shortcut_set->id());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.