public function MigrateViewModesTest::testViewModes in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/node/src/Tests/Migrate/d6/MigrateViewModesTest.php \Drupal\node\Tests\Migrate\d6\MigrateViewModesTest::testViewModes()
Tests Drupal 6 view modes to Drupal 8 migration.
File
- core/
modules/ node/ src/ Tests/ Migrate/ d6/ MigrateViewModesTest.php, line 32 - Contains \Drupal\node\Tests\Migrate\d6\MigrateViewModesTest.
Class
- MigrateViewModesTest
- Migrate view modes.
Namespace
Drupal\node\Tests\Migrate\d6Code
public function testViewModes() {
// Test a new view mode.
$view_mode = EntityViewMode::load('node.preview');
$this
->assertIdentical(FALSE, is_null($view_mode), 'Preview view mode loaded.');
$this
->assertIdentical('Preview', $view_mode
->label(), 'View mode has correct label.');
// Test the ID map.
$this
->assertIdentical(array(
'node',
'preview',
), Migration::load('d6_view_modes')
->getIdMap()
->lookupDestinationID(array(
1,
)));
}