UserPictureTest.php

Same filename in this branch
  1. 10 core/modules/user/tests/src/Functional/UserPictureTest.php
Same filename in other branches
  1. 9 core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php
  2. 9 core/modules/user/tests/src/Functional/UserPictureTest.php
  3. 8.9.x core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php
  4. 8.9.x core/modules/user/tests/src/Functional/UserPictureTest.php
  5. 11.x core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php
  6. 11.x core/modules/user/tests/src/Functional/UserPictureTest.php

Namespace

Drupal\Tests\user\Kernel\Plugin\migrate\source\d6

File

core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\user\Kernel\Plugin\migrate\source\d6;

use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;

/**
 * Tests the d6_user_picture source plugin.
 *
 * @covers \Drupal\user\Plugin\migrate\source\d6\UserPicture
 * @group user
 */
class UserPictureTest extends MigrateSqlSourceTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'user',
        'migrate_drupal',
    ];
    
    /**
     * {@inheritdoc}
     */
    public static function providerSource() {
        $tests = [];
        // The source data.
        $tests[0]['source_data']['users'] = [
            [
                'uid' => 1,
                'access' => 1382835435,
                'picture' => 'sites/default/files/pictures/picture-1.jpg',
            ],
            [
                'uid' => 2,
                'access' => 1382835436,
                'picture' => 'sites/default/files/pictures/picture-2.jpg',
            ],
        ];
        // User picture data model is identical in source input and output.
        $tests[0]['expected_data'] = $tests[0]['source_data']['users'];
        return $tests;
    }

}

Classes

Title Deprecated Summary
UserPictureTest Tests the d6_user_picture source plugin.

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