function MigrateUserPictureFieldInstanceTest::testUserPictureField

Same name in other branches
  1. 9 core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php \Drupal\Tests\user\Kernel\Migrate\d7\MigrateUserPictureFieldInstanceTest::testUserPictureField()
  2. 10 core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php \Drupal\Tests\user\Kernel\Migrate\d7\MigrateUserPictureFieldInstanceTest::testUserPictureField()
  3. 11.x core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php \Drupal\Tests\user\Kernel\Migrate\d7\MigrateUserPictureFieldInstanceTest::testUserPictureField()

Test the user picture field migration.

File

core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureFieldInstanceTest.php, line 32

Class

MigrateUserPictureFieldInstanceTest
User picture field instance migration.

Namespace

Drupal\Tests\user\Kernel\Migrate\d7

Code

public function testUserPictureField() {
    
    /** @var \Drupal\field\FieldConfigInterface $field */
    $field = FieldConfig::load('user.user.user_picture');
    $this->assertInstanceOf(FieldConfigInterface::class, $field);
    $this->assertIdentical('user', $field->getTargetEntityTypeId());
    $this->assertIdentical('user', $field->getTargetBundle());
    $this->assertIdentical('user_picture', $field->getName());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.