Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / user / tests / src / Kernel / Migrate / MigrateUserPictureEntityDisplayTest.php
1 <?php
2
3 namespace Drupal\Tests\user\Kernel\Migrate;
4
5 use Drupal\Core\Entity\Entity\EntityViewDisplay;
6 use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
7
8 /**
9  * User picture entity display.
10  *
11  * @group user
12  */
13 class MigrateUserPictureEntityDisplayTest extends MigrateDrupal7TestBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   public static $modules = ['file', 'image'];
19
20   /**
21    * {@inheritdoc}
22    */
23   protected function setUp() {
24     parent::setUp();
25     $this->installEntitySchema('file');
26     $this->executeMigrations([
27       'user_picture_field',
28       'user_picture_field_instance',
29       'user_picture_entity_display',
30     ]);
31   }
32
33   /**
34    * Tests the Drupal 7 user picture to Drupal 8 entity display migration.
35    */
36   public function testUserPictureEntityDisplay() {
37     $component = EntityViewDisplay::load('user.user.default')->getComponent('user_picture');
38     $this->assertIdentical('image', $component['type']);
39     $this->assertIdentical('', $component['settings']['image_style']);
40     $this->assertIdentical('content', $component['settings']['image_link']);
41   }
42
43 }