protected function MediaMigrationAssertionsForMediaSourceTrait::assertMedia4FieldValues in Media Migration 8
Assertions of media 4 (Youtube Apqd4ff0NRI – 2019 Amsterdam Driesnote).
6 calls to MediaMigrationAssertionsForMediaSourceTrait::assertMedia4FieldValues()
- DrushWithCoreMigrationsFromMediaTest::testAllMigrationWithDrush in tests/
src/ Functional/ DrushWithCoreMigrationsFromMediaTest.php - Test all migrations with Drush and Migrate Tools.
- DrushWithCoreMigrationsFromMediaTest::testMigrationWithDrush in tests/
src/ Functional/ DrushWithCoreMigrationsFromMediaTest.php - Test media migrations with Drush and Migrate Tools.
- DrushWithMigrateUpgradeFromMediaTest::testMigrationWithDrush in tests/
src/ Functional/ DrushWithMigrateUpgradeFromMediaTest.php - Tests migrations with Migrate Upgrade, Drush and Migrate Tools.
- MediaMigrationTest::testMediaMigration in tests/
src/ Kernel/ Migrate/ MediaMigrationTest.php - Tests the migration of media entities.
- MediaMigrationWithoutImageTitleTest::testMediaWithoutImageTitleMigration in tests/
src/ Kernel/ Migrate/ MediaMigrationWithoutImageTitleTest.php - Tests the migration of media entities without image title.
File
- tests/
src/ Traits/ MediaMigrationAssertionsForMediaSourceTrait.php, line 135
Class
- MediaMigrationAssertionsForMediaSourceTrait
- Trait for media migration tests.
Namespace
Drupal\Tests\media_migration\TraitsCode
protected function assertMedia4FieldValues() {
$media = $this->container
->get('entity_type.manager')
->getStorage('media')
->load(4);
assert($media instanceof MediaInterface);
$this
->assertEquals([
'mid' => [
[
'value' => '4',
],
],
'bundle' => [
[
'target_id' => 'remote_video',
],
],
'name' => [
[
'value' => 'DrupalCon Amsterdam 2019: Keynote - Driesnote',
],
],
'uid' => [
[
'target_id' => '1',
],
],
'status' => [
[
'value' => '1',
],
],
'created' => [
[
'value' => '1587726087',
],
],
'field_media_oembed_video' => [
[
'value' => 'https://www.youtube.com/watch?v=Apqd4ff0NRI',
],
],
], $this
->getImportantEntityProperties($media));
}