3 namespace Drupal\Tests\video_embed_field\Kernel;
5 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
8 * Test the Drupal 7 to 8 video_embed_field migration.
10 * @group video_embed_field
12 class Drupal7MigrationTest extends MigrateDrupal7TestBase {
19 public static $modules = [
35 protected function getFixtureFilePath() {
36 return __DIR__ . '/../../fixtures/drupal7-vef-2-x.php.gz';
42 protected function setUp() {
45 $this->installEntitySchema('node');
46 $this->installEntitySchema('comment');
47 $this->installConfig(static::$modules);
49 $this->executeMigrations([
61 * Test the emfield migration.
63 public function testMigration() {
64 $migrated_vimeo = $this->loadEntityByLabel('Vimeo Example');
65 $migrated_youtube = $this->loadEntityByLabel('YouTube Example');
66 $this->assertEquals('https://vimeo.com/21681203', $migrated_vimeo->field_video->value);
67 $this->assertEquals('https://www.youtube.com/watch?v=XgYu7-DQjDQ', $migrated_youtube->field_video->value);