You are here

public function MigrateUserPictureFieldTest::testUserPictureField in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php \Drupal\Tests\user\Kernel\Migrate\d7\MigrateUserPictureFieldTest::testUserPictureField()

Test the user picture field migration.

File

core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldTest.php, line 29

Class

MigrateUserPictureFieldTest
User picture field migration.

Namespace

Drupal\Tests\user\Kernel\Migrate\d7

Code

public function testUserPictureField() {

  /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */
  $field_storage = FieldStorageConfig::load('user.user_picture');
  $this
    ->assertInstanceOf(FieldStorageConfigInterface::class, $field_storage);
  $this
    ->assertIdentical('user.user_picture', $field_storage
    ->id());
  $this
    ->assertIdentical('image', $field_storage
    ->getType());
  $this
    ->assertIdentical('user', $field_storage
    ->getTargetEntityTypeId());
}