3 namespace Drupal\Tests\node\Kernel\Migrate\d6;
5 use Drupal\Core\Entity\Entity\EntityViewMode;
6 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
11 * @group migrate_drupal_6
13 class MigrateViewModesTest extends MigrateDrupal6TestBase {
18 protected function setUp() {
20 $this->executeMigration('d6_view_modes');
24 * Tests Drupal 6 view modes to Drupal 8 migration.
26 public function testViewModes() {
27 // Test a new view mode.
28 $view_mode = EntityViewMode::load('node.preview');
29 $this->assertIdentical(FALSE, is_null($view_mode), 'Preview view mode loaded.');
30 $this->assertIdentical('Preview', $view_mode->label(), 'View mode has correct label.');
32 $this->assertIdentical(['node', 'preview'], $this->getMigration('d6_view_modes')->getIdMap()->lookupDestinationId([1]));