UserPictureInstanceTest.php in Zircon Profile 8
File
core/modules/user/tests/src/Unit/Migrate/UserPictureInstanceTest.php
View source
<?php
namespace Drupal\Tests\user\Unit\Migrate;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
use Drupal\user\Plugin\migrate\source\UserPictureInstance;
class UserPictureInstanceTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = UserPictureInstance::class;
protected $migrationConfiguration = [
'id' => 'test',
'source' => [
'plugin' => 'user_picture_instance',
],
];
protected $expectedResults = array(
array(
'id' => '',
'file_directory' => 'pictures',
'max_filesize' => '128KB',
'max_resolution' => '128x128',
),
);
protected function setUp() {
$this->databaseContents['variable'] = array(
array(
'name' => 'file_directory',
'value' => serialize(NULL),
),
array(
'name' => 'user_picture_file_size',
'value' => serialize(128),
),
array(
'name' => 'user_picture_dimensions',
'value' => serialize('128x128'),
),
);
parent::setUp();
}
}