aea6afa7c90ff39a48412557e7a667c352807f9a
[yaffs-website] / web / core / modules / user / tests / src / Kernel / Plugin / migrate / source / d6 / UserPictureTest.php
1 <?php
2
3 namespace Drupal\Tests\user\Kernel\Plugin\migrate\source\d6;
4
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
6
7 /**
8  * Tests the d6_user_picture source plugin.
9  *
10  * @covers \Drupal\user\Plugin\migrate\source\d6\UserPicture
11  * @group user
12  */
13 class UserPictureTest extends MigrateSqlSourceTestBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   public static $modules = ['user', 'migrate_drupal'];
19
20   /**
21    * {@inheritdoc}
22    */
23   public function providerSource() {
24     $tests = [];
25
26     // The source data.
27     $tests[0]['source_data']['users'] = [
28       [
29         'uid' => 1,
30         'access' => 1382835435,
31         'picture' => 'sites/default/files/pictures/picture-1.jpg',
32       ],
33       [
34         'uid' => 2,
35         'access' => 1382835436,
36         'picture' => 'sites/default/files/pictures/picture-2.jpg',
37       ],
38     ];
39
40     // User picture data model is identical in source input and output.
41     $tests[0]['expected_data'] = $tests[0]['source_data']['users'];
42
43     return $tests;
44   }
45
46 }