protected function MediaMigrationAssertionsForMediaSourceTrait::assertMedia5FieldValues in Media Migration 8
Assertions of media 5 (Vimeo 204517230 – Responsive Images).
6 calls to MediaMigrationAssertionsForMediaSourceTrait::assertMedia5FieldValues()
- 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 157
Class
- MediaMigrationAssertionsForMediaSourceTrait
- Trait for media migration tests.
Namespace
Drupal\Tests\media_migration\TraitsCode
protected function assertMedia5FieldValues() {
$media = $this->container
->get('entity_type.manager')
->getStorage('media')
->load(5);
assert($media instanceof MediaInterface);
$this
->assertEquals([
'mid' => [
[
'value' => '5',
],
],
'bundle' => [
[
'target_id' => 'remote_video',
],
],
'name' => [
[
'value' => 'Responsive Images in Drupal 8',
],
],
'uid' => [
[
'target_id' => '1',
],
],
'status' => [
[
'value' => '1',
],
],
'created' => [
[
'value' => '1587730964',
],
],
'field_media_oembed_video' => [
[
'value' => 'https://vimeo.com/204517230',
],
],
], $this
->getImportantEntityProperties($media));
}