d52453608d19e7ec652e8644ad4f8e92988ed716
[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    * @var bool
18    */
19   protected $strictConfigSchema = FALSE;
20
21   /**
22    * {@inheritdoc}
23    */
24   public static $modules = [
25     'video_embed_field',
26   ];
27
28   /**
29    * {@inheritdoc}
30    */
31   protected function getFixtureFilePath() {
32     return __DIR__ . '/../../fixtures/drupal6-emfield-2-x.php.gz';
33   }
34
35   /**
36    * Test the emfield migration.
37    */
38   public function testEmfieldMigration() {
39     $this->migrateContent();
40     $migrated_vimeo = $this->loadEntityByLabel('Vimeo Example');
41     $migrated_youtube = $this->loadEntityByLabel('YouTube Example');
42     $this->assertEquals('https://vimeo.com/21681203', $migrated_vimeo->field_video->value);
43     $this->assertEquals('https://www.youtube.com/watch?v=XgYu7-DQjDQ', $migrated_youtube->field_video->value);
44   }
45
46 }