UserPictureTest.php in Drupal 9
File
core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php
View source
<?php
namespace Drupal\Tests\user\Kernel\Plugin\migrate\source\d6;
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
class UserPictureTest extends MigrateSqlSourceTestBase {
protected static $modules = [
'user',
'migrate_drupal',
];
public function providerSource() {
$tests = [];
$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',
],
];
$tests[0]['expected_data'] = $tests[0]['source_data']['users'];
return $tests;
}
}