Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / user / tests / src / Kernel / Migrate / MigrateUserPictureFieldTest.php
1 <?php
2
3 namespace Drupal\Tests\user\Kernel\Migrate;
4
5 use Drupal\field\Entity\FieldStorageConfig;
6 use Drupal\field\FieldStorageConfigInterface;
7 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
8
9 /**
10  * User picture field migration.
11  *
12  * @group user
13  */
14 class MigrateUserPictureFieldTest extends MigrateDrupal7TestBase {
15
16   public static $modules = ['image', 'file'];
17
18   /**
19    * {@inheritdoc}
20    */
21   protected function setUp() {
22     parent::setUp();
23     $this->executeMigration('user_picture_field');
24   }
25
26   /**
27    * Test the user picture field migration.
28    */
29   public function testUserPictureField() {
30     /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */
31     $field_storage = FieldStorageConfig::load('user.user_picture');
32     $this->assertTrue($field_storage instanceof FieldStorageConfigInterface);
33     $this->assertIdentical('user.user_picture', $field_storage->id());
34     $this->assertIdentical('image', $field_storage->getType());
35     $this->assertIdentical('user', $field_storage->getTargetEntityTypeId());
36   }
37
38 }