be55a458d179608f7636c944b87904d021c560bf
[yaffs-website] / web / modules / contrib / video_embed_field / tests / src / Kernel / Drupal6EmfieldMigrationTest.php
1 <?php
2
3 namespace Drupal\Tests\video_embed_field\Kernel;
4
5 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
6
7 /**
8  * Test the Drupal 6 emfield migration.
9  *
10  * @group video_embed_field
11  */
12 class Drupal6EmfieldMigrationTest extends MigrateDrupal6TestBase {
13
14   use EntityLoadTrait;
15
16   /**
17    * {@inheritdoc}
18    */
19   public static $modules = [
20     'video_embed_field',
21   ];
22
23   /**
24    * {@inheritdoc}
25    */
26   protected function getFixtureFilePath() {
27     return __DIR__ . '/../../fixtures/drupal6-emfield-2-x.php.gz';
28   }
29
30   /**
31    * Test the emfield migration.
32    */
33   public function testEmfieldMigration() {
34     $this->migrateContent();
35     $migrated_vimeo = $this->loadEntityByLabel('Vimeo Example');
36     $migrated_youtube = $this->loadEntityByLabel('YouTube Example');
37     $this->assertEquals('https://vimeo.com/21681203', $migrated_vimeo->field_video->value);
38     $this->assertEquals('https://www.youtube.com/watch?v=XgYu7-DQjDQ', $migrated_youtube->field_video->value);
39   }
40
41 }