UserPictureFileTest.php in Zircon Profile 8
File
core/modules/user/tests/src/Unit/Migrate/d6/UserPictureFileTest.php
View source
<?php
namespace Drupal\Tests\user\Unit\Migrate\d6;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
use Drupal\user\Plugin\migrate\source\d6\UserPictureFile;
class UserPictureFileTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = UserPictureFile::class;
protected $migrationConfiguration = array(
'id' => 'test',
'source' => array(
'plugin' => 'd6_user_picture_file',
),
);
protected $expectedResults = array(
array(
'uid' => '2',
'picture' => 'core/modules/simpletest/files/image-test.jpg',
),
);
protected function setUp() {
$this->databaseContents['users'] = array(
array(
'uid' => '2',
'picture' => 'core/modules/simpletest/files/image-test.jpg',
),
array(
'uid' => '15',
'picture' => '',
),
);
parent::setUp();
}
}