diff --git a/core/lib/Drupal/Core/Cache/ApcuBackend.php b/core/lib/Drupal/Core/Cache/ApcuBackend.php
index 9bac79e..65f4fb6 100644
--- a/core/lib/Drupal/Core/Cache/ApcuBackend.php
+++ b/core/lib/Drupal/Core/Cache/ApcuBackend.php
@@ -53,6 +53,9 @@ class ApcuBackend implements CacheBackendInterface {
    *   The cache tags checksum provider.
    */
   public function __construct($bin, $site_prefix, CacheTagsChecksumInterface $checksum_provider) {
+    assert('is_string($bin)');
+    assert('is_string($site_prefix)');
+
     $this->bin = $bin;
     $this->sitePrefix = $site_prefix;
     $this->checksumProvider = $checksum_provider;
@@ -69,6 +72,7 @@ public function __construct($bin, $site_prefix, CacheTagsChecksumInterface $chec
    *   The APCu key for the cache item ID.
    */
   protected function getApcuKey($cid) {
+    assert('is_string($cid)');
     return $this->binPrefix . $cid;
   }
 
@@ -76,6 +80,7 @@ protected function getApcuKey($cid) {
    * {@inheritdoc}
    */
   public function get($cid, $allow_invalid = FALSE) {
+    assert('is_string($cid)');
     $cache = apc_fetch($this->getApcuKey($cid));
     return $this->prepareItem($cache, $allow_invalid);
   }
@@ -84,6 +89,7 @@ public function get($cid, $allow_invalid = FALSE) {
    * {@inheritdoc}
    */
   public function getMultiple(&$cids, $allow_invalid = FALSE) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
     // Translate the requested cache item IDs to APCu keys.
     $map = array();
     foreach ($cids as $cid) {
@@ -166,7 +172,8 @@ protected function prepareItem($cache, $allow_invalid) {
    * {@inheritdoc}
    */
   public function set($cid, $data, $expire = CacheBackendInterface::CACHE_PERMANENT, array $tags = array()) {
-    Cache::validateTags($tags);
+    assert('is_string($cid)');
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
     $tags = array_unique($tags);
     $cache = new \stdClass();
     $cache->cid = $cid;
@@ -201,6 +208,7 @@ public function setMultiple(array $items = array()) {
    * {@inheritdoc}
    */
   public function delete($cid) {
+    assert('is_string($cid)');
     apc_delete($this->getApcuKey($cid));
   }
 
@@ -208,6 +216,7 @@ public function delete($cid) {
    * {@inheritdoc}
    */
   public function deleteMultiple(array $cids) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
     apc_delete(array_map(array($this, 'getApcuKey'), $cids));
   }
 
@@ -236,6 +245,7 @@ public function removeBin() {
    * {@inheritdoc}
    */
   public function invalidate($cid) {
+    assert('is_string($cid)');
     $this->invalidateMultiple(array($cid));
   }
 
@@ -243,6 +253,7 @@ public function invalidate($cid) {
    * {@inheritdoc}
    */
   public function invalidateMultiple(array $cids) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
     foreach ($this->getMultiple($cids) as $cache) {
       $this->set($cache->cid, $cache, REQUEST_TIME - 1);
     }
diff --git a/core/lib/Drupal/Core/Cache/Cache.php b/core/lib/Drupal/Core/Cache/Cache.php
index 5ad9500..538c3b9 100644
--- a/core/lib/Drupal/Core/Cache/Cache.php
+++ b/core/lib/Drupal/Core/Cache/Cache.php
@@ -34,7 +34,7 @@ class Cache {
    */
   public static function mergeContexts(array $a = [], array $b = []) {
     $cache_contexts = array_unique(array_merge($a, $b));
-    \Drupal::service('cache_contexts_manager')->validateTokens($cache_contexts);
+    assert('\\Drupal::service(\'cache_contexts_manager\')->assertValidTokens($cache_contexts)');
     sort($cache_contexts);
     return $cache_contexts;
   }
@@ -60,7 +60,7 @@ public static function mergeContexts(array $a = [], array $b = []) {
    */
   public static function mergeTags(array $a = [], array $b = []) {
     $cache_tags = array_unique(array_merge($a, $b));
-    static::validateTags($cache_tags);
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cache_tags)');
     sort($cache_tags);
     return $cache_tags;
   }
@@ -100,6 +100,8 @@ public static function mergeMaxAges($a = Cache::PERMANENT, $b = Cache::PERMANENT
    *   An array of cache tags.
    *
    * @throws \LogicException
+   *
+   * @deprecated use assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
    */
   public static function validateTags(array $tags) {
     if (empty($tags)) {
@@ -129,10 +131,14 @@ public static function validateTags(array $tags) {
    *   An array of cache tags.
    */
   public static function buildTags($prefix, array $suffixes, $glue = ':') {
+    assert('is_string($prefix)');
+    assert('is_string($glue)');
+
     $tags = [];
     foreach ($suffixes as $suffix) {
       $tags[] = $prefix . $glue . $suffix;
     }
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
     return $tags;
   }
 
@@ -143,6 +149,7 @@ public static function buildTags($prefix, array $suffixes, $glue = ':') {
    *   The list of tags to invalidate cache items for.
    */
   public static function invalidateTags(array $tags) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
     \Drupal::service('cache_tags.invalidator')->invalidateTags($tags);
   }
 
diff --git a/core/lib/Drupal/Core/Cache/CacheCollector.php b/core/lib/Drupal/Core/Cache/CacheCollector.php
index a6d8ab5..4453758 100644
--- a/core/lib/Drupal/Core/Cache/CacheCollector.php
+++ b/core/lib/Drupal/Core/Cache/CacheCollector.php
@@ -115,7 +115,7 @@
    *   (optional) The tags to specify for the cache item.
    */
   public function __construct($cid, CacheBackendInterface $cache, LockBackendInterface $lock, array $tags = array()) {
-    Cache::validateTags($tags);
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
     $this->cid = $cid;
     $this->cache = $cache;
     $this->tags = $tags;
@@ -135,6 +135,7 @@ protected function getCid() {
    * {@inheritdoc}
    */
   public function has($key) {
+    assert('is_string($key)');
     // Make sure the value is loaded.
     $this->get($key);
     return isset($this->storage[$key]) || array_key_exists($key, $this->storage);
@@ -144,6 +145,7 @@ public function has($key) {
    * {@inheritdoc}
    */
   public function get($key) {
+    assert('is_string($key)');
     $this->lazyLoadCache();
     if (isset($this->storage[$key]) || array_key_exists($key, $this->storage)) {
       return $this->storage[$key];
@@ -163,6 +165,8 @@ public function get($key) {
    * this behavior, for example by adding a call to persist().
    */
   public function set($key, $value) {
+    assert('is_string($key)');
+
     $this->lazyLoadCache();
     $this->storage[$key] = $value;
     // The key might have been marked for deletion.
@@ -175,6 +179,8 @@ public function set($key, $value) {
    * {@inheritdoc}
    */
   public function delete($key) {
+    assert('is_string($key)');
+
     $this->lazyLoadCache();
     unset($this->storage[$key]);
     $this->keysToRemove[$key] = $key;
diff --git a/core/lib/Drupal/Core/Cache/CacheTagsInvalidator.php b/core/lib/Drupal/Core/Cache/CacheTagsInvalidator.php
index 64a8eb0..899ec44 100644
--- a/core/lib/Drupal/Core/Cache/CacheTagsInvalidator.php
+++ b/core/lib/Drupal/Core/Cache/CacheTagsInvalidator.php
@@ -27,8 +27,7 @@ class CacheTagsInvalidator implements CacheTagsInvalidatorInterface {
    * {@inheritdoc}
    */
   public function invalidateTags(array $tags) {
-    // Validate the tags.
-    Cache::validateTags($tags);
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
 
     // Notify all added cache tags invalidators.
     foreach ($this->invalidators as $invalidator) {
diff --git a/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php b/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
index b01dc9e..60f7f18 100644
--- a/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
+++ b/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
@@ -163,6 +163,8 @@ public function convertTokensToKeys(array $context_tokens) {
    *   A representative subset of the given set of cache context tokens..
    */
   public function optimizeTokens(array $context_tokens) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($context_tokens)');
+
     $optimized_content_tokens = [];
     foreach ($context_tokens as $context_token) {
 
@@ -206,6 +208,8 @@ public function optimizeTokens(array $context_tokens) {
         }
       }
     }
+
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($optimized_content_tokens)');
     return $optimized_content_tokens;
   }
 
@@ -237,6 +241,8 @@ protected function getService($context_id) {
    *     there is no parameter.
    */
   public static function parseTokens(array $context_tokens) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($context_tokens)');
+
     $contexts_with_parameters = [];
     foreach ($context_tokens as $context) {
       $context_id = $context;
@@ -259,6 +265,9 @@ public static function parseTokens(array $context_tokens) {
    *
    * @throws \LogicException
    *
+   * @deprecated Direct invocation of this method is deprecated.
+   *   Use the assert statement to invoke ::assertValidTokens in this class.
+   *
    * @see \Drupal\Core\Cache\Context\CacheContextsManager::parseTokens()
    */
   public function validateTokens(array $context_tokens = []) {
@@ -299,4 +308,19 @@ public function validateTokens(array $context_tokens = []) {
     }
   }
 
+  /**
+   * Assert statement wrapper for ::validateTokens()
+   *
+   * @param string[] $context_tokens
+   *   An array of cache context tokens.
+   */
+  public function assertValidTokens(array $context_tokens = []) {
+    try {
+      $this->validateTokens($context_tokens);
+    } catch ( \LogicException $e) {
+      return FALSE;
+    }
+    return TRUE;
+  }
+
 }
diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php
index 49e830b..31af965 100644
--- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php
+++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php
@@ -52,6 +52,8 @@ class DatabaseBackend implements CacheBackendInterface {
    *   The cache bin for which the object is created.
    */
   public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider, $bin) {
+    assert('is_string($bin)');
+
     // All cache tables should be prefixed with 'cache_'.
     $bin = 'cache_' . $bin;
 
@@ -64,6 +66,7 @@ public function __construct(Connection $connection, CacheTagsChecksumInterface $
    * Implements Drupal\Core\Cache\CacheBackendInterface::get().
    */
   public function get($cid, $allow_invalid = FALSE) {
+    assert('is_string($cid)');
     $cids = array($cid);
     $cache = $this->getMultiple($cids, $allow_invalid);
     return reset($cache);
@@ -73,6 +76,7 @@ public function get($cid, $allow_invalid = FALSE) {
    * Implements Drupal\Core\Cache\CacheBackendInterface::getMultiple().
    */
   public function getMultiple(&$cids, $allow_invalid = FALSE) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
     $cid_mapping = array();
     foreach ($cids as $cid) {
       $cid_mapping[$this->normalizeCid($cid)] = $cid;
@@ -120,6 +124,7 @@ public function getMultiple(&$cids, $allow_invalid = FALSE) {
    *   whether the item is valid, or FALSE if there is no valid item to load.
    */
   protected function prepareItem($cache, $allow_invalid) {
+    assert('is_object($cache)');
     if (!isset($cache->data)) {
       return FALSE;
     }
@@ -150,7 +155,8 @@ protected function prepareItem($cache, $allow_invalid) {
    * Implements Drupal\Core\Cache\CacheBackendInterface::set().
    */
   public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = array()) {
-    Cache::validateTags($tags);
+    assert('is_string($cid)');
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
     $tags = array_unique($tags);
     // Sort the cache tags so that they are stored consistently in the database.
     sort($tags);
@@ -210,7 +216,7 @@ public function setMultiple(array $items) {
         'tags' => array(),
       );
 
-      Cache::validateTags($item['tags']);
+      assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($item[\'tags\'])');
       $item['tags'] = array_unique($item['tags']);
       // Sort the cache tags so that they are stored consistently in the DB.
       sort($item['tags']);
@@ -315,6 +321,7 @@ public function deleteAll() {
    * Implements Drupal\Core\Cache\CacheBackendInterface::invalidate().
    */
   public function invalidate($cid) {
+    assert('is_string($cid)');
     $this->invalidateMultiple(array($cid));
   }
 
@@ -322,6 +329,7 @@ public function invalidate($cid) {
    * Implements Drupal\Core\Cache\CacheBackendInterface::invalidateMultiple().
    */
   public function invalidateMultiple(array $cids) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
     $cids = array_values(array_map(array($this, 'normalizeCid'), $cids));
     try {
       // Update in chunks when a large array is passed.
diff --git a/core/lib/Drupal/Core/Cache/MemoryBackend.php b/core/lib/Drupal/Core/Cache/MemoryBackend.php
index d9bad8d..afd1a7b 100644
--- a/core/lib/Drupal/Core/Cache/MemoryBackend.php
+++ b/core/lib/Drupal/Core/Cache/MemoryBackend.php
@@ -37,6 +37,8 @@ public function __construct($bin) {
    * Implements Drupal\Core\Cache\CacheBackendInterface::get().
    */
   public function get($cid, $allow_invalid = FALSE) {
+    assert('is_string($cid)');
+
     if (isset($this->cache[$cid])) {
       return $this->prepareItem($this->cache[$cid], $allow_invalid);
     }
@@ -49,6 +51,8 @@ public function get($cid, $allow_invalid = FALSE) {
    * Implements Drupal\Core\Cache\CacheBackendInterface::getMultiple().
    */
   public function getMultiple(&$cids, $allow_invalid = FALSE) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
+
     $ret = array();
 
     $items = array_intersect_key($this->cache, array_flip($cids));
@@ -107,7 +111,9 @@ protected function prepareItem($cache, $allow_invalid) {
    * Implements Drupal\Core\Cache\CacheBackendInterface::set().
    */
   public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = array()) {
-    Cache::validateTags($tags);
+    assert('is_string($cid)');
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
+
     $tags = array_unique($tags);
     // Sort the cache tags so that they are stored consistently in the database.
     sort($tags);
@@ -140,6 +146,7 @@ public function delete($cid) {
    * Implements Drupal\Core\Cache\CacheBackendInterface::deleteMultiple().
    */
   public function deleteMultiple(array $cids) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
     $this->cache = array_diff_key($this->cache, array_flip($cids));
   }
 
@@ -154,6 +161,8 @@ public function deleteAll() {
    * Implements Drupal\Core\Cache\CacheBackendInterface::invalidate().
    */
   public function invalidate($cid) {
+    assert('is_string($cid)');
+
     if (isset($this->cache[$cid])) {
       $this->cache[$cid]->expire = $this->getRequestTime() - 1;
     }
@@ -163,6 +172,8 @@ public function invalidate($cid) {
    * Implements Drupal\Core\Cache\CacheBackendInterface::invalidateMultiple().
    */
   public function invalidateMultiple(array $cids) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
+
     foreach ($cids as $cid) {
       $this->cache[$cid]->expire = $this->getRequestTime() - 1;
     }
@@ -172,6 +183,7 @@ public function invalidateMultiple(array $cids) {
    * {@inheritdoc}
    */
   public function invalidateTags(array $tags) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
     foreach ($this->cache as $cid => $item) {
       if (array_intersect($tags, $item->tags)) {
         $this->cache[$cid]->expire = $this->getRequestTime() - 1;
diff --git a/core/lib/Drupal/Core/Cache/PhpBackend.php b/core/lib/Drupal/Core/Cache/PhpBackend.php
index 761e394..61fdbbb 100644
--- a/core/lib/Drupal/Core/Cache/PhpBackend.php
+++ b/core/lib/Drupal/Core/Cache/PhpBackend.php
@@ -51,6 +51,8 @@ class PhpBackend implements CacheBackendInterface {
    *   The cache tags checksum provider.
    */
   public function __construct($bin, CacheTagsChecksumInterface $checksum_provider) {
+    assert('is_string($bin)');
+
     $this->bin = 'cache_' . $bin;
     $this->checksumProvider = $checksum_provider;
   }
@@ -59,6 +61,7 @@ public function __construct($bin, CacheTagsChecksumInterface $checksum_provider)
    * {@inheritdoc}
    */
   public function get($cid, $allow_invalid = FALSE) {
+    assert('is_string($cid)');
     return $this->getByHash($this->normalizeCid($cid), $allow_invalid);
   }
 
@@ -74,6 +77,8 @@ public function get($cid, $allow_invalid = FALSE) {
    * @return bool|mixed
    */
   protected function getByHash($cidhash, $allow_invalid = FALSE) {
+    assert('is_string($cidhash)');
+
     if ($file = $this->storage()->getFullPath($cidhash)) {
       $cache = @include $file;
     }
@@ -96,6 +101,7 @@ public function setMultiple(array $items) {
    * {@inheritdoc}
    */
   public function getMultiple(&$cids, $allow_invalid = FALSE) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
     $ret = array();
 
     foreach ($cids as $cid) {
@@ -148,7 +154,9 @@ protected function prepareItem($cache, $allow_invalid) {
    * {@inheritdoc}
    */
   public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = array()) {
-    Cache::validateTags($tags);
+    assert('is_string($cid)');
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($tags)');
+
     $item = (object) array(
       'cid' => $cid,
       'data' => $data,
@@ -164,6 +172,8 @@ public function set($cid, $data, $expire = Cache::PERMANENT, array $tags = array
    * {@inheritdoc}
    */
   public function delete($cid) {
+    assert('is_string($cid)');
+
     $this->storage()->delete($this->normalizeCid($cid));
   }
 
@@ -171,6 +181,8 @@ public function delete($cid) {
    * {@inheritdoc}
    */
   public function deleteMultiple(array $cids) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
+
     foreach ($cids as $cid) {
       $this->delete($cid);
     }
@@ -187,6 +199,8 @@ public function deleteAll() {
    * {@inheritdoc}
    */
   public function invalidate($cid) {
+    assert('is_string($cid)');
+
     $this->invalidatebyHash($this->normalizeCid($cid));
   }
 
@@ -207,6 +221,8 @@ protected function invalidatebyHash($cidhash) {
    * {@inheritdoc}
    */
   public function invalidateMultiple(array $cids) {
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cids)');
+
     foreach ($cids as $cid) {
       $this->invalidate($cid);
     }
diff --git a/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php b/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php
index 7c8799a..9ce4fc5 100644
--- a/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php
+++ b/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php
@@ -126,6 +126,9 @@ class DefaultPluginManager extends PluginManagerBase implements PluginManagerInt
    *   Defaults to 'Drupal\Component\Annotation\Plugin'.
    */
   public function __construct($subdir, \Traversable $namespaces, ModuleHandlerInterface $module_handler, $plugin_interface = NULL, $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin') {
+    assert('is_string($subdir) || is_bool($subdir)');
+    assert('is_null($plugin_interface) || interface_exists($plugin_interface)');
+
     $this->subdir = $subdir;
     $this->namespaces = $namespaces;
     $this->pluginDefinitionAnnotationName = $plugin_definition_annotation_name;
@@ -154,7 +157,9 @@ public function __construct($subdir, \Traversable $namespaces, ModuleHandlerInte
    *   definitions should be cleared along with other, related cache entries.
    */
   public function setCacheBackend(CacheBackendInterface $cache_backend, $cache_key, array $cache_tags = array()) {
-    Cache::validateTags($cache_tags);
+    assert('is_string($cache_key)');
+    assert('\\Drupal\\Component\\Assertion\\Inspector::assertAllStrings($cache_tags)');
+
     $this->cacheBackend = $cache_backend;
     $this->cacheKey = $cache_key;
     $this->cacheTags = $cache_tags;
@@ -168,6 +173,7 @@ public function setCacheBackend(CacheBackendInterface $cache_backend, $cache_key
    *   hook_mymodule_data_alter() pass in "mymodule_data".
    */
   protected function alterInfo($alter_hook) {
+    assert('is_string($alter_hook)');
     $this->alterHook = $alter_hook;
   }
 
@@ -212,6 +218,7 @@ protected function getCachedDefinitions() {
     if (!isset($this->definitions) && $cache = $this->cacheGet($this->cacheKey)) {
       $this->definitions = $cache->data;
     }
+    assert('is_null($this->definitions) || is_array($this->definitions)');
     return $this->definitions;
   }
 
@@ -221,7 +228,7 @@ protected function getCachedDefinitions() {
    * @param array $definitions
    *   List of definitions to store in cache.
    */
-  protected function setCachedDefinitions($definitions) {
+  protected function setCachedDefinitions(array $definitions) {
     $this->cacheSet($this->cacheKey, $definitions, Cache::PERMANENT, $this->cacheTags);
     $this->definitions = $definitions;
   }
@@ -318,6 +325,7 @@ protected function findDefinitions() {
         unset($definitions[$plugin_id]);
       }
     }
+    assert('is_array($definitions)');
     return $definitions;
   }
 
diff --git a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
index 34abb61..edf6d82 100644
--- a/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
+++ b/core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
@@ -60,9 +60,12 @@ protected function setUp() {
     $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
+    $cache_contexts_manager->method('assertValidTokens')->willReturn(TRUE);
     $container = new ContainerBuilder();
     $container->set('cache_contexts_manager', $cache_contexts_manager);
+
     \Drupal::setContainer($container);
+
   }
 
   /**
diff --git a/core/modules/migrate/config/schema/migrate.destination.schema.yml b/core/modules/migrate/config/schema/migrate.destination.schema.yml
index c622f4c..139164d 100644
--- a/core/modules/migrate/config/schema/migrate.destination.schema.yml
+++ b/core/modules/migrate/config/schema/migrate.destination.schema.yml
@@ -17,6 +17,14 @@ migrate.destination.config:
       type: string
       label: 'Configuration name'
 
+migrate.destination.entity:user:
+  type: migrate_destination
+  label: 'User'
+  mapping:
+    md5_passwords:
+      type: boolean
+      label: 'Passwords'
+
 migrate.destination.entity:file:
   type: migrate_destination
   label: 'Picture'
diff --git a/core/modules/migrate/migrate.services.yml b/core/modules/migrate/migrate.services.yml
index a797c43..c4e52e0 100644
--- a/core/modules/migrate/migrate.services.yml
+++ b/core/modules/migrate/migrate.services.yml
@@ -20,3 +20,6 @@ services:
   plugin.manager.migrate.id_map:
     class: Drupal\migrate\Plugin\MigratePluginManager
     arguments: [id_map, '@container.namespaces', '@cache.discovery', '@module_handler']
+  password_migrate:
+    class: Drupal\migrate\MigratePassword
+    arguments: ['@password_original']
diff --git a/core/modules/migrate/src/MigratePassword.php b/core/modules/migrate/src/MigratePassword.php
new file mode 100644
index 0000000..479aac8
--- /dev/null
+++ b/core/modules/migrate/src/MigratePassword.php
@@ -0,0 +1,84 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate\MigratePassword.
+ */
+
+namespace Drupal\migrate;
+
+use Drupal\Core\Password\PasswordInterface;
+
+/**
+ * Replaces the original 'password' service in order to prefix the MD5 re-hashed
+ * passwords with the 'U' flag. The new salted hash is recreated on first login
+ * similarly to the D6->D7 upgrade path.
+ */
+class MigratePassword implements PasswordInterface {
+
+  /**
+   * The original password service.
+   *
+   * @var \Drupal\Core\Password\PasswordInterface
+   */
+  protected $originalPassword;
+
+  /**
+   * Indicates if MD5 password prefixing is enabled.
+   */
+  protected $enabled = FALSE;
+
+  /**
+   * Builds the replacement password service class.
+   *
+   * @param \Drupal\Core\Password\PasswordInterface $original_password
+   *   The password object.
+   */
+  public function __construct(PasswordInterface $original_password) {
+    $this->originalPassword = $original_password;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function check($password, $hash) {
+    return $this->originalPassword->check($password, $hash);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function needsRehash($hash) {
+    return $this->originalPassword->needsRehash($hash);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function hash($password) {
+    $hash = $this->originalPassword->hash($password);
+
+    // Allow prefixing only if the service was asked to prefix. Check also if
+    // the $password pattern is conforming to a MD5 result.
+    if ($this->enabled && preg_match('/^[0-9a-f]{32}$/', $password)) {
+      $hash = 'U' . $hash;
+    }
+
+    return $hash;
+  }
+
+  /**
+   * Enables the MD5 password prefixing.
+   */
+  public function enableMd5Prefixing() {
+    $this->enabled = TRUE;
+  }
+
+  /**
+   * Disables the MD5 password prefixing.
+   */
+  public function disableMd5Prefixing() {
+    $this->enabled = FALSE;
+  }
+
+}
diff --git a/core/modules/migrate/src/MigrateServiceProvider.php b/core/modules/migrate/src/MigrateServiceProvider.php
new file mode 100644
index 0000000..78a60bb
--- /dev/null
+++ b/core/modules/migrate/src/MigrateServiceProvider.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate\MigrateServiceProvider.
+ */
+
+namespace Drupal\migrate;
+
+use Drupal\Core\DependencyInjection\ServiceModifierInterface;
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+
+/**
+ * Swaps the original 'password' service in order to handle password hashing for
+ * user migrations that have passwords hashed to MD5.
+ *
+ * @see \Drupal\migrate\MigratePassword
+ * @see \Drupal\Core\Password\PhpassHashedPassword
+ */
+class MigrateServiceProvider implements ServiceModifierInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function alter(ContainerBuilder $container) {
+    $container->setDefinition('password_original', $container->getDefinition('password'));
+    $container->setDefinition('password', $container->getDefinition('password_migrate'));
+  }
+
+}
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityUser.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityUser.php
new file mode 100644
index 0000000..786988f
--- /dev/null
+++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityUser.php
@@ -0,0 +1,101 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate\Plugin\migrate\destination\EntityUser.
+ */
+
+namespace Drupal\migrate\Plugin\migrate\destination;
+
+use Drupal\Core\Entity\EntityManagerInterface;
+use Drupal\Core\Entity\EntityStorageInterface;
+use Drupal\Core\Password\PasswordInterface;
+use Drupal\migrate\Entity\MigrationInterface;
+use Drupal\migrate\MigrateException;
+use Drupal\migrate\MigratePassword;
+use Drupal\migrate\Plugin\MigratePluginManager;
+use Drupal\migrate\Row;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+ * @MigrateDestination(
+ *   id = "entity:user"
+ * )
+ */
+class EntityUser extends EntityContentBase {
+
+  /**
+   * The password service class.
+   *
+   * @var \Drupal\Core\Password\PasswordInterface
+   */
+  protected $password;
+
+  /**
+   * Builds an user entity destination.
+   *
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin_id for the plugin instance.
+   * @param mixed $plugin_definition
+   *   The plugin implementation definition.
+   * @param MigrationInterface $migration
+   *   The migration.
+   * @param EntityStorageInterface $storage
+   *   The storage for this entity type.
+   * @param array $bundles
+   *   The list of bundles this entity type has.
+   * @param \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager
+   *   The migrate plugin manager.
+   * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
+   *   The entity manager service.
+   * @param \Drupal\Core\Password\PasswordInterface $password
+   *   The password service.
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, EntityManagerInterface $entity_manager, PasswordInterface $password) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $entity_manager);
+    if (isset($configuration['md5_passwords'])) {
+      $this->password = $password;
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
+    $entity_type = static::getEntityTypeId($plugin_id);
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $migration,
+      $container->get('entity.manager')->getStorage($entity_type),
+      array_keys($container->get('entity.manager')->getBundleInfo($entity_type)),
+      $container->get('entity.manager'),
+      $container->get('password')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   * @throws \Drupal\migrate\MigrateException
+   */
+  public function import(Row $row, array $old_destination_id_values = array()) {
+    if ($this->password) {
+      if ($this->password instanceof MigratePassword) {
+        $this->password->enableMd5Prefixing();
+      }
+      else {
+        throw new MigrateException('Password service has been altered by another module, aborting.');
+      }
+    }
+    $ids = parent::import($row, $old_destination_id_values);
+    if ($this->password) {
+      $this->password->disableMd5Prefixing();
+    }
+
+    return $ids;
+  }
+
+}
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/UserData.php b/core/modules/migrate/src/Plugin/migrate/destination/UserData.php
new file mode 100644
index 0000000..eb16ccd
--- /dev/null
+++ b/core/modules/migrate/src/Plugin/migrate/destination/UserData.php
@@ -0,0 +1,94 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate\Plugin\migrate\destination\UserData.
+ */
+
+namespace Drupal\migrate\Plugin\migrate\destination;
+
+use Drupal\migrate\Entity\MigrationInterface;
+use Drupal\user\UserData as UserDataStorage;
+use Drupal\migrate\Row;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+
+/**
+ * @MigrateDestination(
+ *   id = "user_data"
+ * )
+ */
+class UserData extends DestinationBase implements ContainerFactoryPluginInterface {
+
+  /**
+   * @var \Drupal\user\UserData
+   */
+  protected $userData;
+
+  /**
+   * Builds an user data entity destination.
+   *
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin_id for the plugin instance.
+   * @param mixed $plugin_definition
+   *   The plugin implementation definition.
+   * @param \Drupal\migrate\Entity\MigrationInterface $migration
+   *   The migration.
+   * @param \Drupal\user\UserData $user_data
+   *   The user data service.
+   */
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, UserDataStorage $user_data) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
+    $this->userData = $user_data;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $migration,
+      $container->get('user.data')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function import(Row $row, array $old_destination_id_values = array()) {
+    $uid = $row->getDestinationProperty('uid');
+    $module = $row->getDestinationProperty('module');
+    $key = $row->getDestinationProperty('key');
+    $this->userData->set($module, $uid, $key, $row->getDestinationProperty('settings'));
+
+    return [$uid, $module, $key];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    $ids['uid']['type'] = 'integer';
+    $ids['module']['type'] = 'string';
+    $ids['key']['type'] = 'string';
+    return $ids;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields(MigrationInterface $migration = NULL) {
+    return [
+      'uid' => 'The user id.',
+      'module' => 'The module name responsible for the settings.',
+      'key' => 'The setting key to save under.',
+      'settings' => 'The settings to save.',
+    ];
+  }
+
+}
diff --git a/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml b/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml
index fff9aaa..fdd6b94 100644
--- a/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml
+++ b/core/modules/migrate_drupal/config/schema/migrate_drupal.source.schema.yml
@@ -102,6 +102,14 @@ migrate.source.d6_comment_variable:
       type: migrate_entity_constant
       label: 'Constants'
 
+migrate.source.d6_profile_field:
+  type: migrate_source_sql
+  label: 'Drupal 6 profile field'
+  mapping:
+    constants:
+      type: migrate_entity_constant
+      label: 'Constants'
+
 migrate.source.d6_field_formatter_settings:
   type: migrate_source_sql
   label: 'Drupal 6 field formatter settings'
@@ -134,6 +142,44 @@ migrate.source.d6_field_instance_per_view_mode:
       type: migrate_entity_constant
       label: 'Constants'
 
+migrate.source.d6_user:
+  type: migrate_source_sql
+  label: 'Drupal 6 user'
+  mapping:
+    constants:
+      type: mapping
+      label: 'Constants'
+      mapping:
+        key:
+          type: string
+          label: 'User data key'
+        module:
+          type: string
+          label: 'Module name'
+
+migrate.source.d6_user_picture_file:
+  type: migrate_source_sql
+  label: 'Drupal 6 user picure display'
+  mapping:
+    constants:
+      type: mapping
+      label: 'Constant'
+      mapping:
+        is_public:
+          type: boolean
+          label: 'Public'
+
+migrate.source.d6_user_picture_instance:
+  type: migrate_source_sql
+  label: 'Drupal 6 user picure display'
+  mapping:
+    provider:
+      type: string
+      label: 'Provider'
+    constants:
+      type: migrate_entity_constant
+      label: 'Constants'
+
 migrate_entity_constant:
   type: mapping
   mapping:
diff --git a/core/modules/migrate_drupal/migration_templates/d6_profile_values.yml b/core/modules/migrate_drupal/migration_templates/d6_profile_values.yml
new file mode 100644
index 0000000..d2b81a5
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_profile_values.yml
@@ -0,0 +1,18 @@
+id: d6_profile_values
+label: Drupal 6 profile values
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_profile_field_values
+load:
+  plugin: drupal_entity
+process:
+  uid: uid
+destination:
+  plugin: entity:user
+migration_dependencies:
+  required:
+    - d6_user
+    - d6_user_profile_field_instance
+    - d6_user_profile_entity_display
+    - d6_user_profile_entity_form_display
diff --git a/core/modules/migrate_drupal/migration_templates/d6_upload.yml b/core/modules/migrate_drupal/migration_templates/d6_upload.yml
index 9e672d9..2d04241 100644
--- a/core/modules/migrate_drupal/migration_templates/d6_upload.yml
+++ b/core/modules/migrate_drupal/migration_templates/d6_upload.yml
@@ -25,4 +25,3 @@ migration_dependencies:
   required:
     - d6_file
     - d6_node
-    - d6_upload_field_instance
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user.yml b/core/modules/migrate_drupal/migration_templates/d6_user.yml
new file mode 100644
index 0000000..05ff4a0
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user.yml
@@ -0,0 +1,37 @@
+id: d6_user
+label: Drupal 6 user accounts
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_user
+process:
+  uid: uid
+  name: name
+  pass: pass
+  mail: mail
+  created: created
+  access: access
+  login: login
+  status: status
+  timezone:
+    plugin: user_update_7002
+    source: timezone
+  preferred_langcode: language
+  init: init
+  roles:
+    plugin: migration
+    migration: d6_user_role
+    source: roles
+  user_picture:
+    plugin: d6_user_picture
+    source: uid
+destination:
+  plugin: entity:user
+  md5_passwords: true
+migration_dependencies:
+  required:
+    - d6_user_role
+  optional:
+    - d6_user_picture_file
+    - d6_user_picture_entity_display
+    - d6_user_picture_entity_form_display
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_contact_settings.yml b/core/modules/migrate_drupal/migration_templates/d6_user_contact_settings.yml
new file mode 100644
index 0000000..0429155
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_contact_settings.yml
@@ -0,0 +1,23 @@
+id: d6_user_contact_settings
+label: Drupal 6 user contact settings
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_user
+  constants:
+    key: contact
+    module: contact
+process:
+  uid: uid
+  key: 'constants/key'
+  module: 'constants/module'
+  settings:
+    plugin: skip_row_if_not_set
+    index: contact
+    source: data
+
+destination:
+  plugin: user_data
+migration_dependencies:
+  required:
+    - d6_user
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_mail.yml b/core/modules/migrate_drupal/migration_templates/d6_user_mail.yml
new file mode 100644
index 0000000..bc3badf
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_mail.yml
@@ -0,0 +1,39 @@
+id: d6_user_mail
+label: Drupal 6 user mail configuration
+migration_tags:
+  - Drupal 6
+source:
+  plugin: variable
+  variables:
+    - user_mail_status_activated_subject
+    - user_mail_status_activated_body
+    - user_mail_password_reset_subject
+    - user_mail_password_reset_body
+    - user_mail_status_deleted_subject
+    - user_mail_status_deleted_body
+    - user_mail_register_admin_created_subject
+    - user_mail_register_admin_created_body
+    - user_mail_register_no_approval_required_subject
+    - user_mail_register_no_approval_required_body
+    - user_mail_user_mail_register_pending_approval_subject
+    - user_mail_user_mail_register_pending_approval_body
+    - user_mail_status_blocked_subject
+    - user_mail_status_blocked_body
+process:
+  'status_activated/subject': user_mail_status_activated_subject
+  'status_activated/body': user_mail_status_activated_body
+  'password_reset/subject': user_mail_password_reset_subject
+  'password_reset/body': user_mail_password_reset_body
+  'cancel_confirm/subject': user_mail_status_deleted_subject
+  'cancel_confirm/body': user_mail_status_deleted_body
+  'register_admin_created/subject': user_mail_register_admin_created_subject
+  'register_admin_created/body': user_mail_register_admin_created_body
+  'register_no_approval_required/subject': user_mail_register_no_approval_required_subject
+  'register_no_approval_required/body': user_mail_register_no_approval_required_body
+  'register_pending_approval/subject': user_mail_user_mail_register_pending_approval_subject
+  'register_pending_approval/body': user_mail_user_mail_register_pending_approval_body
+  'status_blocked/subject': user_mail_status_blocked_subject
+  'status_blocked/body': user_mail_status_blocked_body
+destination:
+  plugin: config
+  config_name: user.mail
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_picture_entity_display.yml b/core/modules/migrate_drupal/migration_templates/d6_user_picture_entity_display.yml
new file mode 100644
index 0000000..f38bc36
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_picture_entity_display.yml
@@ -0,0 +1,30 @@
+id: d6_user_picture_entity_display
+label: Drupal 6 user picture display configuration
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_user_picture_instance
+  constants:
+    entity_type: user
+    bundle: user
+    view_mode: default
+    name: user_picture
+    type: image
+    options:
+      label: hidden
+      settings:
+        image_style: ''
+        image_link: content
+process:
+  entity_type: 'constants/entity_type'
+  bundle: 'constants/bundle'
+  view_mode: 'constants/view_mode'
+  field_name: 'constants/name'
+  type: 'constants/type'
+  options: 'constants/options'
+  'options/type': @type
+destination:
+  plugin: component_entity_display
+migration_dependencies:
+  required:
+    - d6_user_picture_field_instance
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_picture_entity_form_display.yml b/core/modules/migrate_drupal/migration_templates/d6_user_picture_entity_form_display.yml
new file mode 100644
index 0000000..4e42228
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_picture_entity_form_display.yml
@@ -0,0 +1,29 @@
+id: d6_user_picture_entity_form_display
+label: Drupal 6 user picture form display configuration
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_user_picture_instance
+  constants:
+    entity_type: user
+    bundle: user
+    form_mode: default
+    name: user_picture
+    type: image_image
+    options:
+      settings:
+        progress_indicator: throbber
+        preview_image_style: thumbnail
+process:
+  entity_type: 'constants/entity_type'
+  bundle: 'constants/bundle'
+  field_name: 'constants/name'
+  form_mode: 'constants/form_mode'
+  type: 'constants/type'
+  options: 'constants/options'
+  'options/type': @type
+destination:
+  plugin: component_entity_form_display
+migration_dependencies:
+  required:
+    - d6_user_picture_field_instance
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_picture_field.yml b/core/modules/migrate_drupal/migration_templates/d6_user_picture_field.yml
new file mode 100644
index 0000000..27a39a2
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_picture_field.yml
@@ -0,0 +1,20 @@
+id: d6_user_picture_field
+label: Drupal 6 user picture field configuration
+migration_tags:
+  - Drupal 6
+source:
+  # We do an empty source and a proper destination to have an idmap for
+  # dependencies.
+  plugin: md_empty
+  constants:
+    entity_type: user
+    type: image
+    name: user_picture
+    cardinality: 1
+process:
+  entity_type: 'constants/entity_type'
+  field_name: 'constants/name'
+  type: 'constants/type'
+  cardinality: 'constants/cardinality'
+destination:
+  plugin: md_entity:field_storage_config
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_picture_field_instance.yml b/core/modules/migrate_drupal/migration_templates/d6_user_picture_field_instance.yml
new file mode 100644
index 0000000..7dc83b1
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_picture_field_instance.yml
@@ -0,0 +1,30 @@
+id: d6_user_picture_field_instance
+label: Drupal 6 user picture field instance configuration
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_user_picture_instance
+  constants:
+    entity_type: user
+    bundle: user
+    name: user_picture
+    settings:
+      file_extensions: 'png gif jpg jpeg'
+      alt_field: false
+      title_field: false
+      min_resolution: ''
+      alt_field_required: false
+      title_field_required: false
+process:
+  entity_type: 'constants/entity_type'
+  bundle: 'constants/bundle'
+  field_name: 'constants/name'
+  settings: 'constants/settings'
+  'settings/file_directory': file_directory
+  'settings/max_filesize': max_filesize
+  'settings/max_resolution': max_resolution
+destination:
+  plugin: entity:field_config
+migration_dependencies:
+  required:
+    - d6_user_picture_field
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_picture_file.yml b/core/modules/migrate_drupal/migration_templates/d6_user_picture_file.yml
new file mode 100644
index 0000000..0bc5a0b
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_picture_file.yml
@@ -0,0 +1,26 @@
+id: d6_user_picture_file
+label: Drupal 6 user pictures
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_user_picture_file
+  constants:
+    is_public: true
+process:
+  filename: filename
+  uid: uid
+  uri:
+    plugin: file_uri
+    source:
+      - picture
+      - file_directory_path
+      - temp_directory_path
+      - 'constants/is_public'
+destination:
+  plugin: entity:file
+  source_path_property: picture
+migration_dependencies:
+  # Every migration that saves into {file_managed} must have the d6_file
+  # migration as an optional dependency to ensure it runs first.
+  optional:
+    - d6_file
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_profile_entity_display.yml b/core/modules/migrate_drupal/migration_templates/d6_user_profile_entity_display.yml
new file mode 100644
index 0000000..3e7b467
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_profile_entity_display.yml
@@ -0,0 +1,40 @@
+id: d6_user_profile_entity_display
+label: Drupal 6 user profile display configuration
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_profile_field
+  constants:
+    entity_type: user
+    bundle: user
+    view_mode: default
+    options:
+      label: hidden
+      settings: {}
+process:
+  entity_type: 'constants/entity_type'
+  bundle: 'constants/bundle'
+  view_mode: 'constants/view_mode'
+  field_name: name
+  type:
+    plugin: static_map
+    source: type
+    map:
+      checkbox: list_default
+      date: datetime_default
+      list: text_default
+      selection: list_default
+      textfield: text_default
+      textarea: text_default
+      url: link_default
+  options: 'constants/options'
+  'options/type': @type
+  hidden:
+    plugin: static_map
+    source: visibility
+    default_value: false
+    map:
+      1: true # PROFILE_PRIVATE
+      4: true # PROFILE_HIDDEN
+destination:
+  plugin: component_entity_display
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_profile_entity_form_display.yml b/core/modules/migrate_drupal/migration_templates/d6_user_profile_entity_form_display.yml
new file mode 100644
index 0000000..d1cde0b
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_profile_entity_form_display.yml
@@ -0,0 +1,49 @@
+id: d6_user_profile_entity_form_display
+label: Drupal 6 user profile form display configuration
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_profile_field
+  constants:
+    empty: {}
+    entity_type: user
+    bundle: user
+    form_mode: default
+process:
+  entity_type: 'constants/entity_type'
+  bundle: 'constants/bundle'
+  field_name: name
+  form_mode: 'constants/form_mode'
+  type:
+    plugin: static_map
+    source: type
+    map:
+      checkbox: boolean_checkbox
+      date: datetime_default
+      list: text_textfield
+      selection: options_select
+      textfield: text_textfield
+      textarea: text_textarea
+      url: link_default
+  options: 'constants/options'
+  'options/type': @type
+  'options/settings':
+    plugin: field_instance_widget_settings
+    source:
+      - @type
+      - 'constants/empty' # we don't have any settings.
+  'options/settings/display_label':  # Single on/off checkboxes need to have display_label = true otherwise their label doesn't show.
+    plugin: static_map
+    default_value: false
+    source: type
+    map:
+      checkbox: true
+  hidden:
+    plugin: static_map
+    source: visibility
+    default_value: false
+    map:
+      1: true # PROFILE_PRIVATE
+      4: true # PROFILE_HIDDEN
+destination:
+  plugin: component_entity_form_display
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_profile_field.yml b/core/modules/migrate_drupal/migration_templates/d6_user_profile_field.yml
new file mode 100644
index 0000000..9917673
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_profile_field.yml
@@ -0,0 +1,34 @@
+id: d6_user_profile_field
+label: Drupal 6 user profile field configuration
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_profile_field
+  constants:
+    entity_type: user
+process:
+  entity_type: 'constants/entity_type'
+  field_name: name
+  type:
+    plugin: static_map
+    source: type
+    map:
+      checkbox: boolean
+      date: datetime
+      list: text
+      selection: list_string
+      textfield: text
+      textarea: text_long
+      url: link
+  settings:
+    plugin: d6_profile_field_settings
+    source: type
+  'settings/allowed_values': options
+  cardinality:
+    plugin: static_map
+    default_value: 1
+    source: type
+    map:
+      list: -1
+destination:
+  plugin: md_entity:field_storage_config
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_profile_field_instance.yml b/core/modules/migrate_drupal/migration_templates/d6_user_profile_field_instance.yml
new file mode 100644
index 0000000..ec0e526
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_profile_field_instance.yml
@@ -0,0 +1,21 @@
+id: d6_user_profile_field_instance
+label: Drupal 6 user profile field instance configuration
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_profile_field
+  constants:
+    entity_type: user
+    bundle: user
+process:
+  entity_type: 'constants/entity_type'
+  bundle: 'constants/bundle'
+  label: title
+  description: explanation
+  field_name: name
+  required: required
+destination:
+  plugin: entity:field_config
+migration_dependencies:
+  required:
+    - d6_user_profile_field
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_role.yml b/core/modules/migrate_drupal/migration_templates/d6_user_role.yml
new file mode 100644
index 0000000..e15058b
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_role.yml
@@ -0,0 +1,46 @@
+id: d6_user_role
+label: Drupal 6 user roles
+migration_tags:
+  - Drupal 6
+source:
+  plugin: d6_user_role
+process:
+  id:
+    -
+      plugin: machine_name
+      source: name
+    -
+      plugin: dedupe_entity
+      entity_type: user_role
+      field: id
+      length: 32
+    -
+      plugin: user_update_8002
+  label: name
+  permissions:
+    -
+      plugin: static_map
+      source: permissions
+      bypass: true
+      map:
+        'use PHP for block visibility': 'use PHP for settings'
+        'administer site-wide contact form': 'administer contact forms'
+        'post comments without approval': 'skip comment approval'
+        'edit own blog entries' : 'edit own blog content'
+        'edit any blog entry' : 'edit any blog content'
+        'delete own blog entries' : 'delete own blog content'
+        'delete any blog entry' : 'delete any blog content'
+        'create forum topics' : 'create forum content'
+        'delete any forum topic' : 'delete any forum content'
+        'delete own forum topics' : 'delete own forum content'
+        'edit any forum topic' : 'edit any forum content'
+        'edit own forum topics' : 'edit own forum content'
+    - plugin: system_update_7000
+    - plugin: node_update_7008
+    - plugin: flatten
+    - plugin: filter_format_permission
+destination:
+  plugin: entity:user_role
+migration_dependencies:
+  required:
+    - d6_filter_format
diff --git a/core/modules/migrate_drupal/migration_templates/d6_user_settings.yml b/core/modules/migrate_drupal/migration_templates/d6_user_settings.yml
new file mode 100644
index 0000000..5984d51
--- /dev/null
+++ b/core/modules/migrate_drupal/migration_templates/d6_user_settings.yml
@@ -0,0 +1,28 @@
+id: d6_user_settings
+label: Drupal 6 user configuration
+migration_tags:
+  - Drupal 6
+source:
+  plugin: variable
+  variables:
+    - user_mail_status_blocked_notify
+    - user_mail_status_activated_notify
+    - user_email_verification
+    - user_register
+    - anonymous
+process:
+  'notify/status_blocked': user_mail_status_blocked_notify
+  'notify/status_activated': user_mail_status_activated_notify
+  verify_mail: user_email_verification
+  register:
+    plugin: static_map
+    source: user_register
+    default_value: visitors_admin_approval
+    map:
+      2: visitors_admin_approval
+      1: user_register
+      0: admin_only
+  anonymous: anonymous
+destination:
+  plugin: config
+  config_name: user.settings
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/ProfileFieldSettings.php b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/ProfileFieldSettings.php
new file mode 100644
index 0000000..4928294
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/ProfileFieldSettings.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\process\d6\ProfileFieldSettings.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\process\d6;
+
+use Drupal\migrate\MigrateExecutableInterface;
+use Drupal\migrate\ProcessPluginBase;
+use Drupal\migrate\Row;
+
+/**
+ * @MigrateProcessPlugin(
+ *   id = "d6_profile_field_settings"
+ * )
+ */
+class ProfileFieldSettings extends ProcessPluginBase {
+
+  /**
+   * {@inheritdoc}
+   *
+   * Set the profile field settings configuration.
+   */
+  public function transform($type, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
+    $settings = array();
+    switch ($type) {
+      case 'date':
+        $settings['datetime_type'] = 'date';
+        break;
+    }
+    return $settings;
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/UserPicture.php b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/UserPicture.php
new file mode 100644
index 0000000..537eacf
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/UserPicture.php
@@ -0,0 +1,63 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\process\d6\UserPicture.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\process\d6;
+
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
+use Drupal\migrate\Entity\MigrationInterface;
+use Drupal\migrate\MigrateExecutableInterface;
+use Drupal\migrate\Plugin\MigrateProcessInterface;
+use Drupal\migrate\ProcessPluginBase;
+use Drupal\migrate\Row;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+ * The user picture process plugin.
+ *
+ * @MigrateProcessPlugin(
+ *   id = "d6_user_picture"
+ * )
+ */
+class UserPicture extends ProcessPluginBase implements ContainerFactoryPluginInterface {
+
+  /**
+   * The migration plugin.
+   *
+   * @var \Drupal\migrate\Plugin\MigrateProcessInterface
+   */
+  protected $migrationPlugin;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, MigrateProcessInterface $migration_plugin) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    $this->migration = $migration;
+    $this->migrationPlugin = $migration_plugin;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $migration,
+      $container->get('plugin.manager.migrate.process')->createInstance('migration', array('migration' => 'd6_user_picture_file'), $migration)
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
+    return $row->getSourceProperty('picture') ? $this->migrationPlugin->transform($value, $migrate_executable, $row, $destination_property) : NULL;
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/UserUpdate7002.php b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/UserUpdate7002.php
new file mode 100644
index 0000000..6424583
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/UserUpdate7002.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\process\d6\UserUpdate7002.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\process\d6;
+
+use Drupal\migrate\MigrateExecutableInterface;
+use Drupal\migrate\ProcessPluginBase;
+use Drupal\migrate\Row;
+
+/**
+ * Converts user time zones from time zone offsets to time zone names.
+ *
+ * @MigrateProcessPlugin(
+ *   id = "user_update_7002"
+ * )
+ */
+class UserUpdate7002 extends ProcessPluginBase {
+
+  /**
+   * System timezones.
+   *
+   * @var array
+   */
+  protected static $timezones;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+    if (!isset(static::$timezones)) {
+      static::$timezones = system_time_zones();
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
+    $timezone = NULL;
+
+    if ($row->hasSourceProperty('timezone_name')) {
+      if (isset(static::$timezones[$row->getSourceProperty('timezone_name')])) {
+        $timezone = $row->getSourceProperty('timezone_name');
+      }
+    }
+    if (!$timezone && $row->hasSourceProperty('event_timezone')) {
+      if (isset(static::$timezones[$row->getSourceProperty('event_timezone')])) {
+        $timezone = $row->getSourceProperty('event_timezone');
+      }
+    }
+
+    return $timezone;
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/UserUpdate8002.php b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/UserUpdate8002.php
new file mode 100644
index 0000000..e9ac311
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/process/d6/UserUpdate8002.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\process\d6\UserUpdate8002.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\process\d6;
+use Drupal\migrate\MigrateExecutableInterface;
+use Drupal\migrate\ProcessPluginBase;
+use Drupal\migrate\Row;
+
+/**
+ * Keep the predefined roles for rid 1 and 2.
+ *
+ * @MigrateProcessPlugin(
+ *   id = "user_update_8002"
+ * )
+ */
+class UserUpdate8002 extends ProcessPluginBase {
+
+  /**
+   * {@inheritdoc}
+   *
+   * Keep the predefined roles for rid 1 and 2.
+   */
+  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
+    $rid = $row->getSourceProperty('rid');
+    $map = array(
+      1 => 'anonymous',
+      2 => 'authenticated',
+    );
+    return isset($map[$rid]) ? $map[$rid] : $value;
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileField.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileField.php
new file mode 100644
index 0000000..a559796
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileField.php
@@ -0,0 +1,101 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\ProfileField.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
+
+use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
+use Drupal\migrate\Row;
+
+/**
+ * Drupal 6 profile fields source from database.
+ *
+ * @MigrateSource(
+ *   id = "d6_profile_field",
+ *   source_provider = "profile"
+ * )
+ */
+class ProfileField extends DrupalSqlBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function query() {
+    $query = $this->select('profile_fields', 'pf')
+      ->fields('pf', array(
+        'fid',
+        'title',
+        'name',
+        'explanation',
+        'category',
+        'page',
+        'type',
+        'weight',
+        'required',
+        'register',
+        'visibility',
+        'autocomplete',
+        'options',
+      ));
+
+    return $query;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function prepareRow(Row $row) {
+    if ($row->getSourceProperty('type') == 'selection') {
+      // Get the current options.
+      $current_options = preg_split("/[\r\n]+/", $row->getSourceProperty('options'));
+      // Select the list values from the profile_values table to ensure we get
+      // them all since they can get out of sync with profile_fields.
+      $options = $this->getDatabase()->query('SELECT DISTINCT value FROM {profile_values} WHERE fid = :fid', array(':fid' => $row->getSourceProperty('fid')))->fetchCol();
+      $options = array_merge($current_options, $options);
+      // array_combine() takes care of any duplicates options.
+      $row->setSourceProperty('options', array_combine($options, $options));
+    }
+
+    if ($row->getSourceProperty('type') == 'checkbox') {
+      // D6 profile checkboxes values are always 0 or 1 (with no labels), so we
+      // need to create two label-less options that will get 0 and 1 for their
+      // keys.
+      $row->setSourceProperty('options', array(NULL, NULL));
+    }
+
+    return parent::prepareRow($row);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    return array(
+      'fid' => $this->t('Primary Key: Unique profile field ID.'),
+      'title' => $this->t('Title of the field shown to the end user.'),
+      'name' => $this->t('Internal name of the field used in the form HTML and URLs.'),
+      'explanation' => $this->t('Explanation of the field to end users.'),
+      'category' => $this->t('Profile category that the field will be grouped under.'),
+      'page' => $this->t("Title of page used for browsing by the field's value"),
+      'type' => $this->t('Type of form field.'),
+      'weight' => $this->t('Weight of field in relation to other profile fields.'),
+      'required' => $this->t('Whether the user is required to enter a value. (0 = no, 1 = yes)'),
+      'register' => $this->t('Whether the field is visible in the user registration form. (1 = yes, 0 = no)'),
+      'visibility' => $this->t('The level of visibility for the field. (0 = hidden, 1 = private, 2 = public on profile but not member list pages, 3 = public on profile and list pages)'),
+      'autocomplete' => $this->t('Whether form auto-completion is enabled. (0 = disabled, 1 = enabled)'),
+      'options' => $this->t('List of options to be used in a list selection field.'),
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    $ids['fid']['type'] = 'integer';
+    return $ids;
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileFieldValues.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileFieldValues.php
new file mode 100644
index 0000000..807ee43
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/ProfileFieldValues.php
@@ -0,0 +1,116 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\ProfileFieldValues.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
+
+
+use Drupal\migrate\Row;
+use Drupal\migrate\Plugin\SourceEntityInterface;
+use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
+
+
+/**
+ * Drupal 6 profile fields values source.
+ *
+ * @MigrateSource(
+ *   id = "d6_profile_field_values",
+ *   source_provider = "profile"
+ * )
+ */
+class ProfileFieldValues extends DrupalSqlBase implements SourceEntityInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function query() {
+    $query = $this->select('profile_values', 'pv')
+      ->distinct()
+      ->fields('pv', array('fid', 'uid'));
+
+    return $query;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function prepareRow(Row $row) {
+    // Find profile values for this row.
+    $query = $this->select('profile_values', 'pv')
+      ->fields('pv', array('fid', 'value'));
+    $query->leftJoin('profile_fields', 'pf', 'pf.fid=pv.fid');
+    $query->fields('pf', array('name', 'type'));
+    $query->condition('uid', $row->getSourceProperty('uid'));
+    $results = $query->execute();
+
+    foreach ($results as $profile_value) {
+      // Check special case for date. We need to unserialize.
+      if ($profile_value['type'] == 'date') {
+        $date = unserialize($profile_value['value']);
+        $date = date('Y-m-d', mktime(0, 0, 0, $date['month'], $date['day'], $date['year']));
+        $row->setSourceProperty($profile_value['name'], array('value' => $date));
+      }
+      elseif ($profile_value['type'] == 'list') {
+        // Explode by newline and comma.
+        $row->setSourceProperty($profile_value['name'], preg_split("/[\r\n,]+/", $profile_value['value']));
+      }
+      else {
+        $row->setSourceProperty($profile_value['name'], array($profile_value['value']));
+      }
+    }
+
+    return parent::prepareRow($row);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    $fields = array(
+      'fid' => $this->t('Unique profile field ID.'),
+      'uid' => $this->t('The user Id.'),
+      'value' => $this->t('The value for this field.'),
+    );
+
+    $query = $this->select('profile_values', 'pv')
+      ->fields('pv', array('fid', 'value'));
+    $query->leftJoin('profile_fields', 'pf', 'pf.fid=pv.fid');
+    $query->fields('pf', array('name', 'title'));
+    $results = $query->execute();
+    foreach ($results as $profile) {
+      $fields[$profile['name']] = $this->t($profile['title']);
+    }
+
+    return $fields;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    return array(
+      'uid' => array(
+        'type' => 'integer',
+        'alias' => 'pv',
+      ),
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function bundleMigrationRequired() {
+    return FALSE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function entityTypeId() {
+    return 'user';
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/Role.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/Role.php
new file mode 100644
index 0000000..31be203
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/Role.php
@@ -0,0 +1,92 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\Role.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
+
+use Drupal\migrate\Row;
+use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
+
+/**
+ * Drupal 6 role source from database.
+ *
+ * @MigrateSource(
+ *   id = "d6_user_role"
+ * )
+ */
+class Role extends DrupalSqlBase {
+
+  /**
+   * List of filter IDs per role IDs.
+   *
+   * @var array
+   */
+  protected $filterPermissions = array();
+
+  /**
+   * {@inheritdoc}
+   */
+  public function query() {
+    $query = $this->select('role', 'r')
+      ->fields('r', array('rid', 'name'))
+      ->orderBy('rid');
+    return $query;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    return array(
+      'rid' => $this->t('Role ID.'),
+      'name' => $this->t('The name of the user role.'),
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function initializeIterator() {
+    $filter_roles = $this->select('filter_formats', 'f')
+      ->fields('f', array('format', 'roles'))
+      ->execute()
+      ->fetchAllKeyed();
+    foreach ($filter_roles as $format => $roles) {
+      // Drupal 6 code: $roles = ','. implode(',', $roles) .',';
+      // Remove the beginning and ending comma.
+      foreach (explode(',', trim($roles, ',')) as $rid) {
+        $this->filterPermissions[$rid][] = $format;
+      }
+    }
+    return parent::initializeIterator();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function prepareRow(Row $row) {
+    $rid = $row->getSourceProperty('rid');
+    $permissions = $this->select('permission', 'p')
+      ->fields('p', array('perm'))
+      ->condition('rid', $rid)
+      ->execute()
+      ->fetchField();
+    $row->setSourceProperty('permissions', explode(', ', $permissions));
+    if (isset($this->filterPermissions[$rid])) {
+      $row->setSourceProperty("filter_permissions:$rid", $this->filterPermissions[$rid]);
+    }
+    return parent::prepareRow($row);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    $ids['rid']['type'] = 'integer';
+    return $ids;
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/User.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/User.php
new file mode 100644
index 0000000..568629b
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/User.php
@@ -0,0 +1,151 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\User.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
+
+use Drupal\migrate\Plugin\SourceEntityInterface;
+use Drupal\migrate\Row;
+use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
+
+/**
+ * Drupal 6 user source from database.
+ *
+ * @MigrateSource(
+ *   id = "d6_user"
+ * )
+ */
+class User extends DrupalSqlBase implements SourceEntityInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function query() {
+    return $this->select('users', 'u')
+      ->fields('u', array_keys($this->baseFields()))
+      ->condition('uid', 1, '>');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    $fields = $this->baseFields();
+
+    // Add roles field.
+    $fields['roles'] = $this->t('Roles');
+
+    // Profile fields.
+    if ($this->moduleExists('profile')) {
+      $fields += $this->select('profile_fields', 'pf')
+        ->fields('pf', array('name', 'title'))
+        ->execute()
+        ->fetchAllKeyed();
+    }
+
+    return $fields;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function prepareRow(Row $row) {
+    // User roles.
+    $roles = $this->select('users_roles', 'ur')
+      ->fields('ur', array('rid'))
+      ->condition('ur.uid', $row->getSourceProperty('uid'))
+      ->execute()
+      ->fetchCol();
+    $row->setSourceProperty('roles', $roles);
+
+    // We are adding here the Event contributed module column.
+    // @see https://api.drupal.org/api/drupal/modules%21user%21user.install/function/user_update_7002/7
+    if ($row->hasSourceProperty('timezone_id') && $row->getSourceProperty('timezone_id')) {
+      if ($this->getDatabase()->schema()->tableExists('event_timezones')) {
+        $event_timezone = $this->select('event_timezones', 'e')
+          ->fields('e', array('name'))
+          ->condition('e.timezone', $row->getSourceProperty('timezone_id'))
+          ->execute()
+          ->fetchField();
+        if ($event_timezone) {
+          $row->setSourceProperty('event_timezone', $event_timezone);
+        }
+      }
+    }
+
+    // Unserialize Data.
+    $row->setSourceProperty('data', unserialize($row->getSourceProperty('data')));
+
+    return parent::prepareRow($row);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    return array(
+      'uid' => array(
+        'type' => 'integer',
+        'alias' => 'u',
+      ),
+    );
+  }
+
+  /**
+   * Returns the user base fields to be migrated.
+   *
+   * @return array
+   *   Associative array having field name as key and description as value.
+   */
+  protected function baseFields() {
+    $fields = array(
+      'uid' => $this->t('User ID'),
+      'name' => $this->t('Username'),
+      'pass' => $this->t('Password'),
+      'mail' => $this->t('Email address'),
+      'signature' => $this->t('Signature'),
+      'signature_format' => $this->t('Signature format'),
+      'created' => $this->t('Registered timestamp'),
+      'access' => $this->t('Last access timestamp'),
+      'login' => $this->t('Last login timestamp'),
+      'status' => $this->t('Status'),
+      'timezone' => $this->t('Timezone'),
+      'language' => $this->t('Language'),
+      'picture' => $this->t('Picture'),
+      'init' => $this->t('Init'),
+      'data' => $this->t('User data'),
+    );
+
+    // Possible field added by Date contributed module.
+    // @see https://api.drupal.org/api/drupal/modules%21user%21user.install/function/user_update_7002/7
+    if ($this->getDatabase()->schema()->fieldExists('users', 'timezone_name')) {
+      $fields['timezone_name'] = $this->t('Timezone (Date)');
+    }
+
+    // Possible field added by Event contributed module.
+    // @see https://api.drupal.org/api/drupal/modules%21user%21user.install/function/user_update_7002/7
+    if ($this->getDatabase()->schema()->fieldExists('users', 'timezone_id')) {
+      $fields['timezone_id'] = $this->t('Timezone (Event)');
+    }
+
+    return $fields;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function bundleMigrationRequired() {
+    return FALSE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function entityTypeId() {
+    return 'user';
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/UserPicture.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/UserPicture.php
new file mode 100644
index 0000000..c45f269
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/UserPicture.php
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\UserPicture.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
+
+use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
+
+/**
+ * Drupal 6 user picture source from database.
+ *
+ * @todo Support default picture?
+ *
+ * @MigrateSource(
+ *   id = "d6_user_picture"
+ * )
+ */
+class UserPicture extends DrupalSqlBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function query() {
+    $query = $this->select('users', 'u')
+      ->condition('picture', '', '<>')
+      ->fields('u', array('uid', 'access', 'picture'))
+      ->orderBy('access');
+    return $query;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    return array(
+      'uid' => 'Primary Key: Unique user ID.',
+      'access' => 'Timestamp for previous time user accessed the site.',
+      'picture' => "Path to the user's uploaded picture.",
+    );
+  }
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    $ids['uid']['type'] = 'integer';
+    return $ids;
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/UserPictureFile.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/UserPictureFile.php
new file mode 100644
index 0000000..a47bab7
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/UserPictureFile.php
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\UserPictureFile.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
+
+use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
+use Drupal\migrate\Row;
+
+/**
+ * Drupal 6 user picture source from database.
+ *
+ * @MigrateSource(
+ *   id = "d6_user_picture_file"
+ * )
+ */
+class UserPictureFile extends DrupalSqlBase {
+
+  /**
+   * The file directory path.
+   *
+   * @var string
+   */
+  protected $filePath;
+
+  /**
+   * The temporary file path.
+   *
+   * @var string
+   */
+  protected $tempFilePath;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function query() {
+    $query = $this->select('users', 'u')
+      ->condition('picture', '', '<>')
+      ->fields('u', array('uid', 'picture'));
+    return $query;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function initializeIterator() {
+    $site_path = isset($this->configuration['site_path']) ? $this->configuration['site_path'] : 'sites/default';
+    $this->filePath = $this->variableGet('file_directory_path', $site_path . '/files') . '/';
+    $this->tempFilePath = $this->variableGet('file_directory_temp', '/tmp') . '/';
+    return parent::initializeIterator();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function prepareRow(Row $row) {
+    $row->setSourceProperty('filename', basename($row->getSourceProperty('picture')));
+    $row->setSourceProperty('file_directory_path', $this->filePath);
+    $row->setSourceProperty('temp_directory_path', $this->tempFilePath);
+    return parent::prepareRow($row);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    return array(
+      'picture' => "Path to the user's uploaded picture.",
+      'filename' => 'The picture filename.',
+    );
+  }
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    $ids['uid']['type'] = 'integer';
+    return $ids;
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/UserPictureInstance.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/UserPictureInstance.php
new file mode 100644
index 0000000..f3a9654
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/UserPictureInstance.php
@@ -0,0 +1,67 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\UserPictureInstance.
+ */
+
+namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
+
+use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
+use Drupal\migrate\Plugin\migrate\source\DummyQueryTrait;
+
+/**
+ * Drupal 6 user picture field instance source.
+ *
+ * @todo Support default picture?
+ *
+ * @MigrateSource(
+ *   id = "d6_user_picture_instance"
+ * )
+ */
+class UserPictureInstance extends DrupalSqlBase {
+
+  use DummyQueryTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function initializeIterator() {
+    return new \ArrayIterator(array(
+      array(
+        'id' => '',
+        'file_directory' => $this->variableGet('user_picture_path', 'pictures'),
+        'max_filesize' => $this->variableGet('user_picture_file_size', '30') . 'KB',
+        'max_resolution' => $this->variableGet('user_picture_dimensions', '85x85'),
+      )));
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function count() {
+    // This source provides a single row, corresponding to a single picture
+    // field to be added to the user entity.
+    return 1;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    return array(
+      'file_directory' => 'The directory to store images..',
+      'max_filesize' => 'The maximum allowed file size in KBs.',
+      'max_resolution' => "The maximum resolution.",
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    $ids['id']['type'] = 'string';
+    return $ids;
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadBase.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadBase.php
index 2f49360..b392116 100644
--- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadBase.php
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadBase.php
@@ -71,10 +71,6 @@ protected function setUp() {
       array(array(1), array(1)),
       array(array(2), array(2)),
     );
-    $id_mappings['d6_upload_field_instance'] = [
-      [['story'], ['node', 'story', 'upload']],
-    ];
-
     $this->prepareMigrations($id_mappings);
     $vids = array(1, 2, 3);
     for ($i = 1; $i <= 2; $i++) {
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserConfigsTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserConfigsTest.php
new file mode 100644
index 0000000..956e444
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserConfigsTest.php
@@ -0,0 +1,65 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserConfigsTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\config\Tests\SchemaCheckTestTrait;
+
+/**
+ * Upgrade variables to user.*.yml.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserConfigsTest extends MigrateDrupal6TestBase {
+
+  use SchemaCheckTestTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->loadDumps(['Variable.php']);
+    $this->executeMigration('d6_user_mail');
+    $this->executeMigration('d6_user_settings');
+  }
+
+  /**
+   * Tests migration of user variables to user.mail.yml.
+   */
+  public function testUserMail() {
+    $config = $this->config('user.mail');
+    $this->assertIdentical('Account details for !username at !site (approved)', $config->get('status_activated.subject'));
+    $this->assertIdentical("!username,\n\nYour account at !site has been activated.\n\nYou may now log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\nOnce you have set your own password, you will be able to log in to !login_uri in the future using:\n\nusername: !username\n", $config->get('status_activated.body'));
+    $this->assertIdentical('Replacement login information for !username at !site', $config->get('password_reset.subject'));
+    $this->assertIdentical("!username,\n\nA request to reset the password for your account has been made at !site.\n\nYou may now log in to !uri_brief by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.", $config->get('password_reset.body'));
+    $this->assertIdentical('Account details for !username at !site (deleted)', $config->get('cancel_confirm.subject'));
+    $this->assertIdentical("!username,\n\nYour account on !site has been deleted.", $config->get('cancel_confirm.body'));
+    $this->assertIdentical('An administrator created an account for you at !site', $config->get('register_admin_created.subject'));
+    $this->assertIdentical("!username,\n\nA site administrator at !site has created an account for you. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n--  !site team", $config->get('register_admin_created.body'));
+    $this->assertIdentical('Account details for !username at !site', $config->get('register_no_approval_required.subject'));
+    $this->assertIdentical("!username,\n\nThank you for registering at !site. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n--  !site team", $config->get('register_no_approval_required.body'));
+    $this->assertIdentical('Account details for !username at !site (pending admin approval)', $config->get('register_pending_approval.subject'));
+    $this->assertIdentical("!username,\n\nThank you for registering at !site. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n--  !site team", $config->get('register_pending_approval.body'));
+    $this->assertIdentical('Account details for !username at !site (blocked)', $config->get('status_blocked.subject'));
+    $this->assertIdentical("!username,\n\nYour account on !site has been blocked.", $config->get('status_blocked.body'));
+    $this->assertConfigSchema(\Drupal::service('config.typed'), 'user.mail', $config->get());
+  }
+
+  /**
+   * Tests migration of user variables to user.settings.yml.
+   */
+  public function testUserSettings() {
+    $config = $this->config('user.settings');
+    $this->assertIdentical(TRUE, $config->get('notify.status_blocked'));
+    $this->assertIdentical(FALSE, $config->get('notify.status_activated'));
+    $this->assertIdentical(FALSE, $config->get('verify_mail'));
+    $this->assertIdentical('admin_only', $config->get('register'));
+    $this->assertIdentical('Guest', $config->get('anonymous'));
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserContactSettingsTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserContactSettingsTest.php
new file mode 100644
index 0000000..355b43e
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserContactSettingsTest.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserContactSettingsTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+/**
+ * Users contact settings migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserContactSettingsTest extends MigrateDrupal6TestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['contact'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->installSchema('user', array('users_data'));
+
+    $this->loadDumps([
+      'Users.php',
+      'ProfileValues.php',
+      'UsersRoles.php',
+      'EventTimezones.php',
+    ]);
+
+    $id_mappings = array(
+      'd6_user' => array(
+        array(array(2), array(2)),
+        array(array(8), array(8)),
+        array(array(15), array(15)),
+      ),
+    );
+    $this->prepareMigrations($id_mappings);
+
+    $this->executeMigration('d6_user_contact_settings');
+  }
+
+  /**
+   * Tests the Drupal6 user contact settings migration.
+   */
+  public function testUserContactSettings() {
+    $user_data = \Drupal::service('user.data');
+    $module = $key = 'contact';
+    $uid = 2;
+    $setting = $user_data->get($module, $uid, $key);
+    $this->assertIdentical('1', $setting);
+
+    $uid = 8;
+    $setting = $user_data->get($module, $uid, $key);
+    $this->assertIdentical('0', $setting);
+
+    $uid = 15;
+    $setting = $user_data->get($module, $uid, $key);
+    $this->assertIdentical(NULL, $setting);
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityDisplayTest.php
new file mode 100644
index 0000000..3a9effb
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityDisplayTest.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureEntityDisplayTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+/**
+ * User picture entity display.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserPictureEntityDisplayTest extends MigrateDrupal6TestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  static $modules = array('image');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $id_mappings = array(
+      'd6_user_picture_field_instance' => array(
+        array(array(1), array('user', 'user', 'user_picture')),
+      ),
+    );
+    $this->prepareMigrations($id_mappings);
+    $this->executeMigration('d6_user_picture_entity_display');
+  }
+
+  /**
+   * Tests the Drupal 6 user picture to Drupal 8 entity display migration.
+   */
+  public function testUserPictureEntityDisplay() {
+    $display = entity_get_display('user', 'user', 'default');
+    $component = $display->getComponent('user_picture');
+    $this->assertIdentical('image', $component['type']);
+    $this->assertIdentical('content', $component['settings']['image_link']);
+
+    $this->assertIdentical(array('user', 'user', 'default', 'user_picture'), entity_load('migration', 'd6_user_picture_entity_display')->getIdMap()->lookupDestinationID(array('')));
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityFormDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityFormDisplayTest.php
new file mode 100644
index 0000000..ebbd0f9
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityFormDisplayTest.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureEntityFormDisplayTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+/**
+ * User picture entity form display.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserPictureEntityFormDisplayTest extends MigrateDrupal6TestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  static $modules = array('image');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $id_mappings = array(
+      'd6_user_picture_field_instance' => array(
+        array(array(1), array('user', 'user', 'user_picture')),
+      ),
+    );
+    $this->prepareMigrations($id_mappings);
+    $this->executeMigration('d6_user_picture_entity_form_display');
+  }
+
+  /**
+   * Tests the Drupal 6 user picture to Drupal 8 entity form display migration.
+   */
+  public function testUserPictureEntityFormDisplay() {
+    $display = entity_get_form_display('user', 'user', 'default');
+    $component = $display->getComponent('user_picture');
+    $this->assertIdentical('image_image', $component['type']);
+    $this->assertIdentical('throbber', $component['settings']['progress_indicator']);
+
+    $this->assertIdentical(array('user', 'user', 'default', 'user_picture'), entity_load('migration', 'd6_user_picture_entity_form_display')->getIdMap()->lookupDestinationID(array('')));
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFieldTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFieldTest.php
new file mode 100644
index 0000000..aebf590
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFieldTest.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureFieldTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\field\Entity\FieldStorageConfig;
+
+/**
+ * User picture field migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserPictureFieldTest extends MigrateDrupal6TestBase {
+
+  static $modules = array('image', 'file');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->executeMigration('d6_user_picture_field');
+  }
+
+  /**
+   * Test the user picture field migration.
+   */
+  public function testUserPictureField() {
+    $field_storage = FieldStorageConfig::load('user.user_picture');
+    $this->assertIdentical('user.user_picture', $field_storage->id());
+    $this->assertIdentical(array('user', 'user_picture'), entity_load('migration', 'd6_user_picture_field')->getIdMap()->lookupDestinationID(array('')));
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFileTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFileTest.php
new file mode 100644
index 0000000..fe17626
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFileTest.php
@@ -0,0 +1,72 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureFileTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\file\Entity\File;
+
+/**
+ * User pictures migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserPictureFileTest extends MigrateDrupal6TestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('file');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->installEntitySchema('file');
+    $this->loadDumps([
+      'Users.php',
+      'ProfileValues.php',
+      'UsersRoles.php',
+      'EventTimezones.php',
+    ]);
+
+    /** @var \Drupal\migrate\Entity\MigrationInterface $migration */
+    $migration = entity_load('migration', 'd6_user_picture_file');
+    $source = $migration->get('source');
+    $source['site_path'] = 'core/modules/simpletest';
+    $migration->set('source', $source);
+    $this->executeMigration($migration);
+  }
+
+  /**
+   * Tests the Drupal 6 user pictures to Drupal 8 migration.
+   */
+  public function testUserPictures() {
+    $file_ids = array();
+    foreach (entity_load('migration', 'd6_user_picture_file')->getIdMap() as $destination_ids) {
+      $file_ids[] = reset($destination_ids);
+    }
+    $files = File::loadMultiple($file_ids);
+    /** @var \Drupal\file\FileInterface $file */
+    $file = array_shift($files);
+    $this->assertIdentical('image-test.jpg', $file->getFilename());
+    $this->assertIdentical('public://image-test.jpg', $file->getFileUri());
+    $this->assertIdentical('2', $file->getOwnerId());
+    $this->assertIdentical('1901', $file->getSize());
+    $this->assertIdentical('image/jpeg', $file->getMimeType());
+
+    $file = array_shift($files);
+    $this->assertIdentical('image-test.png', $file->getFilename());
+    $this->assertIdentical('public://image-test.png', $file->getFileUri());
+    $this->assertIdentical('8', $file->getOwnerId());
+    $this->assertFalse($files);
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureInstanceTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureInstanceTest.php
new file mode 100644
index 0000000..aac48e1
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureInstanceTest.php
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureInstanceTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\field\Entity\FieldConfig;
+
+/**
+ * User picture field instance migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserPictureInstanceTest extends MigrateDrupal6TestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  static $modules = array('image', 'file');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    // Add some node mappings to get past checkRequirements().
+    $id_mappings = array(
+      'd6_user_picture_field' => array(
+        array(array('user_upload'), array('name', 'bundle')),
+      ),
+    );
+    $this->prepareMigrations($id_mappings);
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'user_picture',
+      'type' => 'image',
+      'translatable' => '0',
+    ))->save();
+
+    $this->executeMigration('d6_user_picture_field_instance');
+  }
+
+  /**
+   * Tests the Drupal 6 user picture to Drupal 8 picture field instance migration.
+   */
+  public function testUserPictureFieldInstance() {
+    $field = FieldConfig::load('user.user.user_picture');
+    $settings = $field->getSettings();
+    $this->assertIdentical('png gif jpg jpeg', $settings['file_extensions']);
+    $this->assertIdentical('pictures', $settings['file_directory']);
+    $this->assertIdentical('30KB', $settings['max_filesize']);
+    $this->assertIdentical('85x85', $settings['max_resolution']);
+
+    $this->assertIdentical(array('user', 'user', 'user_picture'), entity_load('migration', 'd6_user_picture_field_instance')->getIdMap()->lookupDestinationID(array('')));
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php
new file mode 100644
index 0000000..b38f2b7
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php
@@ -0,0 +1,127 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileEntityDisplayTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\Core\Database\Database;
+
+/**
+ * Tests the user profile entity display migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserProfileEntityDisplayTest extends MigrateDrupal6TestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  static $modules = array('link', 'options', 'datetime', 'text');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    // Create some fields so the data gets stored.
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_color',
+      'type' => 'text',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_biography',
+      'type' => 'text_long',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_sell_address',
+      'type' => 'boolean',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_sold_to',
+      'type' => 'list_string',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_bands',
+      'type' => 'text',
+      'cardinality' => -1,
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_blog',
+      'type' => 'link',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_birthdate',
+      'type' => 'datetime',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_love_migrations',
+      'type' => 'boolean',
+    ))->save();
+
+    $this->loadDumps([
+      'ProfileFields.php',
+      'Users.php',
+      'ProfileValues.php',
+      'UsersRoles.php',
+      'EventTimezones.php',
+    ]);
+
+    $field_data = Database::getConnection('default', 'migrate')
+      ->select('profile_fields', 'u')
+      ->fields('u')
+      ->execute()
+      ->fetchAll();
+    foreach ($field_data as $field) {
+      entity_create('field_config', array(
+        'label' => $field->title,
+        'description' => '',
+        'field_name' => $field->name,
+        'entity_type' => 'user',
+        'bundle' => 'user',
+        'required' => 1,
+      ))->save();
+    }
+
+    $this->executeMigration('d6_user_profile_entity_display');
+  }
+
+  /**
+   * Tests migration of user profile fields.
+   */
+  public function testUserProfileFields() {
+    $display = entity_get_display('user', 'user', 'default');
+
+    // Test a text field.
+    $component = $display->getComponent('profile_color');
+    $this->assertIdentical('text_default', $component['type']);
+
+    // Test a list field.
+    $component = $display->getComponent('profile_bands');
+    $this->assertIdentical('text_default', $component['type']);
+
+    // Test a date field.
+    $component = $display->getComponent('profile_birthdate');
+    $this->assertIdentical('datetime_default', $component['type']);
+
+    // Test PROFILE_PRIVATE field is hidden.
+    $this->assertNull($display->getComponent('profile_sell_address'));
+
+    // Test PROFILE_HIDDEN field is hidden.
+    $this->assertNull($display->getComponent('profile_sold_to'));
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php
new file mode 100644
index 0000000..d088289
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php
@@ -0,0 +1,127 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileEntityFormDisplayTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\Core\Database\Database;
+
+/**
+ * Tests the user profile entity form display migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserProfileEntityFormDisplayTest extends MigrateDrupal6TestBase {
+
+  static $modules = array('link', 'options', 'datetime', 'text');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    // Create some fields so the data gets stored.
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_color',
+      'type' => 'text',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_biography',
+      'type' => 'text_long',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_sell_address',
+      'type' => 'boolean',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_sold_to',
+      'type' => 'list_string',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_bands',
+      'type' => 'text',
+      'cardinality' => -1,
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_blog',
+      'type' => 'link',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_birthdate',
+      'type' => 'datetime',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_love_migrations',
+      'type' => 'boolean',
+    ))->save();
+
+    $this->loadDumps([
+      'ProfileFields.php',
+      'Users.php',
+      'ProfileValues.php',
+      'UsersRoles.php',
+      'EventTimezones.php',
+    ]);
+
+    $field_data = Database::getConnection('default', 'migrate')
+      ->select('profile_fields', 'u')
+      ->fields('u')
+      ->execute()
+      ->fetchAll();
+    foreach ($field_data as $field) {
+      entity_create('field_config', array(
+        'label' => $field->title,
+        'description' => '',
+        'field_name' => $field->name,
+        'entity_type' => 'user',
+        'bundle' => 'user',
+        'required' => 1,
+      ))->save();
+    }
+
+    $this->executeMigration('d6_user_profile_entity_form_display');
+  }
+
+  /**
+   * Tests migration of user profile fields.
+   */
+  public function testUserProfileEntityFormDisplay() {
+    $display = entity_get_form_display('user', 'user', 'default');
+
+    // Test a text field.
+    $component = $display->getComponent('profile_color');
+    $this->assertIdentical('text_textfield', $component['type']);
+
+    // Test a list field.
+    $component = $display->getComponent('profile_bands');
+    $this->assertIdentical('text_textfield', $component['type']);
+
+    // Test a date field.
+    $component = $display->getComponent('profile_birthdate');
+    $this->assertIdentical('datetime_default', $component['type']);
+
+    // Test PROFILE_PRIVATE field is hidden.
+    $this->assertNull($display->getComponent('profile_sell_address'));
+
+    // Test PROFILE_HIDDEN field is hidden.
+    $this->assertNull($display->getComponent('profile_sold_to'));
+
+    // Test that a checkbox field has the proper display label setting.
+    $component = $display->getComponent('profile_love_migrations');
+    $this->assertIdentical('boolean_checkbox', $component['type']);
+    $this->assertIdentical(true, $component['settings']['display_label']);
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php
new file mode 100644
index 0000000..cb834d7
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php
@@ -0,0 +1,114 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileFieldInstanceTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\field\Entity\FieldConfig;
+
+/**
+ * Tests the user profile field instance migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserProfileFieldInstanceTest extends MigrateDrupal6TestBase {
+
+  static $modules = array('field', 'link', 'options', 'datetime', 'text');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    // Add some id mappings for the dependant migrations.
+    $id_mappings = array(
+      'd6_user_profile_field' => array(
+        array(array(1), array('user', 'profile_color')),
+      ),
+    );
+    $this->prepareMigrations($id_mappings);
+    $this->createFields();
+    $this->loadDumps(array(
+      'ProfileFields.php',
+      'Users.php',
+      'ProfileValues.php',
+      'UsersRoles.php',
+      'EventTimezones.php',
+    ));
+    $this->executeMigration('d6_user_profile_field_instance');
+  }
+
+  /**
+   * Tests migration of user profile fields.
+   */
+  public function testUserProfileFields() {
+    // Migrated a text field.
+    $field = FieldConfig::load('user.user.profile_color');
+    $this->assertIdentical('Favorite color', $field->label());
+    $this->assertIdentical('List your favorite color', $field->getDescription());
+
+    // Migrated a textarea.
+    $field = FieldConfig::load('user.user.profile_biography');
+    $this->assertIdentical('Biography', $field->label());
+    $this->assertIdentical('Tell people a little bit about yourself', $field->getDescription());
+
+    // Migrated checkbox field.
+    $field = FieldConfig::load('user.user.profile_sell_address');
+    $this->assertIdentical('Sell your email address?', $field->label());
+    $this->assertIdentical("If you check this box, we'll sell your address to spammers to help line the pockets of our shareholders. Thanks!", $field->getDescription());
+
+    // Migrated selection field.
+    $field = FieldConfig::load('user.user.profile_sold_to');
+    $this->assertIdentical('Sales Category', $field->label());
+    $this->assertIdentical("Select the sales categories to which this user's address was sold.", $field->getDescription());
+
+    // Migrated list field.
+    $field = FieldConfig::load('user.user.profile_bands');
+    $this->assertIdentical('Favorite bands', $field->label());
+    $this->assertIdentical("Enter your favorite bands. When you've saved your profile, you'll be able to find other people with the same favorites.", $field->getDescription());
+
+/*
+    // Migrated URL field.
+    $field = FieldConfig::load('user.user.profile_blog');
+    $this->assertIdentical('Your blog', $field->label());
+    $this->assertIdentical("Paste the full URL, $field->getDescription(), including http://, of your personal blog.");
+*/
+
+    // Migrated date field.
+    $field = FieldConfig::load('user.user.profile_birthdate');
+    $this->assertIdentical('Birthdate', $field->label());
+    $this->assertIdentical("Enter your birth date and we'll send you a coupon.", $field->getDescription());
+
+    // Another migrated checkbox field, with a different source visibility setting.
+    $field = FieldConfig::load('user.user.profile_love_migrations');
+    $this->assertIdentical('I love migrations', $field->label());
+    $this->assertIdentical("If you check this box, you love migrations.", $field->getDescription());
+  }
+
+  /**
+   * Helper to create fields.
+   */
+  protected function createFields() {
+    $fields = array(
+      'profile_color' => 'text',
+      'profile_biography' => 'text_long',
+      'profile_sell_address' => 'boolean',
+      'profile_sold_to' => 'list_string',
+      'profile_bands' => 'text',
+      'profile_blog' => 'link',
+      'profile_birthdate' => 'datetime',
+      'profile_love_migrations' => 'boolean',
+    );
+    foreach ($fields as $name => $type) {
+      entity_create('field_storage_config', array(
+        'field_name' => $name,
+        'entity_type' => 'user',
+        'type' => $type,
+      ))->save();
+    }
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php
new file mode 100644
index 0000000..b331a59
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php
@@ -0,0 +1,85 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileFieldTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\field\Entity\FieldStorageConfig;
+
+/**
+ * Tests the user profile field migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserProfileFieldTest extends MigrateDrupal6TestBase {
+
+  static $modules = array('link', 'options', 'datetime', 'text');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->loadDumps([
+      'ProfileFields.php',
+      'Users.php',
+      'ProfileValues.php',
+      'UsersRoles.php',
+      'EventTimezones.php',
+    ]);
+    $this->executeMigration('d6_user_profile_field');
+  }
+
+  /**
+   * Tests migration of user profile fields.
+   */
+  public function testUserProfileFields() {
+    // Migrated a text field.
+    $field_storage = FieldStorageConfig::load('user.profile_color');
+    $this->assertIdentical('text', $field_storage->getType(), 'Field type is text.');
+    $this->assertIdentical(1, $field_storage->getCardinality(), 'Text field has correct cardinality');
+
+    // Migrated a textarea.
+    $field_storage = FieldStorageConfig::load('user.profile_biography');
+    $this->assertIdentical('text_long', $field_storage->getType(), 'Field type is text_long.');
+
+    // Migrated checkbox field.
+    $field_storage = FieldStorageConfig::load('user.profile_sell_address');
+    $this->assertIdentical('boolean', $field_storage->getType(), 'Field type is boolean.');
+
+    // Migrated selection field.
+    $field_storage = FieldStorageConfig::load('user.profile_sold_to');
+    $this->assertIdentical('list_string', $field_storage->getType(), 'Field type is list_string.');
+    $settings = $field_storage->getSettings();
+    $this->assertEqual($settings['allowed_values'], array(
+      'Pill spammers' => 'Pill spammers',
+      'Fitness spammers' => 'Fitness spammers',
+      'Back\slash' => 'Back\slash',
+      'Forward/slash' => 'Forward/slash',
+      'Dot.in.the.middle' => 'Dot.in.the.middle',
+      'Faithful servant' => 'Faithful servant',
+      'Anonymous donor' => 'Anonymous donor',
+    ));
+    $this->assertIdentical('list_string', $field_storage->getType(), 'Field type is list_string.');
+
+    // Migrated list field.
+    $field_storage = FieldStorageConfig::load('user.profile_bands');
+    $this->assertIdentical('text', $field_storage->getType(), 'Field type is text.');
+    $this->assertIdentical(-1, $field_storage->getCardinality(), 'List field has correct cardinality');
+
+/*
+    // Migrated URL field.
+    $field_storage = FieldStorageConfig::load('user.profile_blog');
+    $this->assertIdentical('link', $field_storage->getType(), 'Field type is link.');
+*/
+
+    // Migrated date field.
+    $field_storage = FieldStorageConfig::load('user.profile_birthdate');
+    $this->assertIdentical('datetime', $field_storage->getType(), 'Field type is datetime.');
+    $this->assertIdentical('date', $field_storage->getSettings()['datetime_type']);
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileValuesTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileValuesTest.php
new file mode 100644
index 0000000..fa4489e
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileValuesTest.php
@@ -0,0 +1,174 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileValuesTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\migrate\MigrateExecutable;
+use Drupal\Core\Database\Database;
+use Drupal\user\Entity\User;
+
+/**
+ * User profile values migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserProfileValuesTest extends MigrateDrupal6TestBase {
+
+  /**
+   * The modules to be enabled during the test.
+   *
+   * @var array
+   */
+  static $modules = array(
+    'link',
+    'options',
+    'datetime',
+    'text',
+    'file',
+    'image',
+  );
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    // Create some fields so the data gets stored.
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_color',
+      'type' => 'text',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_biography',
+      'type' => 'text_long',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_sell_address',
+      'type' => 'boolean',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_sold_to',
+      'type' => 'list_string',
+      'settings' => array(
+        'allowed_values' => array(
+          'Pill spammers' => 'Pill spammers',
+          'Fitness spammers' => 'Fitness spammers',
+        )
+      )
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_bands',
+      'type' => 'text',
+      'cardinality' => -1,
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_blog',
+      'type' => 'link',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_birthdate',
+      'type' => 'datetime',
+    ))->save();
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'profile_love_migrations',
+      'type' => 'boolean',
+    ))->save();
+
+    // Add some id mappings for the dependant migrations.
+    $id_mappings = array(
+      'd6_user_profile_field_instance' => array(
+        array(array(1), array('user', 'user', 'fieldname')),
+      ),
+      'd6_user_profile_entity_display' => array(
+        array(array(1), array('user', 'user', 'default', 'fieldname')),
+      ),
+      'd6_user_profile_entity_form_display' => array(
+        array(array(1), array('user', 'user', 'default', 'fieldname')),
+      ),
+      'd6_user' => array(
+        array(array(2), array(2)),
+        array(array(8), array(8)),
+        array(array(15), array(15)),
+      ),
+    );
+    $this->prepareMigrations($id_mappings);
+
+    $this->loadDumps([
+      'ProfileFields.php',
+      'Users.php',
+      'ProfileValues.php',
+      'UsersRoles.php',
+      'EventTimezones.php',
+    ]);
+
+    $field_data = Database::getConnection('default', 'migrate')
+      ->select('profile_fields', 'u')
+      ->fields('u')
+      ->execute()
+      ->fetchAll();
+    // Create the field instances.
+    foreach ($field_data as $field) {
+      entity_create('field_config', array(
+        'label' => $field->title,
+        'description' => '',
+        'field_name' => $field->name,
+        'entity_type' => 'user',
+        'bundle' => 'user',
+        'required' => 0,
+      ))->save();
+    }
+
+    // Create our users for the node authors.
+    $query = Database::getConnection('default', 'migrate')->query('SELECT * FROM {users} WHERE uid NOT IN (0, 1)');
+    while(($row = $query->fetchAssoc()) !== FALSE) {
+      $user = entity_create('user', $row);
+      $user->enforceIsNew();
+      $user->save();
+    }
+
+    $migration_format = entity_load('migration', 'd6_profile_values:user');
+    $this->executeMigration($migration_format);
+  }
+
+  /**
+   * Tests Drupal 6 profile values to Drupal 8 migration.
+   */
+  public function testUserProfileValues() {
+    $user = User::load(2);
+    $this->assertFalse(is_null($user));
+    $this->assertIdentical('red', $user->profile_color->value);
+    $expected = <<<EOT
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nulla sapien, congue nec risus ut, adipiscing aliquet felis. Maecenas quis justo vel nulla varius euismod. Quisque metus metus, cursus sit amet sem non, bibendum vehicula elit. Cras dui nisl, eleifend at iaculis vitae, lacinia ut felis. Nullam aliquam ligula volutpat nulla consectetur accumsan. Maecenas tincidunt molestie diam, a accumsan enim fringilla sit amet. Morbi a tincidunt tellus. Donec imperdiet scelerisque porta. Sed quis sem bibendum eros congue sodales. Vivamus vel fermentum est, at rutrum orci. Nunc consectetur purus ut dolor pulvinar, ut volutpat felis congue. Cras tincidunt odio sed neque sollicitudin, vehicula tempor metus scelerisque.
+EOT;
+    $this->assertIdentical($expected, $user->profile_biography->value);
+    $this->assertIdentical('1', $user->profile_sell_address->value);
+    $this->assertIdentical('Back\slash', $user->profile_sold_to->value);
+    $this->assertIdentical('AC/DC', $user->profile_bands[0]->value);
+    $this->assertIdentical('Eagles', $user->profile_bands[1]->value);
+    $this->assertIdentical('Elton John', $user->profile_bands[2]->value);
+    $this->assertIdentical('Lemonheads', $user->profile_bands[3]->value);
+    $this->assertIdentical('Rolling Stones', $user->profile_bands[4]->value);
+    $this->assertIdentical('Queen', $user->profile_bands[5]->value);
+    $this->assertIdentical('The White Stripes', $user->profile_bands[6]->value);
+    $this->assertIdentical('1974-06-02', $user->profile_birthdate->value);
+
+    $user = User::load(8);
+    $this->assertIdentical('Forward/slash', $user->profile_sold_to->value);
+
+    $user = User::load(15);
+    $this->assertIdentical('Dot.in.the.middle', $user->profile_sold_to->value);
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserRoleTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserRoleTest.php
new file mode 100644
index 0000000..ebd2b6b
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserRoleTest.php
@@ -0,0 +1,98 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserRoleTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\user\Entity\Role;
+
+/**
+ * Upgrade user roles to user.role.*.yml.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserRoleTest extends MigrateDrupal6TestBase {
+
+  /**
+   * The modules to be enabled during the test.
+   *
+   * @var array
+   */
+  static $modules = array('filter', 'node');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    // We need some sample data so we can use the Migration process plugin.
+    $id_mappings = array(
+      'd6_filter_format' => array(
+        array(array(1), array('filtered_html')),
+        array(array(2), array('full_html'))
+      ),
+    );
+    $this->prepareMigrations($id_mappings);
+
+    $this->loadDumps([
+      'Permission.php',
+      'Role.php',
+      'Filters.php',
+      'FilterFormats.php',
+      'Variable.php',
+    ]);
+    $this->executeMigration('d6_user_role');
+  }
+
+  /**
+   * Tests user role migration.
+   */
+  public function testUserRole() {
+    /** @var \Drupal\migrate\entity\Migration $migration */
+    $migration = entity_load('migration', 'd6_user_role');
+    $rid = 'anonymous';
+    $anonymous = Role::load($rid);
+    $this->assertIdentical($rid, $anonymous->id());
+    $this->assertIdentical(array('migrate test anonymous permission', 'use text format filtered_html'), $anonymous->getPermissions());
+    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(1)));
+    $rid = 'authenticated';
+    $authenticated = Role::load($rid);
+    $this->assertIdentical($rid, $authenticated->id());
+    $this->assertIdentical(array('migrate test authenticated permission', 'use text format filtered_html'), $authenticated->getPermissions());
+    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(2)));
+    $rid = 'migrate_test_role_1';
+    $migrate_test_role_1 = Role::load($rid);
+    $this->assertIdentical($rid, $migrate_test_role_1->id());
+    $this->assertIdentical(array(0 => 'migrate test role 1 test permission', 'use text format full_html'), $migrate_test_role_1->getPermissions());
+    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(3)));
+    $rid = 'migrate_test_role_2';
+    $migrate_test_role_2 = Role::load($rid);
+    $this->assertIdentical(array(
+      'migrate test role 2 test permission',
+      'use PHP for settings',
+      'administer contact forms',
+      'skip comment approval',
+      'edit own blog content',
+      'edit any blog content',
+      'delete own blog content',
+      'delete any blog content',
+      'create forum content',
+      'delete any forum content',
+      'delete own forum content',
+      'edit any forum content',
+      'edit own forum content',
+      'administer nodes',
+      'access content overview',
+      ), $migrate_test_role_2->getPermissions());
+    $this->assertIdentical($rid, $migrate_test_role_2->id());
+    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(4)));
+    $rid = 'migrate_test_role_3_that_is_long';
+    $migrate_test_role_3 = Role::load($rid);
+    $this->assertIdentical($rid, $migrate_test_role_3->id());
+    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(5)));
+  }
+
+}
diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php
new file mode 100644
index 0000000..d584c3a
--- /dev/null
+++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php
@@ -0,0 +1,184 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserTest.
+ */
+
+namespace Drupal\migrate_drupal\Tests\d6;
+
+use Drupal\user\Entity\User;
+use Drupal\file\Entity\File;
+use Drupal\Core\Database\Database;
+use Drupal\user\RoleInterface;
+
+/**
+ * Users migration.
+ *
+ * @group migrate_drupal
+ */
+class MigrateUserTest extends MigrateDrupal6TestBase {
+
+  /**
+   * The modules to be enabled during the test.
+   *
+   * @var array
+   */
+  static $modules = array(
+    'link',
+    'options',
+    'datetime',
+    'text',
+    'file',
+    'image',
+  );
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->installEntitySchema('file');
+    $this->installSchema('file', ['file_usage']);
+
+    // Create the user profile field and instance.
+    entity_create('field_storage_config', array(
+      'entity_type' => 'user',
+      'field_name' => 'user_picture',
+      'type' => 'image',
+      'translatable' => '0',
+    ))->save();
+    entity_create('field_config', array(
+      'label' => 'User Picture',
+      'description' => '',
+      'field_name' => 'user_picture',
+      'entity_type' => 'user',
+      'bundle' => 'user',
+      'required' => 0,
+    ))->save();
+
+    $file = entity_create('file', array(
+      'fid' => 2,
+      'uid' => 2,
+      'filename' => 'image-test.jpg',
+      'uri' => "public://image-test.jpg",
+      'filemime' => 'image/jpeg',
+      'created' => 1,
+      'changed' => 1,
+      'status' => FILE_STATUS_PERMANENT,
+    ));
+    $file->enforceIsNew();
+    file_put_contents($file->getFileUri(), file_get_contents('core/modules/simpletest/files/image-1.png'));
+    $file->save();
+
+    $file = entity_create('file', array(
+      'fid' => 8,
+      'uid' => 8,
+      'filename' => 'image-test.png',
+      'uri' => "public://image-test.png",
+      'filemime' => 'image/png',
+      'created' => 1,
+      'changed' => 1,
+      'status' => FILE_STATUS_PERMANENT,
+    ));
+    $file->enforceIsNew();
+    file_put_contents($file->getFileUri(), file_get_contents('core/modules/simpletest/files/image-2.jpg'));
+    $file->save();
+
+    $this->loadDumps([
+      'Filters.php',
+      'FilterFormats.php',
+      'Variable.php',
+      'ProfileFields.php',
+      'Permission.php',
+      'Role.php',
+      'Users.php',
+      'ProfileValues.php',
+      'UsersRoles.php',
+      'EventTimezones.php',
+    ]);
+
+    $id_mappings = array(
+      'd6_user_role' => array(
+        array(array(1), array('anonymous user')),
+        array(array(2), array('authenticated user')),
+        array(array(3), array('migrate test role 1')),
+        array(array(4), array('migrate test role 2')),
+        array(array(5), array('migrate test role 3')),
+      ),
+      'd6_user_picture_entity_display' => array(
+        array(array(1), array('user', 'user', 'default', 'user_picture')),
+      ),
+      'd6_user_picture_entity_form_display' => array(
+        array(array(1), array('user', 'user', 'default', 'user_picture')),
+      ),
+      'd6_user_picture_file' => array(
+        array(array(2), array(2)),
+        array(array(8), array(8)),
+      ),
+    );
+
+    $this->prepareMigrations($id_mappings);
+
+    $this->executeMigration('d6_user');
+  }
+
+  /**
+   * Tests the Drupal6 user to Drupal 8 migration.
+   */
+  public function testUser() {
+    $users = Database::getConnection('default', 'migrate')
+      ->select('users', 'u')
+      ->fields('u')
+      ->execute()
+      ->fetchAll();
+
+    foreach ($users as $source) {
+      // Get roles directly from the source.
+      $rids = Database::getConnection('default', 'migrate')
+        ->select('users_roles', 'ur')
+        ->fields('ur', array('rid'))
+        ->condition('ur.uid', $source->uid)
+        ->execute()
+        ->fetchCol();
+      $roles = array(RoleInterface::AUTHENTICATED_ID);
+      $migration_role = entity_load('migration', 'd6_user_role');
+      foreach ($rids as $rid) {
+        $role = $migration_role->getIdMap()->lookupDestinationId(array($rid));
+        $roles[] = reset($role);
+      }
+
+      /** @var \Drupal\user\UserInterface $user */
+      $user = User::load($source->uid);
+      $this->assertIdentical($source->uid, $user->id());
+      $this->assertIdentical($source->name, $user->label());
+      $this->assertIdentical($source->mail, $user->getEmail());
+      $this->assertIdentical($source->created, $user->getCreatedTime());
+      $this->assertIdentical($source->access, $user->getLastAccessedTime());
+      $this->assertIdentical($source->login, $user->getLastLoginTime());
+      $is_blocked = $source->status == 0;
+      $this->assertIdentical($is_blocked, $user->isBlocked());
+      // $user->getPreferredLangcode() might fallback to default language if the
+      // user preferred language is not configured on the site. We just want to
+      // test if the value was imported correctly.
+      $this->assertIdentical($source->language, $user->preferred_langcode->value);
+      $time_zone = $source->expected_timezone ?: $this->config('system.date')->get('timezone.default');
+      $this->assertIdentical($time_zone, $user->getTimeZone());
+      $this->assertIdentical($source->init, $user->getInitialEmail());
+      $this->assertIdentical($roles, $user->getRoles());
+
+      // We have one empty picture in the data so don't try load that.
+      if (!empty($source->picture)) {
+        // Test the user picture.
+        $file = File::load($user->user_picture->target_id);
+        $this->assertIdentical(basename($source->picture), $file->getFilename());
+      }
+
+      // Use the API to check if the password has been salted and re-hashed to
+      // conform the Drupal >= 7.
+      $this->assertTrue(\Drupal::service('password')->check($source->pass_plain, $user->getPassword()));
+    }
+  }
+
+}
diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/ProfileFieldTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/ProfileFieldTest.php
new file mode 100644
index 0000000..4a8609e
--- /dev/null
+++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/ProfileFieldTest.php
@@ -0,0 +1,96 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\migrate_drupal\Unit\source\d6\ProfileFieldTest.
+ */
+
+namespace Drupal\Tests\migrate_drupal\Unit\source\d6;
+
+use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
+
+/**
+ * Tests D6 profile field source plugin.
+ *
+ * @group migrate_drupal
+ */
+class ProfileFieldTest extends MigrateSqlSourceTestCase {
+
+  // The plugin system is not working during unit testing so the source plugin
+  // class needs to be manually specified.
+  const PLUGIN_CLASS = 'Drupal\migrate_drupal\Plugin\migrate\source\d6\ProfileField';
+
+  // The fake Migration configuration entity.
+  protected $migrationConfiguration = [
+    // The id of the entity, can be any string.
+    'id' => 'test_profile_fields',
+    // Leave it empty for now.
+    'idlist' => [],
+    'source' => [
+      'plugin' => 'd6_profile_field',
+    ],
+  ];
+
+  // We need to set up the database contents; it's easier to do that below.
+  // These are sample result queries.
+  // @todo Add multiple cases.
+  protected $expectedResults = [
+    [
+      'fid' => 1,
+      'title' => 'First name',
+      'name' => 'profile_first_name',
+      'explanation' => 'First name user',
+      'category' => 'profile',
+      'page' => '',
+      'type' => 'textfield',
+      'weight' => 0,
+      'required' => 1,
+      'register' => 0,
+      'visibility' => 2,
+      'autocomplete' => 0,
+      'options' => [],
+    ],
+    [
+      'fid' => 2,
+      'title' => 'Last name',
+      'name' => 'profile_last_name',
+      'explanation' => 'Last name user',
+      'category' => 'profile',
+      'page' => '',
+      'type' => 'textfield',
+      'weight' => 0,
+      'required' => 0,
+      'register' => 0,
+      'visibility' => 2,
+      'autocomplete' => 0,
+      'options' => [],
+    ],
+    [
+      'fid' => 3,
+      'title' => 'Policy',
+      'name' => 'profile_policy',
+      'explanation' => 'A checkbox that say if you accept policy of website',
+      'category' => 'profile',
+      'page' => '',
+      'type' => 'checkbox',
+      'weight' => 0,
+      'required' => 1,
+      'register' => 1,
+      'visibility' => 2,
+      'autocomplete' => 0,
+      'options' => [],
+    ],
+  ];
+
+  /**
+   * Prepopulate contents with results.
+   */
+  protected function setUp() {
+    $this->databaseContents['profile_fields'] = $this->expectedResults;
+    foreach ($this->databaseContents['profile_fields'] as &$row) {
+      $row['options'] = serialize([]);
+    }
+    parent::setUp();
+  }
+
+}
diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/RoleTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/RoleTest.php
new file mode 100644
index 0000000..e9311d7
--- /dev/null
+++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/RoleTest.php
@@ -0,0 +1,88 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\migrate_drupal\Unit\source\d6\RoleTest.
+ */
+
+namespace Drupal\Tests\migrate_drupal\Unit\source\d6;
+
+use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
+
+/**
+ * Tests D6 role source plugin.
+ *
+ * @group migrate_drupal
+ */
+class RoleTest extends MigrateSqlSourceTestCase {
+
+  // The plugin system is not working during unit testing so the source plugin
+  // class needs to be manually specified.
+  const PLUGIN_CLASS = 'Drupal\migrate_drupal\Plugin\migrate\source\d6\Role';
+
+  // The fake Migration configuration entity.
+  protected $migrationConfiguration = array(
+    // The ID of the entity, can be any string.
+    'id' => 'test',
+    // Leave it empty for now.
+    'idlist' => array(),
+    // This needs to be the identifier of the actual key: cid for comment, nid
+    // for node and so on.
+    'source' => array(
+      'plugin' => 'd6_user_role',
+    ),
+  );
+
+  protected $expectedResults = array(
+    array(
+      'rid' => 1,
+      'name' => 'anonymous user',
+      'permissions' => array(
+        'access content',
+      ),
+    ),
+    array(
+      'rid' => 2,
+      'name' => 'authenticated user',
+      'permissions' => array(
+        'access comments',
+        'access content',
+        'post comments',
+        'post comments without approval',
+      ),
+    ),
+    array(
+      'rid' => 3,
+      'name' => 'administrator',
+      'permissions' => array(
+        'access comments',
+        'administer comments',
+        'post comments',
+        'post comments without approval',
+        'access content',
+        'administer content types',
+        'administer nodes',
+      ),
+    ),
+  );
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    foreach ($this->expectedResults as $row) {
+      $this->databaseContents['permission'][] = array(
+        'perm' => implode(', ', $row['permissions']),
+        'rid' => $row['rid'],
+      );
+      unset($row['permissions']);
+      $this->databaseContents['role'][] = $row;
+    }
+    $this->databaseContents['filter_formats'][] = array(
+      'format' => 1,
+      'roles' => '',
+    );
+    parent::setUp();
+  }
+
+}
diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/UserPictureTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/UserPictureTest.php
new file mode 100644
index 0000000..de70385
--- /dev/null
+++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/UserPictureTest.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\migrate_drupal\Unit\source\d6\UserPictureTest.
+ */
+
+namespace Drupal\Tests\migrate_drupal\Unit\source\d6;
+
+use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
+
+/**
+ * Tests D6 user picture source plugin.
+ *
+ * @group migrate_drupal
+ */
+class UserPictureTest extends MigrateSqlSourceTestCase {
+
+  const PLUGIN_CLASS = 'Drupal\migrate_drupal\Plugin\migrate\source\d6\UserPicture';
+
+  protected $migrationConfiguration = array(
+    'id' => 'test_user_picture',
+    'idlist' => array(),
+    'source' => array(
+      'plugin' => 'd6_user_picture',
+    ),
+  );
+
+  protected $expectedResults = array(
+    array(
+      'uid' => 1,
+      'access' => 1382835435,
+      'picture' => 'sites/default/files/pictures/picture-1.jpg',
+    ),
+    array(
+      'uid' => 2,
+      'access' => 1382835436,
+      'picture' => 'sites/default/files/pictures/picture-2.jpg',
+    ),
+  );
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    $this->databaseContents['users'] = $this->expectedResults;
+    parent::setUp();
+  }
+
+}
diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/UserTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/UserTest.php
new file mode 100644
index 0000000..36d4b67
--- /dev/null
+++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/UserTest.php
@@ -0,0 +1,89 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Tests\migrate_drupal\Unit\source\d6\UserTest.
+ */
+
+namespace Drupal\Tests\migrate_drupal\Unit\source\d6;
+
+use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
+
+/**
+ * Tests D6 user source plugin.
+ *
+ * @group migrate_drupal
+ */
+class UserTest extends MigrateSqlSourceTestCase {
+
+  const PLUGIN_CLASS = 'Drupal\migrate_drupal\Plugin\migrate\source\d6\User';
+
+  protected $migrationConfiguration = array(
+    'id' => 'test',
+    'idlist' => array(),
+    'source' => array(
+      'plugin' => 'd6_user',
+    ),
+  );
+
+  protected $expectedResults = array(
+    array(
+      'uid' => 2,
+      'name' => 'admin',
+      // @todo d6 hash?
+      'pass' => '1234',
+      'mail' => 'admin@example.com',
+      'theme' => '',
+      'signature' => '',
+      'signature_format' => 0,
+      'created' => 1279402616,
+      'access' => 1322981278,
+      'login' => 1322699994,
+      'status' => 0,
+      'timezone' => 'America/Lima',
+      'language' => 'en',
+      // @todo Add the file when needed.
+      'picture' => 'sites/default/files/pictures/picture-1.jpg',
+      'init' => 'admin@example.com',
+      'data' => NULL,
+    ),
+    array(
+      'uid' => 4,
+      'name' => 'alice',
+      // @todo d6 hash?
+      'pass' => '1234',
+      'mail' => 'alice@example.com',
+      'theme' => '',
+      'signature' => '',
+      'signature_format' => 0,
+      'created' => 1322981368,
+      'access' => 1322982419,
+      'login' => 132298140,
+      'status' => 0,
+      'timezone' => 'America/Lima',
+      'language' => 'en',
+      'picture' => '',
+      'init' => 'alice@example.com',
+      'data' => NULL,
+    ),
+  );
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    foreach ($this->expectedResults as $k => $row) {
+      $this->databaseContents['users'][$k] = $row;
+    }
+    // getDatabase() will not create empty tables, so we need to insert data
+    // even if it's irrelevant to the test.
+    $this->databaseContents['users_roles'] = array(
+      array(
+        'uid' => 99,
+        'rid' => 99,
+      ),
+    );
+    parent::setUp();
+  }
+
+}
diff --git a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
index cc0d9df..f1f6e97 100644
--- a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
+++ b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php
@@ -107,6 +107,7 @@ protected function getCacheBackend($bin = null) {
   }
 
   protected function setUp() {
+    $this->startAssertionHandling();
     $this->cachebackends = array();
     $this->defaultValue = $this->randomMachineName(10);
 
@@ -116,6 +117,8 @@ protected function setUp() {
   }
 
   protected function tearDown() {
+    $this->stopAssertionHandling();
+
     // Destruct the registered backend, each test will get a fresh instance,
     // properly emptying it here ensure that on persistent data backends they
     // will come up empty the next test.
@@ -221,10 +224,10 @@ public function testSetGet() {
     // Calling ::set() with invalid cache tags.
     try {
       $backend->set('exception_test', 'value', Cache::PERMANENT, ['node' => [3, 5, 7]]);
-      $this->fail('::set() was called with invalid cache tags, no exception was thrown.');
+      $this->fail('::set() was called with invalid cache tags, no assertion raised.');
     }
-    catch (\LogicException $e) {
-      $this->pass('::set() was called with invalid cache tags, an exception was thrown.');
+    catch (\AssertionError $e) {
+      $this->pass('::set() was called with invalid cache tags, an assertion was raised.');
     }
   }
 
@@ -420,10 +423,10 @@ public function testSetMultiple() {
         'exception_test_3' => array('data' => 3, 'tags' => ['node' => [3, 5, 7]]),
       ];
       $backend->setMultiple($items);
-      $this->fail('::setMultiple() was called with invalid cache tags, no exception was thrown.');
+      $this->fail('::setMultiple() was called with invalid cache tags, no assertion was raised.');
     }
-    catch (\LogicException $e) {
-      $this->pass('::setMultiple() was called with invalid cache tags, an exception was thrown.');
+    catch (\AssertionError $e) {
+      $this->pass('::setMultiple() was called with invalid cache tags, an assertion was raised.');
     }
   }
 
diff --git a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php
index 5e7f2a2..2322bc3 100644
--- a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php
+++ b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php
@@ -47,6 +47,7 @@ protected function setUp() {
     $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
+    $cache_contexts_manager->method('assertValidTokens')->willReturn(TRUE);
     $container = new ContainerBuilder();
     $container->set('cache_contexts_manager', $cache_contexts_manager);
     \Drupal::setContainer($container);
diff --git a/core/modules/user/config/schema/user.destination.schema.yml b/core/modules/user/config/schema/user.destination.schema.yml
deleted file mode 100644
index e95158e..0000000
--- a/core/modules/user/config/schema/user.destination.schema.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-# Schema for the migrate destination plugin.
-
-migrate.destination.entity:user:
-  type: migrate_destination
-  label: 'User'
-  mapping:
-    md5_passwords:
-      type: boolean
-      label: 'Passwords'
diff --git a/core/modules/user/config/schema/user.source.schema.yml b/core/modules/user/config/schema/user.source.schema.yml
deleted file mode 100644
index f1ff1b8..0000000
--- a/core/modules/user/config/schema/user.source.schema.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-# Schema for the user module's migration source plugins.
-
-migrate.source.d6_user:
-  type: migrate_source_sql
-  label: 'Drupal 6 user'
-  mapping:
-    constants:
-      type: mapping
-      label: 'Constants'
-      mapping:
-        key:
-          type: string
-          label: 'User data key'
-        module:
-          type: string
-          label: 'Module name'
-
-migrate.source.d6_user_picture_file:
-  type: migrate_source_sql
-  label: 'Drupal 6 user picure display'
-  mapping:
-    constants:
-      type: mapping
-      label: 'Constant'
-      mapping:
-        is_public:
-          type: boolean
-          label: 'Public'
-
-migrate.source.d6_user_picture_instance:
-  type: migrate_source_sql
-  label: 'Drupal 6 user picure display'
-  mapping:
-    provider:
-      type: string
-      label: 'Provider'
-    constants:
-      type: migrate_entity_constant
-      label: 'Constants'
-
-migrate.source.d6_profile_field:
-  type: migrate_source_sql
-  label: 'Drupal 6 profile field'
-  mapping:
-    constants:
-      type: migrate_entity_constant
-      label: 'Constants'
diff --git a/core/modules/user/migration_templates/d6_profile_values.yml b/core/modules/user/migration_templates/d6_profile_values.yml
deleted file mode 100644
index d2b81a5..0000000
--- a/core/modules/user/migration_templates/d6_profile_values.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-id: d6_profile_values
-label: Drupal 6 profile values
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_profile_field_values
-load:
-  plugin: drupal_entity
-process:
-  uid: uid
-destination:
-  plugin: entity:user
-migration_dependencies:
-  required:
-    - d6_user
-    - d6_user_profile_field_instance
-    - d6_user_profile_entity_display
-    - d6_user_profile_entity_form_display
diff --git a/core/modules/user/migration_templates/d6_user.yml b/core/modules/user/migration_templates/d6_user.yml
deleted file mode 100644
index 05ff4a0..0000000
--- a/core/modules/user/migration_templates/d6_user.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-id: d6_user
-label: Drupal 6 user accounts
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_user
-process:
-  uid: uid
-  name: name
-  pass: pass
-  mail: mail
-  created: created
-  access: access
-  login: login
-  status: status
-  timezone:
-    plugin: user_update_7002
-    source: timezone
-  preferred_langcode: language
-  init: init
-  roles:
-    plugin: migration
-    migration: d6_user_role
-    source: roles
-  user_picture:
-    plugin: d6_user_picture
-    source: uid
-destination:
-  plugin: entity:user
-  md5_passwords: true
-migration_dependencies:
-  required:
-    - d6_user_role
-  optional:
-    - d6_user_picture_file
-    - d6_user_picture_entity_display
-    - d6_user_picture_entity_form_display
diff --git a/core/modules/user/migration_templates/d6_user_contact_settings.yml b/core/modules/user/migration_templates/d6_user_contact_settings.yml
deleted file mode 100644
index 0429155..0000000
--- a/core/modules/user/migration_templates/d6_user_contact_settings.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-id: d6_user_contact_settings
-label: Drupal 6 user contact settings
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_user
-  constants:
-    key: contact
-    module: contact
-process:
-  uid: uid
-  key: 'constants/key'
-  module: 'constants/module'
-  settings:
-    plugin: skip_row_if_not_set
-    index: contact
-    source: data
-
-destination:
-  plugin: user_data
-migration_dependencies:
-  required:
-    - d6_user
diff --git a/core/modules/user/migration_templates/d6_user_mail.yml b/core/modules/user/migration_templates/d6_user_mail.yml
deleted file mode 100644
index bc3badf..0000000
--- a/core/modules/user/migration_templates/d6_user_mail.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-id: d6_user_mail
-label: Drupal 6 user mail configuration
-migration_tags:
-  - Drupal 6
-source:
-  plugin: variable
-  variables:
-    - user_mail_status_activated_subject
-    - user_mail_status_activated_body
-    - user_mail_password_reset_subject
-    - user_mail_password_reset_body
-    - user_mail_status_deleted_subject
-    - user_mail_status_deleted_body
-    - user_mail_register_admin_created_subject
-    - user_mail_register_admin_created_body
-    - user_mail_register_no_approval_required_subject
-    - user_mail_register_no_approval_required_body
-    - user_mail_user_mail_register_pending_approval_subject
-    - user_mail_user_mail_register_pending_approval_body
-    - user_mail_status_blocked_subject
-    - user_mail_status_blocked_body
-process:
-  'status_activated/subject': user_mail_status_activated_subject
-  'status_activated/body': user_mail_status_activated_body
-  'password_reset/subject': user_mail_password_reset_subject
-  'password_reset/body': user_mail_password_reset_body
-  'cancel_confirm/subject': user_mail_status_deleted_subject
-  'cancel_confirm/body': user_mail_status_deleted_body
-  'register_admin_created/subject': user_mail_register_admin_created_subject
-  'register_admin_created/body': user_mail_register_admin_created_body
-  'register_no_approval_required/subject': user_mail_register_no_approval_required_subject
-  'register_no_approval_required/body': user_mail_register_no_approval_required_body
-  'register_pending_approval/subject': user_mail_user_mail_register_pending_approval_subject
-  'register_pending_approval/body': user_mail_user_mail_register_pending_approval_body
-  'status_blocked/subject': user_mail_status_blocked_subject
-  'status_blocked/body': user_mail_status_blocked_body
-destination:
-  plugin: config
-  config_name: user.mail
diff --git a/core/modules/user/migration_templates/d6_user_picture_entity_display.yml b/core/modules/user/migration_templates/d6_user_picture_entity_display.yml
deleted file mode 100644
index f38bc36..0000000
--- a/core/modules/user/migration_templates/d6_user_picture_entity_display.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-id: d6_user_picture_entity_display
-label: Drupal 6 user picture display configuration
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_user_picture_instance
-  constants:
-    entity_type: user
-    bundle: user
-    view_mode: default
-    name: user_picture
-    type: image
-    options:
-      label: hidden
-      settings:
-        image_style: ''
-        image_link: content
-process:
-  entity_type: 'constants/entity_type'
-  bundle: 'constants/bundle'
-  view_mode: 'constants/view_mode'
-  field_name: 'constants/name'
-  type: 'constants/type'
-  options: 'constants/options'
-  'options/type': @type
-destination:
-  plugin: component_entity_display
-migration_dependencies:
-  required:
-    - d6_user_picture_field_instance
diff --git a/core/modules/user/migration_templates/d6_user_picture_entity_form_display.yml b/core/modules/user/migration_templates/d6_user_picture_entity_form_display.yml
deleted file mode 100644
index 4e42228..0000000
--- a/core/modules/user/migration_templates/d6_user_picture_entity_form_display.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-id: d6_user_picture_entity_form_display
-label: Drupal 6 user picture form display configuration
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_user_picture_instance
-  constants:
-    entity_type: user
-    bundle: user
-    form_mode: default
-    name: user_picture
-    type: image_image
-    options:
-      settings:
-        progress_indicator: throbber
-        preview_image_style: thumbnail
-process:
-  entity_type: 'constants/entity_type'
-  bundle: 'constants/bundle'
-  field_name: 'constants/name'
-  form_mode: 'constants/form_mode'
-  type: 'constants/type'
-  options: 'constants/options'
-  'options/type': @type
-destination:
-  plugin: component_entity_form_display
-migration_dependencies:
-  required:
-    - d6_user_picture_field_instance
diff --git a/core/modules/user/migration_templates/d6_user_picture_field.yml b/core/modules/user/migration_templates/d6_user_picture_field.yml
deleted file mode 100644
index 27a39a2..0000000
--- a/core/modules/user/migration_templates/d6_user_picture_field.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-id: d6_user_picture_field
-label: Drupal 6 user picture field configuration
-migration_tags:
-  - Drupal 6
-source:
-  # We do an empty source and a proper destination to have an idmap for
-  # dependencies.
-  plugin: md_empty
-  constants:
-    entity_type: user
-    type: image
-    name: user_picture
-    cardinality: 1
-process:
-  entity_type: 'constants/entity_type'
-  field_name: 'constants/name'
-  type: 'constants/type'
-  cardinality: 'constants/cardinality'
-destination:
-  plugin: md_entity:field_storage_config
diff --git a/core/modules/user/migration_templates/d6_user_picture_field_instance.yml b/core/modules/user/migration_templates/d6_user_picture_field_instance.yml
deleted file mode 100644
index 7dc83b1..0000000
--- a/core/modules/user/migration_templates/d6_user_picture_field_instance.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-id: d6_user_picture_field_instance
-label: Drupal 6 user picture field instance configuration
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_user_picture_instance
-  constants:
-    entity_type: user
-    bundle: user
-    name: user_picture
-    settings:
-      file_extensions: 'png gif jpg jpeg'
-      alt_field: false
-      title_field: false
-      min_resolution: ''
-      alt_field_required: false
-      title_field_required: false
-process:
-  entity_type: 'constants/entity_type'
-  bundle: 'constants/bundle'
-  field_name: 'constants/name'
-  settings: 'constants/settings'
-  'settings/file_directory': file_directory
-  'settings/max_filesize': max_filesize
-  'settings/max_resolution': max_resolution
-destination:
-  plugin: entity:field_config
-migration_dependencies:
-  required:
-    - d6_user_picture_field
diff --git a/core/modules/user/migration_templates/d6_user_picture_file.yml b/core/modules/user/migration_templates/d6_user_picture_file.yml
deleted file mode 100644
index 0bc5a0b..0000000
--- a/core/modules/user/migration_templates/d6_user_picture_file.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-id: d6_user_picture_file
-label: Drupal 6 user pictures
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_user_picture_file
-  constants:
-    is_public: true
-process:
-  filename: filename
-  uid: uid
-  uri:
-    plugin: file_uri
-    source:
-      - picture
-      - file_directory_path
-      - temp_directory_path
-      - 'constants/is_public'
-destination:
-  plugin: entity:file
-  source_path_property: picture
-migration_dependencies:
-  # Every migration that saves into {file_managed} must have the d6_file
-  # migration as an optional dependency to ensure it runs first.
-  optional:
-    - d6_file
diff --git a/core/modules/user/migration_templates/d6_user_profile_entity_display.yml b/core/modules/user/migration_templates/d6_user_profile_entity_display.yml
deleted file mode 100644
index 3e7b467..0000000
--- a/core/modules/user/migration_templates/d6_user_profile_entity_display.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-id: d6_user_profile_entity_display
-label: Drupal 6 user profile display configuration
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_profile_field
-  constants:
-    entity_type: user
-    bundle: user
-    view_mode: default
-    options:
-      label: hidden
-      settings: {}
-process:
-  entity_type: 'constants/entity_type'
-  bundle: 'constants/bundle'
-  view_mode: 'constants/view_mode'
-  field_name: name
-  type:
-    plugin: static_map
-    source: type
-    map:
-      checkbox: list_default
-      date: datetime_default
-      list: text_default
-      selection: list_default
-      textfield: text_default
-      textarea: text_default
-      url: link_default
-  options: 'constants/options'
-  'options/type': @type
-  hidden:
-    plugin: static_map
-    source: visibility
-    default_value: false
-    map:
-      1: true # PROFILE_PRIVATE
-      4: true # PROFILE_HIDDEN
-destination:
-  plugin: component_entity_display
diff --git a/core/modules/user/migration_templates/d6_user_profile_entity_form_display.yml b/core/modules/user/migration_templates/d6_user_profile_entity_form_display.yml
deleted file mode 100644
index d1cde0b..0000000
--- a/core/modules/user/migration_templates/d6_user_profile_entity_form_display.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-id: d6_user_profile_entity_form_display
-label: Drupal 6 user profile form display configuration
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_profile_field
-  constants:
-    empty: {}
-    entity_type: user
-    bundle: user
-    form_mode: default
-process:
-  entity_type: 'constants/entity_type'
-  bundle: 'constants/bundle'
-  field_name: name
-  form_mode: 'constants/form_mode'
-  type:
-    plugin: static_map
-    source: type
-    map:
-      checkbox: boolean_checkbox
-      date: datetime_default
-      list: text_textfield
-      selection: options_select
-      textfield: text_textfield
-      textarea: text_textarea
-      url: link_default
-  options: 'constants/options'
-  'options/type': @type
-  'options/settings':
-    plugin: field_instance_widget_settings
-    source:
-      - @type
-      - 'constants/empty' # we don't have any settings.
-  'options/settings/display_label':  # Single on/off checkboxes need to have display_label = true otherwise their label doesn't show.
-    plugin: static_map
-    default_value: false
-    source: type
-    map:
-      checkbox: true
-  hidden:
-    plugin: static_map
-    source: visibility
-    default_value: false
-    map:
-      1: true # PROFILE_PRIVATE
-      4: true # PROFILE_HIDDEN
-destination:
-  plugin: component_entity_form_display
diff --git a/core/modules/user/migration_templates/d6_user_profile_field.yml b/core/modules/user/migration_templates/d6_user_profile_field.yml
deleted file mode 100644
index 9917673..0000000
--- a/core/modules/user/migration_templates/d6_user_profile_field.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-id: d6_user_profile_field
-label: Drupal 6 user profile field configuration
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_profile_field
-  constants:
-    entity_type: user
-process:
-  entity_type: 'constants/entity_type'
-  field_name: name
-  type:
-    plugin: static_map
-    source: type
-    map:
-      checkbox: boolean
-      date: datetime
-      list: text
-      selection: list_string
-      textfield: text
-      textarea: text_long
-      url: link
-  settings:
-    plugin: d6_profile_field_settings
-    source: type
-  'settings/allowed_values': options
-  cardinality:
-    plugin: static_map
-    default_value: 1
-    source: type
-    map:
-      list: -1
-destination:
-  plugin: md_entity:field_storage_config
diff --git a/core/modules/user/migration_templates/d6_user_profile_field_instance.yml b/core/modules/user/migration_templates/d6_user_profile_field_instance.yml
deleted file mode 100644
index ec0e526..0000000
--- a/core/modules/user/migration_templates/d6_user_profile_field_instance.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-id: d6_user_profile_field_instance
-label: Drupal 6 user profile field instance configuration
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_profile_field
-  constants:
-    entity_type: user
-    bundle: user
-process:
-  entity_type: 'constants/entity_type'
-  bundle: 'constants/bundle'
-  label: title
-  description: explanation
-  field_name: name
-  required: required
-destination:
-  plugin: entity:field_config
-migration_dependencies:
-  required:
-    - d6_user_profile_field
diff --git a/core/modules/user/migration_templates/d6_user_role.yml b/core/modules/user/migration_templates/d6_user_role.yml
deleted file mode 100644
index e15058b..0000000
--- a/core/modules/user/migration_templates/d6_user_role.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-id: d6_user_role
-label: Drupal 6 user roles
-migration_tags:
-  - Drupal 6
-source:
-  plugin: d6_user_role
-process:
-  id:
-    -
-      plugin: machine_name
-      source: name
-    -
-      plugin: dedupe_entity
-      entity_type: user_role
-      field: id
-      length: 32
-    -
-      plugin: user_update_8002
-  label: name
-  permissions:
-    -
-      plugin: static_map
-      source: permissions
-      bypass: true
-      map:
-        'use PHP for block visibility': 'use PHP for settings'
-        'administer site-wide contact form': 'administer contact forms'
-        'post comments without approval': 'skip comment approval'
-        'edit own blog entries' : 'edit own blog content'
-        'edit any blog entry' : 'edit any blog content'
-        'delete own blog entries' : 'delete own blog content'
-        'delete any blog entry' : 'delete any blog content'
-        'create forum topics' : 'create forum content'
-        'delete any forum topic' : 'delete any forum content'
-        'delete own forum topics' : 'delete own forum content'
-        'edit any forum topic' : 'edit any forum content'
-        'edit own forum topics' : 'edit own forum content'
-    - plugin: system_update_7000
-    - plugin: node_update_7008
-    - plugin: flatten
-    - plugin: filter_format_permission
-destination:
-  plugin: entity:user_role
-migration_dependencies:
-  required:
-    - d6_filter_format
diff --git a/core/modules/user/migration_templates/d6_user_settings.yml b/core/modules/user/migration_templates/d6_user_settings.yml
deleted file mode 100644
index 5984d51..0000000
--- a/core/modules/user/migration_templates/d6_user_settings.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-id: d6_user_settings
-label: Drupal 6 user configuration
-migration_tags:
-  - Drupal 6
-source:
-  plugin: variable
-  variables:
-    - user_mail_status_blocked_notify
-    - user_mail_status_activated_notify
-    - user_email_verification
-    - user_register
-    - anonymous
-process:
-  'notify/status_blocked': user_mail_status_blocked_notify
-  'notify/status_activated': user_mail_status_activated_notify
-  verify_mail: user_email_verification
-  register:
-    plugin: static_map
-    source: user_register
-    default_value: visitors_admin_approval
-    map:
-      2: visitors_admin_approval
-      1: user_register
-      0: admin_only
-  anonymous: anonymous
-destination:
-  plugin: config
-  config_name: user.settings
diff --git a/core/modules/user/src/MigratePassword.php b/core/modules/user/src/MigratePassword.php
deleted file mode 100644
index 1e649c8..0000000
--- a/core/modules/user/src/MigratePassword.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\MigratePassword.
- */
-
-namespace Drupal\user;
-
-use Drupal\Core\Password\PasswordInterface;
-
-/**
- * Replaces the original 'password' service in order to prefix the MD5 re-hashed
- * passwords with the 'U' flag. The new salted hash is recreated on first login
- * similarly to the D6->D7 upgrade path.
- */
-class MigratePassword implements PasswordInterface {
-
-  /**
-   * The original password service.
-   *
-   * @var \Drupal\Core\Password\PasswordInterface
-   */
-  protected $originalPassword;
-
-  /**
-   * Indicates if MD5 password prefixing is enabled.
-   */
-  protected $enabled = FALSE;
-
-  /**
-   * Builds the replacement password service class.
-   *
-   * @param \Drupal\Core\Password\PasswordInterface $original_password
-   *   The password object.
-   */
-  public function __construct(PasswordInterface $original_password) {
-    $this->originalPassword = $original_password;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function check($password, $hash) {
-    return $this->originalPassword->check($password, $hash);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function needsRehash($hash) {
-    return $this->originalPassword->needsRehash($hash);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function hash($password) {
-    $hash = $this->originalPassword->hash($password);
-
-    // Allow prefixing only if the service was asked to prefix. Check also if
-    // the $password pattern is conforming to a MD5 result.
-    if ($this->enabled && preg_match('/^[0-9a-f]{32}$/', $password)) {
-      $hash = 'U' . $hash;
-    }
-
-    return $hash;
-  }
-
-  /**
-   * Enables the MD5 password prefixing.
-   */
-  public function enableMd5Prefixing() {
-    $this->enabled = TRUE;
-  }
-
-  /**
-   * Disables the MD5 password prefixing.
-   */
-  public function disableMd5Prefixing() {
-    $this->enabled = FALSE;
-  }
-
-  /**
-   * Implements the PhpassHashedPassword::getCountLog2() method.
-   *
-   * @todo: Revisit this whole alternate password service:
-   *   https://www.drupal.org/node/2540594.
-   */
-  public function getCountLog2($setting) {
-    return $this->originalPassword->getCountLog2($setting);
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/destination/EntityUser.php b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php
deleted file mode 100644
index 5352092..0000000
--- a/core/modules/user/src/Plugin/migrate/destination/EntityUser.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\destination\EntityUser.
- */
-
-namespace Drupal\user\Plugin\migrate\destination;
-
-use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Entity\EntityStorageInterface;
-use Drupal\Core\Password\PasswordInterface;
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\MigrateException;
-use Drupal\user\MigratePassword;
-use Drupal\migrate\Plugin\migrate\destination\EntityContentBase;
-use Drupal\migrate\Row;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-
-/**
- * @MigrateDestination(
- *   id = "entity:user"
- * )
- */
-class EntityUser extends EntityContentBase {
-
-  /**
-   * The password service class.
-   *
-   * @var \Drupal\Core\Password\PasswordInterface
-   */
-  protected $password;
-
-  /**
-   * Builds an user entity destination.
-   *
-   * @param array $configuration
-   *   A configuration array containing information about the plugin instance.
-   * @param string $plugin_id
-   *   The plugin_id for the plugin instance.
-   * @param mixed $plugin_definition
-   *   The plugin implementation definition.
-   * @param MigrationInterface $migration
-   *   The migration.
-   * @param EntityStorageInterface $storage
-   *   The storage for this entity type.
-   * @param array $bundles
-   *   The list of bundles this entity type has.
-   * @param \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager
-   *   The migrate plugin manager.
-   * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
-   *   The entity manager service.
-   * @param \Drupal\Core\Password\PasswordInterface $password
-   *   The password service.
-   */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, EntityManagerInterface $entity_manager, PasswordInterface $password) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $storage, $bundles, $entity_manager);
-    if (isset($configuration['md5_passwords'])) {
-      $this->password = $password;
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
-    $entity_type = static::getEntityTypeId($plugin_id);
-    return new static(
-      $configuration,
-      $plugin_id,
-      $plugin_definition,
-      $migration,
-      $container->get('entity.manager')->getStorage($entity_type),
-      array_keys($container->get('entity.manager')->getBundleInfo($entity_type)),
-      $container->get('entity.manager'),
-      $container->get('password')
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   * @throws \Drupal\migrate\MigrateException
-   */
-  public function import(Row $row, array $old_destination_id_values = array()) {
-    if ($this->password) {
-      if ($this->password instanceof MigratePassword) {
-        $this->password->enableMd5Prefixing();
-      }
-      else {
-        throw new MigrateException('Password service has been altered by another module, aborting.');
-      }
-    }
-    $ids = parent::import($row, $old_destination_id_values);
-    if ($this->password) {
-      $this->password->disableMd5Prefixing();
-    }
-
-    return $ids;
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/destination/UserData.php b/core/modules/user/src/Plugin/migrate/destination/UserData.php
deleted file mode 100644
index 5ae639f..0000000
--- a/core/modules/user/src/Plugin/migrate/destination/UserData.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\destination\UserData.
- */
-
-namespace Drupal\user\Plugin\migrate\destination;
-
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\user\UserData as UserDataStorage;
-use Drupal\migrate\Row;
-use Drupal\migrate\Plugin\migrate\destination\DestinationBase;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
-
-/**
- * @MigrateDestination(
- *   id = "user_data"
- * )
- */
-class UserData extends DestinationBase implements ContainerFactoryPluginInterface {
-
-  /**
-   * @var \Drupal\user\UserData
-   */
-  protected $userData;
-
-  /**
-   * Builds an user data entity destination.
-   *
-   * @param array $configuration
-   *   A configuration array containing information about the plugin instance.
-   * @param string $plugin_id
-   *   The plugin_id for the plugin instance.
-   * @param mixed $plugin_definition
-   *   The plugin implementation definition.
-   * @param \Drupal\migrate\Entity\MigrationInterface $migration
-   *   The migration.
-   * @param \Drupal\user\UserData $user_data
-   *   The user data service.
-   */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, UserDataStorage $user_data) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
-    $this->userData = $user_data;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
-    return new static(
-      $configuration,
-      $plugin_id,
-      $plugin_definition,
-      $migration,
-      $container->get('user.data')
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function import(Row $row, array $old_destination_id_values = array()) {
-    $uid = $row->getDestinationProperty('uid');
-    $module = $row->getDestinationProperty('module');
-    $key = $row->getDestinationProperty('key');
-    $this->userData->set($module, $uid, $key, $row->getDestinationProperty('settings'));
-
-    return [$uid, $module, $key];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getIds() {
-    $ids['uid']['type'] = 'integer';
-    $ids['module']['type'] = 'string';
-    $ids['key']['type'] = 'string';
-    return $ids;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fields(MigrationInterface $migration = NULL) {
-    return [
-      'uid' => 'The user id.',
-      'module' => 'The module name responsible for the settings.',
-      'key' => 'The setting key to save under.',
-      'settings' => 'The settings to save.',
-    ];
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldSettings.php b/core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldSettings.php
deleted file mode 100644
index 87e3d38..0000000
--- a/core/modules/user/src/Plugin/migrate/process/d6/ProfileFieldSettings.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\process\d6\ProfileFieldSettings.
- */
-
-namespace Drupal\user\Plugin\migrate\process\d6;
-
-use Drupal\migrate\MigrateExecutableInterface;
-use Drupal\migrate\ProcessPluginBase;
-use Drupal\migrate\Row;
-
-/**
- * @MigrateProcessPlugin(
- *   id = "d6_profile_field_settings"
- * )
- */
-class ProfileFieldSettings extends ProcessPluginBase {
-
-  /**
-   * {@inheritdoc}
-   *
-   * Set the profile field settings configuration.
-   */
-  public function transform($type, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
-    $settings = array();
-    switch ($type) {
-      case 'date':
-        $settings['datetime_type'] = 'date';
-        break;
-    }
-    return $settings;
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/process/d6/UserPicture.php b/core/modules/user/src/Plugin/migrate/process/d6/UserPicture.php
deleted file mode 100644
index 8438092..0000000
--- a/core/modules/user/src/Plugin/migrate/process/d6/UserPicture.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\process\d6\UserPicture.
- */
-
-namespace Drupal\user\Plugin\migrate\process\d6;
-
-use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
-use Drupal\migrate\Entity\MigrationInterface;
-use Drupal\migrate\MigrateExecutableInterface;
-use Drupal\migrate\Plugin\MigrateProcessInterface;
-use Drupal\migrate\ProcessPluginBase;
-use Drupal\migrate\Row;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-
-/**
- * The user picture process plugin.
- *
- * @MigrateProcessPlugin(
- *   id = "d6_user_picture"
- * )
- */
-class UserPicture extends ProcessPluginBase implements ContainerFactoryPluginInterface {
-
-  /**
-   * The migration plugin.
-   *
-   * @var \Drupal\migrate\Plugin\MigrateProcessInterface
-   */
-  protected $migrationPlugin;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, MigrateProcessInterface $migration_plugin) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition);
-    $this->migration = $migration;
-    $this->migrationPlugin = $migration_plugin;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) {
-    return new static(
-      $configuration,
-      $plugin_id,
-      $plugin_definition,
-      $migration,
-      $container->get('plugin.manager.migrate.process')->createInstance('migration', array('migration' => 'd6_user_picture_file'), $migration)
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
-    return $row->getSourceProperty('picture') ? $this->migrationPlugin->transform($value, $migrate_executable, $row, $destination_property) : NULL;
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/process/d6/UserUpdate7002.php b/core/modules/user/src/Plugin/migrate/process/d6/UserUpdate7002.php
deleted file mode 100644
index 9104b439c..0000000
--- a/core/modules/user/src/Plugin/migrate/process/d6/UserUpdate7002.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\process\d6\UserUpdate7002.
- */
-
-namespace Drupal\user\Plugin\migrate\process\d6;
-
-use Drupal\migrate\MigrateExecutableInterface;
-use Drupal\migrate\ProcessPluginBase;
-use Drupal\migrate\Row;
-
-/**
- * Converts user time zones from time zone offsets to time zone names.
- *
- * @MigrateProcessPlugin(
- *   id = "user_update_7002"
- * )
- */
-class UserUpdate7002 extends ProcessPluginBase {
-
-  /**
-   * System timezones.
-   *
-   * @var array
-   */
-  protected static $timezones;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition);
-    if (!isset(static::$timezones)) {
-      static::$timezones = system_time_zones();
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
-    $timezone = NULL;
-
-    if ($row->hasSourceProperty('timezone_name')) {
-      if (isset(static::$timezones[$row->getSourceProperty('timezone_name')])) {
-        $timezone = $row->getSourceProperty('timezone_name');
-      }
-    }
-    if (!$timezone && $row->hasSourceProperty('event_timezone')) {
-      if (isset(static::$timezones[$row->getSourceProperty('event_timezone')])) {
-        $timezone = $row->getSourceProperty('event_timezone');
-      }
-    }
-
-    return $timezone;
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/process/d6/UserUpdate8002.php b/core/modules/user/src/Plugin/migrate/process/d6/UserUpdate8002.php
deleted file mode 100644
index ff8a816..0000000
--- a/core/modules/user/src/Plugin/migrate/process/d6/UserUpdate8002.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\process\d6\UserUpdate8002.
- */
-
-namespace Drupal\user\Plugin\migrate\process\d6;
-use Drupal\migrate\MigrateExecutableInterface;
-use Drupal\migrate\ProcessPluginBase;
-use Drupal\migrate\Row;
-
-/**
- * Keep the predefined roles for rid 1 and 2.
- *
- * @MigrateProcessPlugin(
- *   id = "user_update_8002"
- * )
- */
-class UserUpdate8002 extends ProcessPluginBase {
-
-  /**
-   * {@inheritdoc}
-   *
-   * Keep the predefined roles for rid 1 and 2.
-   */
-  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
-    $rid = $row->getSourceProperty('rid');
-    $map = array(
-      1 => 'anonymous',
-      2 => 'authenticated',
-    );
-    return isset($map[$rid]) ? $map[$rid] : $value;
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/source/d6/ProfileField.php b/core/modules/user/src/Plugin/migrate/source/d6/ProfileField.php
deleted file mode 100644
index 68498b2..0000000
--- a/core/modules/user/src/Plugin/migrate/source/d6/ProfileField.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\source\d6\ProfileField.
- */
-
-namespace Drupal\user\Plugin\migrate\source\d6;
-
-use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
-use Drupal\migrate\Row;
-
-/**
- * Drupal 6 profile fields source from database.
- *
- * @MigrateSource(
- *   id = "d6_profile_field",
- *   source_provider = "profile"
- * )
- */
-class ProfileField extends DrupalSqlBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function query() {
-    $query = $this->select('profile_fields', 'pf')
-      ->fields('pf', array(
-        'fid',
-        'title',
-        'name',
-        'explanation',
-        'category',
-        'page',
-        'type',
-        'weight',
-        'required',
-        'register',
-        'visibility',
-        'autocomplete',
-        'options',
-      ));
-
-    return $query;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function prepareRow(Row $row) {
-    if ($row->getSourceProperty('type') == 'selection') {
-      // Get the current options.
-      $current_options = preg_split("/[\r\n]+/", $row->getSourceProperty('options'));
-      // Select the list values from the profile_values table to ensure we get
-      // them all since they can get out of sync with profile_fields.
-      $options = $this->getDatabase()->query('SELECT DISTINCT value FROM {profile_values} WHERE fid = :fid', array(':fid' => $row->getSourceProperty('fid')))->fetchCol();
-      $options = array_merge($current_options, $options);
-      // array_combine() takes care of any duplicates options.
-      $row->setSourceProperty('options', array_combine($options, $options));
-    }
-
-    if ($row->getSourceProperty('type') == 'checkbox') {
-      // D6 profile checkboxes values are always 0 or 1 (with no labels), so we
-      // need to create two label-less options that will get 0 and 1 for their
-      // keys.
-      $row->setSourceProperty('options', array(NULL, NULL));
-    }
-
-    return parent::prepareRow($row);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fields() {
-    return array(
-      'fid' => $this->t('Primary Key: Unique profile field ID.'),
-      'title' => $this->t('Title of the field shown to the end user.'),
-      'name' => $this->t('Internal name of the field used in the form HTML and URLs.'),
-      'explanation' => $this->t('Explanation of the field to end users.'),
-      'category' => $this->t('Profile category that the field will be grouped under.'),
-      'page' => $this->t("Title of page used for browsing by the field's value"),
-      'type' => $this->t('Type of form field.'),
-      'weight' => $this->t('Weight of field in relation to other profile fields.'),
-      'required' => $this->t('Whether the user is required to enter a value. (0 = no, 1 = yes)'),
-      'register' => $this->t('Whether the field is visible in the user registration form. (1 = yes, 0 = no)'),
-      'visibility' => $this->t('The level of visibility for the field. (0 = hidden, 1 = private, 2 = public on profile but not member list pages, 3 = public on profile and list pages)'),
-      'autocomplete' => $this->t('Whether form auto-completion is enabled. (0 = disabled, 1 = enabled)'),
-      'options' => $this->t('List of options to be used in a list selection field.'),
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getIds() {
-    $ids['fid']['type'] = 'integer';
-    return $ids;
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php b/core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php
deleted file mode 100644
index 9c17eff..0000000
--- a/core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldValues.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\source\d6\ProfileFieldValues.
- */
-
-namespace Drupal\user\Plugin\migrate\source\d6;
-
-use Drupal\migrate\Row;
-use Drupal\migrate\Plugin\SourceEntityInterface;
-use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
-
-/**
- * Drupal 6 profile fields values source.
- *
- * @MigrateSource(
- *   id = "d6_profile_field_values",
- *   source_provider = "profile"
- * )
- */
-class ProfileFieldValues extends DrupalSqlBase implements SourceEntityInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function query() {
-    $query = $this->select('profile_values', 'pv')
-      ->distinct()
-      ->fields('pv', array('fid', 'uid'));
-
-    return $query;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function prepareRow(Row $row) {
-    // Find profile values for this row.
-    $query = $this->select('profile_values', 'pv')
-      ->fields('pv', array('fid', 'value'));
-    $query->leftJoin('profile_fields', 'pf', 'pf.fid=pv.fid');
-    $query->fields('pf', array('name', 'type'));
-    $query->condition('uid', $row->getSourceProperty('uid'));
-    $results = $query->execute();
-
-    foreach ($results as $profile_value) {
-      // Check special case for date. We need to unserialize.
-      if ($profile_value['type'] == 'date') {
-        $date = unserialize($profile_value['value']);
-        $date = date('Y-m-d', mktime(0, 0, 0, $date['month'], $date['day'], $date['year']));
-        $row->setSourceProperty($profile_value['name'], array('value' => $date));
-      }
-      elseif ($profile_value['type'] == 'list') {
-        // Explode by newline and comma.
-        $row->setSourceProperty($profile_value['name'], preg_split("/[\r\n,]+/", $profile_value['value']));
-      }
-      else {
-        $row->setSourceProperty($profile_value['name'], array($profile_value['value']));
-      }
-    }
-
-    return parent::prepareRow($row);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fields() {
-    $fields = array(
-      'fid' => $this->t('Unique profile field ID.'),
-      'uid' => $this->t('The user Id.'),
-      'value' => $this->t('The value for this field.'),
-    );
-
-    $query = $this->select('profile_values', 'pv')
-      ->fields('pv', array('fid', 'value'));
-    $query->leftJoin('profile_fields', 'pf', 'pf.fid=pv.fid');
-    $query->fields('pf', array('name', 'title'));
-    $results = $query->execute();
-    foreach ($results as $profile) {
-      $fields[$profile['name']] = $this->t($profile['title']);
-    }
-
-    return $fields;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getIds() {
-    return array(
-      'uid' => array(
-        'type' => 'integer',
-        'alias' => 'pv',
-      ),
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function bundleMigrationRequired() {
-    return FALSE;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function entityTypeId() {
-    return 'user';
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/source/d6/Role.php b/core/modules/user/src/Plugin/migrate/source/d6/Role.php
deleted file mode 100644
index cc6bcaa..0000000
--- a/core/modules/user/src/Plugin/migrate/source/d6/Role.php
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\source\d6\Role.
- */
-
-namespace Drupal\user\Plugin\migrate\source\d6;
-
-use Drupal\migrate\Row;
-use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
-
-/**
- * Drupal 6 role source from database.
- *
- * @MigrateSource(
- *   id = "d6_user_role"
- * )
- */
-class Role extends DrupalSqlBase {
-
-  /**
-   * List of filter IDs per role IDs.
-   *
-   * @var array
-   */
-  protected $filterPermissions = array();
-
-  /**
-   * {@inheritdoc}
-   */
-  public function query() {
-    $query = $this->select('role', 'r')
-      ->fields('r', array('rid', 'name'))
-      ->orderBy('rid');
-    return $query;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fields() {
-    return array(
-      'rid' => $this->t('Role ID.'),
-      'name' => $this->t('The name of the user role.'),
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function initializeIterator() {
-    $filter_roles = $this->select('filter_formats', 'f')
-      ->fields('f', array('format', 'roles'))
-      ->execute()
-      ->fetchAllKeyed();
-    foreach ($filter_roles as $format => $roles) {
-      // Drupal 6 code: $roles = ','. implode(',', $roles) .',';
-      // Remove the beginning and ending comma.
-      foreach (explode(',', trim($roles, ',')) as $rid) {
-        $this->filterPermissions[$rid][] = $format;
-      }
-    }
-    return parent::initializeIterator();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function prepareRow(Row $row) {
-    $rid = $row->getSourceProperty('rid');
-    $permissions = $this->select('permission', 'p')
-      ->fields('p', array('perm'))
-      ->condition('rid', $rid)
-      ->execute()
-      ->fetchField();
-    $row->setSourceProperty('permissions', explode(', ', $permissions));
-    if (isset($this->filterPermissions[$rid])) {
-      $row->setSourceProperty("filter_permissions:$rid", $this->filterPermissions[$rid]);
-    }
-    return parent::prepareRow($row);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getIds() {
-    $ids['rid']['type'] = 'integer';
-    return $ids;
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/source/d6/User.php b/core/modules/user/src/Plugin/migrate/source/d6/User.php
deleted file mode 100644
index c347149..0000000
--- a/core/modules/user/src/Plugin/migrate/source/d6/User.php
+++ /dev/null
@@ -1,151 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\source\d6\User.
- */
-
-namespace Drupal\user\Plugin\migrate\source\d6;
-
-use Drupal\migrate\Plugin\SourceEntityInterface;
-use Drupal\migrate\Row;
-use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
-
-/**
- * Drupal 6 user source from database.
- *
- * @MigrateSource(
- *   id = "d6_user"
- * )
- */
-class User extends DrupalSqlBase implements SourceEntityInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function query() {
-    return $this->select('users', 'u')
-      ->fields('u', array_keys($this->baseFields()))
-      ->condition('uid', 1, '>');
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fields() {
-    $fields = $this->baseFields();
-
-    // Add roles field.
-    $fields['roles'] = $this->t('Roles');
-
-    // Profile fields.
-    if ($this->moduleExists('profile')) {
-      $fields += $this->select('profile_fields', 'pf')
-        ->fields('pf', array('name', 'title'))
-        ->execute()
-        ->fetchAllKeyed();
-    }
-
-    return $fields;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function prepareRow(Row $row) {
-    // User roles.
-    $roles = $this->select('users_roles', 'ur')
-      ->fields('ur', array('rid'))
-      ->condition('ur.uid', $row->getSourceProperty('uid'))
-      ->execute()
-      ->fetchCol();
-    $row->setSourceProperty('roles', $roles);
-
-    // We are adding here the Event contributed module column.
-    // @see https://api.drupal.org/api/drupal/modules%21user%21user.install/function/user_update_7002/7
-    if ($row->hasSourceProperty('timezone_id') && $row->getSourceProperty('timezone_id')) {
-      if ($this->getDatabase()->schema()->tableExists('event_timezones')) {
-        $event_timezone = $this->select('event_timezones', 'e')
-          ->fields('e', array('name'))
-          ->condition('e.timezone', $row->getSourceProperty('timezone_id'))
-          ->execute()
-          ->fetchField();
-        if ($event_timezone) {
-          $row->setSourceProperty('event_timezone', $event_timezone);
-        }
-      }
-    }
-
-    // Unserialize Data.
-    $row->setSourceProperty('data', unserialize($row->getSourceProperty('data')));
-
-    return parent::prepareRow($row);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getIds() {
-    return array(
-      'uid' => array(
-        'type' => 'integer',
-        'alias' => 'u',
-      ),
-    );
-  }
-
-  /**
-   * Returns the user base fields to be migrated.
-   *
-   * @return array
-   *   Associative array having field name as key and description as value.
-   */
-  protected function baseFields() {
-    $fields = array(
-      'uid' => $this->t('User ID'),
-      'name' => $this->t('Username'),
-      'pass' => $this->t('Password'),
-      'mail' => $this->t('Email address'),
-      'signature' => $this->t('Signature'),
-      'signature_format' => $this->t('Signature format'),
-      'created' => $this->t('Registered timestamp'),
-      'access' => $this->t('Last access timestamp'),
-      'login' => $this->t('Last login timestamp'),
-      'status' => $this->t('Status'),
-      'timezone' => $this->t('Timezone'),
-      'language' => $this->t('Language'),
-      'picture' => $this->t('Picture'),
-      'init' => $this->t('Init'),
-      'data' => $this->t('User data'),
-    );
-
-    // Possible field added by Date contributed module.
-    // @see https://api.drupal.org/api/drupal/modules%21user%21user.install/function/user_update_7002/7
-    if ($this->getDatabase()->schema()->fieldExists('users', 'timezone_name')) {
-      $fields['timezone_name'] = $this->t('Timezone (Date)');
-    }
-
-    // Possible field added by Event contributed module.
-    // @see https://api.drupal.org/api/drupal/modules%21user%21user.install/function/user_update_7002/7
-    if ($this->getDatabase()->schema()->fieldExists('users', 'timezone_id')) {
-      $fields['timezone_id'] = $this->t('Timezone (Event)');
-    }
-
-    return $fields;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function bundleMigrationRequired() {
-    return FALSE;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function entityTypeId() {
-    return 'user';
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php b/core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php
deleted file mode 100644
index e4658d8..0000000
--- a/core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\source\d6\UserPicture.
- */
-
-namespace Drupal\user\Plugin\migrate\source\d6;
-
-use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
-
-/**
- * Drupal 6 user picture source from database.
- *
- * @todo Support default picture?
- *
- * @MigrateSource(
- *   id = "d6_user_picture"
- * )
- */
-class UserPicture extends DrupalSqlBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function query() {
-    $query = $this->select('users', 'u')
-      ->condition('picture', '', '<>')
-      ->fields('u', array('uid', 'access', 'picture'))
-      ->orderBy('access');
-    return $query;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fields() {
-    return array(
-      'uid' => 'Primary Key: Unique user ID.',
-      'access' => 'Timestamp for previous time user accessed the site.',
-      'picture' => "Path to the user's uploaded picture.",
-    );
-  }
-  /**
-   * {@inheritdoc}
-   */
-  public function getIds() {
-    $ids['uid']['type'] = 'integer';
-    return $ids;
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php b/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php
deleted file mode 100644
index ff0d1ae..0000000
--- a/core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\source\d6\UserPictureFile.
- */
-
-namespace Drupal\user\Plugin\migrate\source\d6;
-
-use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
-use Drupal\migrate\Row;
-
-/**
- * Drupal 6 user picture source from database.
- *
- * @MigrateSource(
- *   id = "d6_user_picture_file"
- * )
- */
-class UserPictureFile extends DrupalSqlBase {
-
-  /**
-   * The file directory path.
-   *
-   * @var string
-   */
-  protected $filePath;
-
-  /**
-   * The temporary file path.
-   *
-   * @var string
-   */
-  protected $tempFilePath;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function query() {
-    $query = $this->select('users', 'u')
-      ->condition('picture', '', '<>')
-      ->fields('u', array('uid', 'picture'));
-    return $query;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function initializeIterator() {
-    $site_path = isset($this->configuration['site_path']) ? $this->configuration['site_path'] : 'sites/default';
-    $this->filePath = $this->variableGet('file_directory_path', $site_path . '/files') . '/';
-    $this->tempFilePath = $this->variableGet('file_directory_temp', '/tmp') . '/';
-    return parent::initializeIterator();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function prepareRow(Row $row) {
-    $row->setSourceProperty('filename', basename($row->getSourceProperty('picture')));
-    $row->setSourceProperty('file_directory_path', $this->filePath);
-    $row->setSourceProperty('temp_directory_path', $this->tempFilePath);
-    return parent::prepareRow($row);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fields() {
-    return array(
-      'picture' => "Path to the user's uploaded picture.",
-      'filename' => 'The picture filename.',
-    );
-  }
-  /**
-   * {@inheritdoc}
-   */
-  public function getIds() {
-    $ids['uid']['type'] = 'integer';
-    return $ids;
-  }
-
-}
diff --git a/core/modules/user/src/Plugin/migrate/source/d6/UserPictureInstance.php b/core/modules/user/src/Plugin/migrate/source/d6/UserPictureInstance.php
deleted file mode 100644
index 48e409b..0000000
--- a/core/modules/user/src/Plugin/migrate/source/d6/UserPictureInstance.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\migrate\source\d6\UserPictureInstance.
- */
-
-namespace Drupal\user\Plugin\migrate\source\d6;
-
-use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
-use Drupal\migrate\Plugin\migrate\source\DummyQueryTrait;
-
-/**
- * Drupal 6 user picture field instance source.
- *
- * @todo Support default picture?
- *
- * @MigrateSource(
- *   id = "d6_user_picture_instance"
- * )
- */
-class UserPictureInstance extends DrupalSqlBase {
-
-  use DummyQueryTrait;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function initializeIterator() {
-    return new \ArrayIterator(array(
-      array(
-        'id' => '',
-        'file_directory' => $this->variableGet('user_picture_path', 'pictures'),
-        'max_filesize' => $this->variableGet('user_picture_file_size', '30') . 'KB',
-        'max_resolution' => $this->variableGet('user_picture_dimensions', '85x85'),
-      )));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function count() {
-    // This source provides a single row, corresponding to a single picture
-    // field to be added to the user entity.
-    return 1;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function fields() {
-    return array(
-      'file_directory' => 'The directory to store images..',
-      'max_filesize' => 'The maximum allowed file size in KBs.',
-      'max_resolution' => "The maximum resolution.",
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getIds() {
-    $ids['id']['type'] = 'string';
-    return $ids;
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserConfigsTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserConfigsTest.php
deleted file mode 100644
index 9fa2bab..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserConfigsTest.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserConfigsTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\config\Tests\SchemaCheckTestTrait;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * Upgrade variables to user.*.yml.
- *
- * @group user
- */
-class MigrateUserConfigsTest extends MigrateDrupal6TestBase {
-
-  use SchemaCheckTestTrait;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    $this->loadDumps(['Variable.php']);
-    $this->executeMigration('d6_user_mail');
-    $this->executeMigration('d6_user_settings');
-  }
-
-  /**
-   * Tests migration of user variables to user.mail.yml.
-   */
-  public function testUserMail() {
-    $config = $this->config('user.mail');
-    $this->assertIdentical('Account details for !username at !site (approved)', $config->get('status_activated.subject'));
-    $this->assertIdentical("!username,\n\nYour account at !site has been activated.\n\nYou may now log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\nOnce you have set your own password, you will be able to log in to !login_uri in the future using:\n\nusername: !username\n", $config->get('status_activated.body'));
-    $this->assertIdentical('Replacement login information for !username at !site', $config->get('password_reset.subject'));
-    $this->assertIdentical("!username,\n\nA request to reset the password for your account has been made at !site.\n\nYou may now log in to !uri_brief by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.", $config->get('password_reset.body'));
-    $this->assertIdentical('Account details for !username at !site (deleted)', $config->get('cancel_confirm.subject'));
-    $this->assertIdentical("!username,\n\nYour account on !site has been deleted.", $config->get('cancel_confirm.body'));
-    $this->assertIdentical('An administrator created an account for you at !site', $config->get('register_admin_created.subject'));
-    $this->assertIdentical("!username,\n\nA site administrator at !site has created an account for you. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n--  !site team", $config->get('register_admin_created.body'));
-    $this->assertIdentical('Account details for !username at !site', $config->get('register_no_approval_required.subject'));
-    $this->assertIdentical("!username,\n\nThank you for registering at !site. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n--  !site team", $config->get('register_no_approval_required.body'));
-    $this->assertIdentical('Account details for !username at !site (pending admin approval)', $config->get('register_pending_approval.subject'));
-    $this->assertIdentical("!username,\n\nThank you for registering at !site. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n--  !site team", $config->get('register_pending_approval.body'));
-    $this->assertIdentical('Account details for !username at !site (blocked)', $config->get('status_blocked.subject'));
-    $this->assertIdentical("!username,\n\nYour account on !site has been blocked.", $config->get('status_blocked.body'));
-    $this->assertConfigSchema(\Drupal::service('config.typed'), 'user.mail', $config->get());
-  }
-
-  /**
-   * Tests migration of user variables to user.settings.yml.
-   */
-  public function testUserSettings() {
-    $config = $this->config('user.settings');
-    $this->assertIdentical(TRUE, $config->get('notify.status_blocked'));
-    $this->assertIdentical(FALSE, $config->get('notify.status_activated'));
-    $this->assertIdentical(FALSE, $config->get('verify_mail'));
-    $this->assertIdentical('admin_only', $config->get('register'));
-    $this->assertIdentical('Guest', $config->get('anonymous'));
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserContactSettingsTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserContactSettingsTest.php
deleted file mode 100644
index 33637af..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserContactSettingsTest.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserContactSettingsTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * Users contact settings migration.
- *
- * @group user
- */
-class MigrateUserContactSettingsTest extends MigrateDrupal6TestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = ['contact'];
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $this->installSchema('user', array('users_data'));
-
-    $this->loadDumps([
-      'Users.php',
-      'ProfileValues.php',
-      'UsersRoles.php',
-      'EventTimezones.php',
-    ]);
-
-    $id_mappings = array(
-      'd6_user' => array(
-        array(array(2), array(2)),
-        array(array(8), array(8)),
-        array(array(15), array(15)),
-      ),
-    );
-    $this->prepareMigrations($id_mappings);
-
-    $this->executeMigration('d6_user_contact_settings');
-  }
-
-  /**
-   * Tests the Drupal6 user contact settings migration.
-   */
-  public function testUserContactSettings() {
-    $user_data = \Drupal::service('user.data');
-    $module = $key = 'contact';
-    $uid = 2;
-    $setting = $user_data->get($module, $uid, $key);
-    $this->assertIdentical('1', $setting);
-
-    $uid = 8;
-    $setting = $user_data->get($module, $uid, $key);
-    $this->assertIdentical('0', $setting);
-
-    $uid = 15;
-    $setting = $user_data->get($module, $uid, $key);
-    $this->assertIdentical(NULL, $setting);
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureEntityDisplayTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureEntityDisplayTest.php
deleted file mode 100644
index 4e76357..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureEntityDisplayTest.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureEntityDisplayTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * User picture entity display.
- *
- * @group user
- */
-class MigrateUserPictureEntityDisplayTest extends MigrateDrupal6TestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  static $modules = array('image');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $id_mappings = array(
-      'd6_user_picture_field_instance' => array(
-        array(array(1), array('user', 'user', 'user_picture')),
-      ),
-    );
-    $this->prepareMigrations($id_mappings);
-    $this->executeMigration('d6_user_picture_entity_display');
-  }
-
-  /**
-   * Tests the Drupal 6 user picture to Drupal 8 entity display migration.
-   */
-  public function testUserPictureEntityDisplay() {
-    $display = entity_get_display('user', 'user', 'default');
-    $component = $display->getComponent('user_picture');
-    $this->assertIdentical('image', $component['type']);
-    $this->assertIdentical('content', $component['settings']['image_link']);
-
-    $this->assertIdentical(array('user', 'user', 'default', 'user_picture'), entity_load('migration', 'd6_user_picture_entity_display')->getIdMap()->lookupDestinationID(array('')));
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureEntityFormDisplayTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureEntityFormDisplayTest.php
deleted file mode 100644
index 868977b..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureEntityFormDisplayTest.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureEntityFormDisplayTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * User picture entity form display.
- *
- * @group user
- */
-class MigrateUserPictureEntityFormDisplayTest extends MigrateDrupal6TestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  static $modules = array('image');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    $id_mappings = array(
-      'd6_user_picture_field_instance' => array(
-        array(array(1), array('user', 'user', 'user_picture')),
-      ),
-    );
-    $this->prepareMigrations($id_mappings);
-    $this->executeMigration('d6_user_picture_entity_form_display');
-  }
-
-  /**
-   * Tests the Drupal 6 user picture to Drupal 8 entity form display migration.
-   */
-  public function testUserPictureEntityFormDisplay() {
-    $display = entity_get_form_display('user', 'user', 'default');
-    $component = $display->getComponent('user_picture');
-    $this->assertIdentical('image_image', $component['type']);
-    $this->assertIdentical('throbber', $component['settings']['progress_indicator']);
-
-    $this->assertIdentical(array('user', 'user', 'default', 'user_picture'), entity_load('migration', 'd6_user_picture_entity_form_display')->getIdMap()->lookupDestinationID(array('')));
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureFieldTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureFieldTest.php
deleted file mode 100644
index d3c1acb..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureFieldTest.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureFieldTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * User picture field migration.
- *
- * @group user
- */
-class MigrateUserPictureFieldTest extends MigrateDrupal6TestBase {
-
-  static $modules = array('image', 'file');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    $this->executeMigration('d6_user_picture_field');
-  }
-
-  /**
-   * Test the user picture field migration.
-   */
-  public function testUserPictureField() {
-    $field_storage = FieldStorageConfig::load('user.user_picture');
-    $this->assertIdentical('user.user_picture', $field_storage->id());
-    $this->assertIdentical(array('user', 'user_picture'), entity_load('migration', 'd6_user_picture_field')->getIdMap()->lookupDestinationID(array('')));
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureFileTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureFileTest.php
deleted file mode 100644
index 650e6f2..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureFileTest.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureFileTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\file\Entity\File;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * User pictures migration.
- *
- * @group user
- */
-class MigrateUserPictureFileTest extends MigrateDrupal6TestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('file');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $this->installEntitySchema('file');
-    $this->loadDumps([
-      'Users.php',
-      'ProfileValues.php',
-      'UsersRoles.php',
-      'EventTimezones.php',
-    ]);
-
-    /** @var \Drupal\migrate\Entity\MigrationInterface $migration */
-    $migration = entity_load('migration', 'd6_user_picture_file');
-    $source = $migration->get('source');
-    $source['site_path'] = 'core/modules/simpletest';
-    $migration->set('source', $source);
-    $this->executeMigration($migration);
-  }
-
-  /**
-   * Tests the Drupal 6 user pictures to Drupal 8 migration.
-   */
-  public function testUserPictures() {
-    $file_ids = array();
-    foreach (entity_load('migration', 'd6_user_picture_file')->getIdMap() as $destination_ids) {
-      $file_ids[] = reset($destination_ids);
-    }
-    $files = File::loadMultiple($file_ids);
-    /** @var \Drupal\file\FileInterface $file */
-    $file = array_shift($files);
-    $this->assertIdentical('image-test.jpg', $file->getFilename());
-    $this->assertIdentical('public://image-test.jpg', $file->getFileUri());
-    $this->assertIdentical('2', $file->getOwnerId());
-    $this->assertIdentical('1901', $file->getSize());
-    $this->assertIdentical('image/jpeg', $file->getMimeType());
-
-    $file = array_shift($files);
-    $this->assertIdentical('image-test.png', $file->getFilename());
-    $this->assertIdentical('public://image-test.png', $file->getFileUri());
-    $this->assertIdentical('8', $file->getOwnerId());
-    $this->assertFalse($files);
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureInstanceTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureInstanceTest.php
deleted file mode 100644
index 45813ad..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserPictureInstanceTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureInstanceTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\field\Entity\FieldConfig;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * User picture field instance migration.
- *
- * @group user
- */
-class MigrateUserPictureInstanceTest extends MigrateDrupal6TestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  static $modules = array('image', 'file');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    // Add some node mappings to get past checkRequirements().
-    $id_mappings = array(
-      'd6_user_picture_field' => array(
-        array(array('user_upload'), array('name', 'bundle')),
-      ),
-    );
-    $this->prepareMigrations($id_mappings);
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'user_picture',
-      'type' => 'image',
-      'translatable' => '0',
-    ))->save();
-
-    $this->executeMigration('d6_user_picture_field_instance');
-  }
-
-  /**
-   * Tests the Drupal 6 user picture to Drupal 8 picture field instance migration.
-   */
-  public function testUserPictureFieldInstance() {
-    $field = FieldConfig::load('user.user.user_picture');
-    $settings = $field->getSettings();
-    $this->assertIdentical('png gif jpg jpeg', $settings['file_extensions']);
-    $this->assertIdentical('pictures', $settings['file_directory']);
-    $this->assertIdentical('30KB', $settings['max_filesize']);
-    $this->assertIdentical('85x85', $settings['max_resolution']);
-
-    $this->assertIdentical(array('user', 'user', 'user_picture'), entity_load('migration', 'd6_user_picture_field_instance')->getIdMap()->lookupDestinationID(array('')));
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileEntityDisplayTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileEntityDisplayTest.php
deleted file mode 100644
index a1e9d16..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileEntityDisplayTest.php
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileEntityDisplayTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\Core\Database\Database;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * Tests the user profile entity display migration.
- *
- * @group user
- */
-class MigrateUserProfileEntityDisplayTest extends MigrateDrupal6TestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  static $modules = array('link', 'options', 'datetime', 'text');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    // Create some fields so the data gets stored.
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_color',
-      'type' => 'text',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_biography',
-      'type' => 'text_long',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_sell_address',
-      'type' => 'boolean',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_sold_to',
-      'type' => 'list_string',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_bands',
-      'type' => 'text',
-      'cardinality' => -1,
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_blog',
-      'type' => 'link',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_birthdate',
-      'type' => 'datetime',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_love_migrations',
-      'type' => 'boolean',
-    ))->save();
-
-    $this->loadDumps([
-      'ProfileFields.php',
-      'Users.php',
-      'ProfileValues.php',
-      'UsersRoles.php',
-      'EventTimezones.php',
-    ]);
-
-    $field_data = Database::getConnection('default', 'migrate')
-      ->select('profile_fields', 'u')
-      ->fields('u')
-      ->execute()
-      ->fetchAll();
-    foreach ($field_data as $field) {
-      entity_create('field_config', array(
-        'label' => $field->title,
-        'description' => '',
-        'field_name' => $field->name,
-        'entity_type' => 'user',
-        'bundle' => 'user',
-        'required' => 1,
-      ))->save();
-    }
-
-    $this->executeMigration('d6_user_profile_entity_display');
-  }
-
-  /**
-   * Tests migration of user profile fields.
-   */
-  public function testUserProfileFields() {
-    $display = entity_get_display('user', 'user', 'default');
-
-    // Test a text field.
-    $component = $display->getComponent('profile_color');
-    $this->assertIdentical('text_default', $component['type']);
-
-    // Test a list field.
-    $component = $display->getComponent('profile_bands');
-    $this->assertIdentical('text_default', $component['type']);
-
-    // Test a date field.
-    $component = $display->getComponent('profile_birthdate');
-    $this->assertIdentical('datetime_default', $component['type']);
-
-    // Test PROFILE_PRIVATE field is hidden.
-    $this->assertNull($display->getComponent('profile_sell_address'));
-
-    // Test PROFILE_HIDDEN field is hidden.
-    $this->assertNull($display->getComponent('profile_sold_to'));
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileEntityFormDisplayTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileEntityFormDisplayTest.php
deleted file mode 100644
index a863abe..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileEntityFormDisplayTest.php
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileEntityFormDisplayTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\Core\Database\Database;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * Tests the user profile entity form display migration.
- *
- * @group user
- */
-class MigrateUserProfileEntityFormDisplayTest extends MigrateDrupal6TestBase {
-
-  static $modules = array('link', 'options', 'datetime', 'text');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    // Create some fields so the data gets stored.
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_color',
-      'type' => 'text',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_biography',
-      'type' => 'text_long',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_sell_address',
-      'type' => 'boolean',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_sold_to',
-      'type' => 'list_string',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_bands',
-      'type' => 'text',
-      'cardinality' => -1,
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_blog',
-      'type' => 'link',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_birthdate',
-      'type' => 'datetime',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_love_migrations',
-      'type' => 'boolean',
-    ))->save();
-
-    $this->loadDumps([
-      'ProfileFields.php',
-      'Users.php',
-      'ProfileValues.php',
-      'UsersRoles.php',
-      'EventTimezones.php',
-    ]);
-
-    $field_data = Database::getConnection('default', 'migrate')
-      ->select('profile_fields', 'u')
-      ->fields('u')
-      ->execute()
-      ->fetchAll();
-    foreach ($field_data as $field) {
-      entity_create('field_config', array(
-        'label' => $field->title,
-        'description' => '',
-        'field_name' => $field->name,
-        'entity_type' => 'user',
-        'bundle' => 'user',
-        'required' => 1,
-      ))->save();
-    }
-
-    $this->executeMigration('d6_user_profile_entity_form_display');
-  }
-
-  /**
-   * Tests migration of user profile fields.
-   */
-  public function testUserProfileEntityFormDisplay() {
-    $display = entity_get_form_display('user', 'user', 'default');
-
-    // Test a text field.
-    $component = $display->getComponent('profile_color');
-    $this->assertIdentical('text_textfield', $component['type']);
-
-    // Test a list field.
-    $component = $display->getComponent('profile_bands');
-    $this->assertIdentical('text_textfield', $component['type']);
-
-    // Test a date field.
-    $component = $display->getComponent('profile_birthdate');
-    $this->assertIdentical('datetime_default', $component['type']);
-
-    // Test PROFILE_PRIVATE field is hidden.
-    $this->assertNull($display->getComponent('profile_sell_address'));
-
-    // Test PROFILE_HIDDEN field is hidden.
-    $this->assertNull($display->getComponent('profile_sold_to'));
-
-    // Test that a checkbox field has the proper display label setting.
-    $component = $display->getComponent('profile_love_migrations');
-    $this->assertIdentical('boolean_checkbox', $component['type']);
-    $this->assertIdentical(true, $component['settings']['display_label']);
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileFieldInstanceTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileFieldInstanceTest.php
deleted file mode 100644
index 2b775ed..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileFieldInstanceTest.php
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileFieldInstanceTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\field\Entity\FieldConfig;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * Tests the user profile field instance migration.
- *
- * @group user
- */
-class MigrateUserProfileFieldInstanceTest extends MigrateDrupal6TestBase {
-
-  static $modules = array('field', 'link', 'options', 'datetime', 'text');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    // Add some id mappings for the dependant migrations.
-    $id_mappings = array(
-      'd6_user_profile_field' => array(
-        array(array(1), array('user', 'profile_color')),
-      ),
-    );
-    $this->prepareMigrations($id_mappings);
-    $this->createFields();
-    $this->loadDumps(array(
-      'ProfileFields.php',
-      'Users.php',
-      'ProfileValues.php',
-      'UsersRoles.php',
-      'EventTimezones.php',
-    ));
-    $this->executeMigration('d6_user_profile_field_instance');
-  }
-
-  /**
-   * Tests migration of user profile fields.
-   */
-  public function testUserProfileFields() {
-    // Migrated a text field.
-    $field = FieldConfig::load('user.user.profile_color');
-    $this->assertIdentical('Favorite color', $field->label());
-    $this->assertIdentical('List your favorite color', $field->getDescription());
-
-    // Migrated a textarea.
-    $field = FieldConfig::load('user.user.profile_biography');
-    $this->assertIdentical('Biography', $field->label());
-    $this->assertIdentical('Tell people a little bit about yourself', $field->getDescription());
-
-    // Migrated checkbox field.
-    $field = FieldConfig::load('user.user.profile_sell_address');
-    $this->assertIdentical('Sell your email address?', $field->label());
-    $this->assertIdentical("If you check this box, we'll sell your address to spammers to help line the pockets of our shareholders. Thanks!", $field->getDescription());
-
-    // Migrated selection field.
-    $field = FieldConfig::load('user.user.profile_sold_to');
-    $this->assertIdentical('Sales Category', $field->label());
-    $this->assertIdentical("Select the sales categories to which this user's address was sold.", $field->getDescription());
-
-    // Migrated list field.
-    $field = FieldConfig::load('user.user.profile_bands');
-    $this->assertIdentical('Favorite bands', $field->label());
-    $this->assertIdentical("Enter your favorite bands. When you've saved your profile, you'll be able to find other people with the same favorites.", $field->getDescription());
-
-/*
-    // Migrated URL field.
-    $field = FieldConfig::load('user.user.profile_blog');
-    $this->assertIdentical('Your blog', $field->label());
-    $this->assertIdentical("Paste the full URL, $field->getDescription(), including http://, of your personal blog.");
-*/
-
-    // Migrated date field.
-    $field = FieldConfig::load('user.user.profile_birthdate');
-    $this->assertIdentical('Birthdate', $field->label());
-    $this->assertIdentical("Enter your birth date and we'll send you a coupon.", $field->getDescription());
-
-    // Another migrated checkbox field, with a different source visibility setting.
-    $field = FieldConfig::load('user.user.profile_love_migrations');
-    $this->assertIdentical('I love migrations', $field->label());
-    $this->assertIdentical("If you check this box, you love migrations.", $field->getDescription());
-  }
-
-  /**
-   * Helper to create fields.
-   */
-  protected function createFields() {
-    $fields = array(
-      'profile_color' => 'text',
-      'profile_biography' => 'text_long',
-      'profile_sell_address' => 'boolean',
-      'profile_sold_to' => 'list_string',
-      'profile_bands' => 'text',
-      'profile_blog' => 'link',
-      'profile_birthdate' => 'datetime',
-      'profile_love_migrations' => 'boolean',
-    );
-    foreach ($fields as $name => $type) {
-      entity_create('field_storage_config', array(
-        'field_name' => $name,
-        'entity_type' => 'user',
-        'type' => $type,
-      ))->save();
-    }
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileFieldTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileFieldTest.php
deleted file mode 100644
index fd739ae..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileFieldTest.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileFieldTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\field\Entity\FieldStorageConfig;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * Tests the user profile field migration.
- *
- * @group user
- */
-class MigrateUserProfileFieldTest extends MigrateDrupal6TestBase {
-
-  static $modules = array('link', 'options', 'datetime', 'text');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    $this->loadDumps([
-      'ProfileFields.php',
-      'Users.php',
-      'ProfileValues.php',
-      'UsersRoles.php',
-      'EventTimezones.php',
-    ]);
-    $this->executeMigration('d6_user_profile_field');
-  }
-
-  /**
-   * Tests migration of user profile fields.
-   */
-  public function testUserProfileFields() {
-    // Migrated a text field.
-    $field_storage = FieldStorageConfig::load('user.profile_color');
-    $this->assertIdentical('text', $field_storage->getType(), 'Field type is text.');
-    $this->assertIdentical(1, $field_storage->getCardinality(), 'Text field has correct cardinality');
-
-    // Migrated a textarea.
-    $field_storage = FieldStorageConfig::load('user.profile_biography');
-    $this->assertIdentical('text_long', $field_storage->getType(), 'Field type is text_long.');
-
-    // Migrated checkbox field.
-    $field_storage = FieldStorageConfig::load('user.profile_sell_address');
-    $this->assertIdentical('boolean', $field_storage->getType(), 'Field type is boolean.');
-
-    // Migrated selection field.
-    $field_storage = FieldStorageConfig::load('user.profile_sold_to');
-    $this->assertIdentical('list_string', $field_storage->getType(), 'Field type is list_string.');
-    $settings = $field_storage->getSettings();
-    $this->assertEqual($settings['allowed_values'], array(
-      'Pill spammers' => 'Pill spammers',
-      'Fitness spammers' => 'Fitness spammers',
-      'Back\slash' => 'Back\slash',
-      'Forward/slash' => 'Forward/slash',
-      'Dot.in.the.middle' => 'Dot.in.the.middle',
-      'Faithful servant' => 'Faithful servant',
-      'Anonymous donor' => 'Anonymous donor',
-    ));
-    $this->assertIdentical('list_string', $field_storage->getType(), 'Field type is list_string.');
-
-    // Migrated list field.
-    $field_storage = FieldStorageConfig::load('user.profile_bands');
-    $this->assertIdentical('text', $field_storage->getType(), 'Field type is text.');
-    $this->assertIdentical(-1, $field_storage->getCardinality(), 'List field has correct cardinality');
-
-/*
-    // Migrated URL field.
-    $field_storage = FieldStorageConfig::load('user.profile_blog');
-    $this->assertIdentical('link', $field_storage->getType(), 'Field type is link.');
-*/
-
-    // Migrated date field.
-    $field_storage = FieldStorageConfig::load('user.profile_birthdate');
-    $this->assertIdentical('datetime', $field_storage->getType(), 'Field type is datetime.');
-    $this->assertIdentical('date', $field_storage->getSettings()['datetime_type']);
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileValuesTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileValuesTest.php
deleted file mode 100644
index 303013f..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserProfileValuesTest.php
+++ /dev/null
@@ -1,174 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileValuesTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-use Drupal\Core\Database\Database;
-use Drupal\user\Entity\User;
-
-/**
- * User profile values migration.
- *
- * @group user
- */
-class MigrateUserProfileValuesTest extends MigrateDrupal6TestBase {
-
-  /**
-   * The modules to be enabled during the test.
-   *
-   * @var array
-   */
-  static $modules = array(
-    'link',
-    'options',
-    'datetime',
-    'text',
-    'file',
-    'image',
-  );
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    // Create some fields so the data gets stored.
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_color',
-      'type' => 'text',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_biography',
-      'type' => 'text_long',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_sell_address',
-      'type' => 'boolean',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_sold_to',
-      'type' => 'list_string',
-      'settings' => array(
-        'allowed_values' => array(
-          'Pill spammers' => 'Pill spammers',
-          'Fitness spammers' => 'Fitness spammers',
-        )
-      )
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_bands',
-      'type' => 'text',
-      'cardinality' => -1,
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_blog',
-      'type' => 'link',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_birthdate',
-      'type' => 'datetime',
-    ))->save();
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'profile_love_migrations',
-      'type' => 'boolean',
-    ))->save();
-
-    // Add some id mappings for the dependant migrations.
-    $id_mappings = array(
-      'd6_user_profile_field_instance' => array(
-        array(array(1), array('user', 'user', 'fieldname')),
-      ),
-      'd6_user_profile_entity_display' => array(
-        array(array(1), array('user', 'user', 'default', 'fieldname')),
-      ),
-      'd6_user_profile_entity_form_display' => array(
-        array(array(1), array('user', 'user', 'default', 'fieldname')),
-      ),
-      'd6_user' => array(
-        array(array(2), array(2)),
-        array(array(8), array(8)),
-        array(array(15), array(15)),
-      ),
-    );
-    $this->prepareMigrations($id_mappings);
-
-    $this->loadDumps([
-      'ProfileFields.php',
-      'Users.php',
-      'ProfileValues.php',
-      'UsersRoles.php',
-      'EventTimezones.php',
-    ]);
-
-    $field_data = Database::getConnection('default', 'migrate')
-      ->select('profile_fields', 'u')
-      ->fields('u')
-      ->execute()
-      ->fetchAll();
-    // Create the field instances.
-    foreach ($field_data as $field) {
-      entity_create('field_config', array(
-        'label' => $field->title,
-        'description' => '',
-        'field_name' => $field->name,
-        'entity_type' => 'user',
-        'bundle' => 'user',
-        'required' => 0,
-      ))->save();
-    }
-
-    // Create our users for the node authors.
-    $query = Database::getConnection('default', 'migrate')->query('SELECT * FROM {users} WHERE uid NOT IN (0, 1)');
-    while(($row = $query->fetchAssoc()) !== FALSE) {
-      $user = entity_create('user', $row);
-      $user->enforceIsNew();
-      $user->save();
-    }
-
-    $migration_format = entity_load('migration', 'd6_profile_values:user');
-    $this->executeMigration($migration_format);
-  }
-
-  /**
-   * Tests Drupal 6 profile values to Drupal 8 migration.
-   */
-  public function testUserProfileValues() {
-    $user = User::load(2);
-    $this->assertFalse(is_null($user));
-    $this->assertIdentical('red', $user->profile_color->value);
-    $expected = <<<EOT
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nulla sapien, congue nec risus ut, adipiscing aliquet felis. Maecenas quis justo vel nulla varius euismod. Quisque metus metus, cursus sit amet sem non, bibendum vehicula elit. Cras dui nisl, eleifend at iaculis vitae, lacinia ut felis. Nullam aliquam ligula volutpat nulla consectetur accumsan. Maecenas tincidunt molestie diam, a accumsan enim fringilla sit amet. Morbi a tincidunt tellus. Donec imperdiet scelerisque porta. Sed quis sem bibendum eros congue sodales. Vivamus vel fermentum est, at rutrum orci. Nunc consectetur purus ut dolor pulvinar, ut volutpat felis congue. Cras tincidunt odio sed neque sollicitudin, vehicula tempor metus scelerisque.
-EOT;
-    $this->assertIdentical($expected, $user->profile_biography->value);
-    $this->assertIdentical('1', $user->profile_sell_address->value);
-    $this->assertIdentical('Back\slash', $user->profile_sold_to->value);
-    $this->assertIdentical('AC/DC', $user->profile_bands[0]->value);
-    $this->assertIdentical('Eagles', $user->profile_bands[1]->value);
-    $this->assertIdentical('Elton John', $user->profile_bands[2]->value);
-    $this->assertIdentical('Lemonheads', $user->profile_bands[3]->value);
-    $this->assertIdentical('Rolling Stones', $user->profile_bands[4]->value);
-    $this->assertIdentical('Queen', $user->profile_bands[5]->value);
-    $this->assertIdentical('The White Stripes', $user->profile_bands[6]->value);
-    $this->assertIdentical('1974-06-02', $user->profile_birthdate->value);
-
-    $user = User::load(8);
-    $this->assertIdentical('Forward/slash', $user->profile_sold_to->value);
-
-    $user = User::load(15);
-    $this->assertIdentical('Dot.in.the.middle', $user->profile_sold_to->value);
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserRoleTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserRoleTest.php
deleted file mode 100644
index 1d637e7..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserRoleTest.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserRoleTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\user\Entity\Role;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * Upgrade user roles to user.role.*.yml.
- *
- * @group user
- */
-class MigrateUserRoleTest extends MigrateDrupal6TestBase {
-
-  /**
-   * The modules to be enabled during the test.
-   *
-   * @var array
-   */
-  static $modules = array('filter', 'node');
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-    // We need some sample data so we can use the Migration process plugin.
-    $id_mappings = array(
-      'd6_filter_format' => array(
-        array(array(1), array('filtered_html')),
-        array(array(2), array('full_html'))
-      ),
-    );
-    $this->prepareMigrations($id_mappings);
-
-    $this->loadDumps([
-      'Permission.php',
-      'Role.php',
-      'Filters.php',
-      'FilterFormats.php',
-      'Variable.php',
-    ]);
-    $this->executeMigration('d6_user_role');
-  }
-
-  /**
-   * Tests user role migration.
-   */
-  public function testUserRole() {
-    /** @var \Drupal\migrate\entity\Migration $migration */
-    $migration = entity_load('migration', 'd6_user_role');
-    $rid = 'anonymous';
-    $anonymous = Role::load($rid);
-    $this->assertIdentical($rid, $anonymous->id());
-    $this->assertIdentical(array('migrate test anonymous permission', 'use text format filtered_html'), $anonymous->getPermissions());
-    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(1)));
-    $rid = 'authenticated';
-    $authenticated = Role::load($rid);
-    $this->assertIdentical($rid, $authenticated->id());
-    $this->assertIdentical(array('migrate test authenticated permission', 'use text format filtered_html'), $authenticated->getPermissions());
-    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(2)));
-    $rid = 'migrate_test_role_1';
-    $migrate_test_role_1 = Role::load($rid);
-    $this->assertIdentical($rid, $migrate_test_role_1->id());
-    $this->assertIdentical(array(0 => 'migrate test role 1 test permission', 'use text format full_html'), $migrate_test_role_1->getPermissions());
-    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(3)));
-    $rid = 'migrate_test_role_2';
-    $migrate_test_role_2 = Role::load($rid);
-    $this->assertIdentical(array(
-      'migrate test role 2 test permission',
-      'use PHP for settings',
-      'administer contact forms',
-      'skip comment approval',
-      'edit own blog content',
-      'edit any blog content',
-      'delete own blog content',
-      'delete any blog content',
-      'create forum content',
-      'delete any forum content',
-      'delete own forum content',
-      'edit any forum content',
-      'edit own forum content',
-      'administer nodes',
-      'access content overview',
-      ), $migrate_test_role_2->getPermissions());
-    $this->assertIdentical($rid, $migrate_test_role_2->id());
-    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(4)));
-    $rid = 'migrate_test_role_3_that_is_long';
-    $migrate_test_role_3 = Role::load($rid);
-    $this->assertIdentical($rid, $migrate_test_role_3->id());
-    $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(5)));
-  }
-
-}
diff --git a/core/modules/user/src/Tests/Migrate/d6/MigrateUserTest.php b/core/modules/user/src/Tests/Migrate/d6/MigrateUserTest.php
deleted file mode 100644
index dcc387c..0000000
--- a/core/modules/user/src/Tests/Migrate/d6/MigrateUserTest.php
+++ /dev/null
@@ -1,185 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Tests\Migrate\d6\MigrateUserTest.
- */
-
-namespace Drupal\user\Tests\Migrate\d6;
-
-use Drupal\user\Entity\User;
-use Drupal\file\Entity\File;
-use Drupal\Core\Database\Database;
-use Drupal\user\RoleInterface;
-use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
-
-/**
- * Users migration.
- *
- * @group user
- */
-class MigrateUserTest extends MigrateDrupal6TestBase {
-
-  /**
-   * The modules to be enabled during the test.
-   *
-   * @var array
-   */
-  static $modules = array(
-    'link',
-    'options',
-    'datetime',
-    'text',
-    'file',
-    'image',
-  );
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $this->installEntitySchema('file');
-    $this->installSchema('file', ['file_usage']);
-
-    // Create the user profile field and instance.
-    entity_create('field_storage_config', array(
-      'entity_type' => 'user',
-      'field_name' => 'user_picture',
-      'type' => 'image',
-      'translatable' => '0',
-    ))->save();
-    entity_create('field_config', array(
-      'label' => 'User Picture',
-      'description' => '',
-      'field_name' => 'user_picture',
-      'entity_type' => 'user',
-      'bundle' => 'user',
-      'required' => 0,
-    ))->save();
-
-    $file = entity_create('file', array(
-      'fid' => 2,
-      'uid' => 2,
-      'filename' => 'image-test.jpg',
-      'uri' => "public://image-test.jpg",
-      'filemime' => 'image/jpeg',
-      'created' => 1,
-      'changed' => 1,
-      'status' => FILE_STATUS_PERMANENT,
-    ));
-    $file->enforceIsNew();
-    file_put_contents($file->getFileUri(), file_get_contents('core/modules/simpletest/files/image-1.png'));
-    $file->save();
-
-    $file = entity_create('file', array(
-      'fid' => 8,
-      'uid' => 8,
-      'filename' => 'image-test.png',
-      'uri' => "public://image-test.png",
-      'filemime' => 'image/png',
-      'created' => 1,
-      'changed' => 1,
-      'status' => FILE_STATUS_PERMANENT,
-    ));
-    $file->enforceIsNew();
-    file_put_contents($file->getFileUri(), file_get_contents('core/modules/simpletest/files/image-2.jpg'));
-    $file->save();
-
-    $this->loadDumps([
-      'Filters.php',
-      'FilterFormats.php',
-      'Variable.php',
-      'ProfileFields.php',
-      'Permission.php',
-      'Role.php',
-      'Users.php',
-      'ProfileValues.php',
-      'UsersRoles.php',
-      'EventTimezones.php',
-    ]);
-
-    $id_mappings = array(
-      'd6_user_role' => array(
-        array(array(1), array('anonymous user')),
-        array(array(2), array('authenticated user')),
-        array(array(3), array('migrate test role 1')),
-        array(array(4), array('migrate test role 2')),
-        array(array(5), array('migrate test role 3')),
-      ),
-      'd6_user_picture_entity_display' => array(
-        array(array(1), array('user', 'user', 'default', 'user_picture')),
-      ),
-      'd6_user_picture_entity_form_display' => array(
-        array(array(1), array('user', 'user', 'default', 'user_picture')),
-      ),
-      'd6_user_picture_file' => array(
-        array(array(2), array(2)),
-        array(array(8), array(8)),
-      ),
-    );
-
-    $this->prepareMigrations($id_mappings);
-
-    $this->executeMigration('d6_user');
-  }
-
-  /**
-   * Tests the Drupal6 user to Drupal 8 migration.
-   */
-  public function testUser() {
-    $users = Database::getConnection('default', 'migrate')
-      ->select('users', 'u')
-      ->fields('u')
-      ->execute()
-      ->fetchAll();
-
-    foreach ($users as $source) {
-      // Get roles directly from the source.
-      $rids = Database::getConnection('default', 'migrate')
-        ->select('users_roles', 'ur')
-        ->fields('ur', array('rid'))
-        ->condition('ur.uid', $source->uid)
-        ->execute()
-        ->fetchCol();
-      $roles = array(RoleInterface::AUTHENTICATED_ID);
-      $migration_role = entity_load('migration', 'd6_user_role');
-      foreach ($rids as $rid) {
-        $role = $migration_role->getIdMap()->lookupDestinationId(array($rid));
-        $roles[] = reset($role);
-      }
-
-      /** @var \Drupal\user\UserInterface $user */
-      $user = User::load($source->uid);
-      $this->assertIdentical($source->uid, $user->id());
-      $this->assertIdentical($source->name, $user->label());
-      $this->assertIdentical($source->mail, $user->getEmail());
-      $this->assertIdentical($source->created, $user->getCreatedTime());
-      $this->assertIdentical($source->access, $user->getLastAccessedTime());
-      $this->assertIdentical($source->login, $user->getLastLoginTime());
-      $is_blocked = $source->status == 0;
-      $this->assertIdentical($is_blocked, $user->isBlocked());
-      // $user->getPreferredLangcode() might fallback to default language if the
-      // user preferred language is not configured on the site. We just want to
-      // test if the value was imported correctly.
-      $this->assertIdentical($source->language, $user->preferred_langcode->value);
-      $time_zone = $source->expected_timezone ?: $this->config('system.date')->get('timezone.default');
-      $this->assertIdentical($time_zone, $user->getTimeZone());
-      $this->assertIdentical($source->init, $user->getInitialEmail());
-      $this->assertIdentical($roles, $user->getRoles());
-
-      // We have one empty picture in the data so don't try load that.
-      if (!empty($source->picture)) {
-        // Test the user picture.
-        $file = File::load($user->user_picture->target_id);
-        $this->assertIdentical(basename($source->picture), $file->getFilename());
-      }
-
-      // Use the API to check if the password has been salted and re-hashed to
-      // conform the Drupal >= 7.
-      $this->assertTrue(\Drupal::service('password')->check($source->pass_plain, $user->getPassword()));
-    }
-  }
-
-}
diff --git a/core/modules/user/src/UserServiceProvider.php b/core/modules/user/src/UserServiceProvider.php
deleted file mode 100644
index 9b61097..0000000
--- a/core/modules/user/src/UserServiceProvider.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\UserServiceProvider.
- */
-
-namespace Drupal\user;
-
-use Drupal\Core\DependencyInjection\ServiceModifierInterface;
-use Drupal\Core\DependencyInjection\ContainerBuilder;
-
-/**
- * Swaps the original 'password' service in order to handle password hashing for
- * user migrations that have passwords hashed to MD5.
- *
- * @see \Drupal\migrate\MigratePassword
- * @see \Drupal\Core\Password\PhpassHashedPassword
- */
-class UserServiceProvider implements ServiceModifierInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function alter(ContainerBuilder $container) {
-    $container->setDefinition('password_original', $container->getDefinition('password'));
-    $container->setDefinition('password', $container->getDefinition('password_migrate'));
-  }
-
-}
diff --git a/core/modules/user/tests/src/Unit/Migrate/d6/ProfileFieldTest.php b/core/modules/user/tests/src/Unit/Migrate/d6/ProfileFieldTest.php
deleted file mode 100644
index ccc2ec2..0000000
--- a/core/modules/user/tests/src/Unit/Migrate/d6/ProfileFieldTest.php
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Tests\user\Unit\Migrate\d6\ProfileFieldTest.
- */
-
-namespace Drupal\Tests\user\Unit\Migrate\d6;
-
-use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
-
-/**
- * Tests D6 profile field source plugin.
- *
- * @group user
- */
-class ProfileFieldTest extends MigrateSqlSourceTestCase {
-
-  // The plugin system is not working during unit testing so the source plugin
-  // class needs to be manually specified.
-  const PLUGIN_CLASS = 'Drupal\user\Plugin\migrate\source\d6\ProfileField';
-
-  // The fake Migration configuration entity.
-  protected $migrationConfiguration = [
-    // The id of the entity, can be any string.
-    'id' => 'test_profile_fields',
-    // Leave it empty for now.
-    'idlist' => [],
-    'source' => [
-      'plugin' => 'd6_profile_field',
-    ],
-  ];
-
-  // We need to set up the database contents; it's easier to do that below.
-  // These are sample result queries.
-  // @todo Add multiple cases.
-  protected $expectedResults = [
-    [
-      'fid' => 1,
-      'title' => 'First name',
-      'name' => 'profile_first_name',
-      'explanation' => 'First name user',
-      'category' => 'profile',
-      'page' => '',
-      'type' => 'textfield',
-      'weight' => 0,
-      'required' => 1,
-      'register' => 0,
-      'visibility' => 2,
-      'autocomplete' => 0,
-      'options' => [],
-    ],
-    [
-      'fid' => 2,
-      'title' => 'Last name',
-      'name' => 'profile_last_name',
-      'explanation' => 'Last name user',
-      'category' => 'profile',
-      'page' => '',
-      'type' => 'textfield',
-      'weight' => 0,
-      'required' => 0,
-      'register' => 0,
-      'visibility' => 2,
-      'autocomplete' => 0,
-      'options' => [],
-    ],
-    [
-      'fid' => 3,
-      'title' => 'Policy',
-      'name' => 'profile_policy',
-      'explanation' => 'A checkbox that say if you accept policy of website',
-      'category' => 'profile',
-      'page' => '',
-      'type' => 'checkbox',
-      'weight' => 0,
-      'required' => 1,
-      'register' => 1,
-      'visibility' => 2,
-      'autocomplete' => 0,
-      'options' => [],
-    ],
-  ];
-
-  /**
-   * Prepopulate contents with results.
-   */
-  protected function setUp() {
-    $this->databaseContents['profile_fields'] = $this->expectedResults;
-    foreach ($this->databaseContents['profile_fields'] as &$row) {
-      $row['options'] = serialize([]);
-    }
-    parent::setUp();
-  }
-
-}
diff --git a/core/modules/user/tests/src/Unit/Migrate/d6/RoleTest.php b/core/modules/user/tests/src/Unit/Migrate/d6/RoleTest.php
deleted file mode 100644
index cf0a4a5..0000000
--- a/core/modules/user/tests/src/Unit/Migrate/d6/RoleTest.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Tests\user\Unit\Migrate\d6\RoleTest.
- */
-
-namespace Drupal\Tests\user\Unit\Migrate\d6;
-
-use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
-
-/**
- * Tests D6 role source plugin.
- *
- * @group user
- */
-class RoleTest extends MigrateSqlSourceTestCase {
-
-  // The plugin system is not working during unit testing so the source plugin
-  // class needs to be manually specified.
-  const PLUGIN_CLASS = 'Drupal\user\Plugin\migrate\source\d6\Role';
-
-  // The fake Migration configuration entity.
-  protected $migrationConfiguration = array(
-    // The ID of the entity, can be any string.
-    'id' => 'test',
-    // Leave it empty for now.
-    'idlist' => array(),
-    // This needs to be the identifier of the actual key: cid for comment, nid
-    // for node and so on.
-    'source' => array(
-      'plugin' => 'd6_user_role',
-    ),
-  );
-
-  protected $expectedResults = array(
-    array(
-      'rid' => 1,
-      'name' => 'anonymous user',
-      'permissions' => array(
-        'access content',
-      ),
-    ),
-    array(
-      'rid' => 2,
-      'name' => 'authenticated user',
-      'permissions' => array(
-        'access comments',
-        'access content',
-        'post comments',
-        'post comments without approval',
-      ),
-    ),
-    array(
-      'rid' => 3,
-      'name' => 'administrator',
-      'permissions' => array(
-        'access comments',
-        'administer comments',
-        'post comments',
-        'post comments without approval',
-        'access content',
-        'administer content types',
-        'administer nodes',
-      ),
-    ),
-  );
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    foreach ($this->expectedResults as $row) {
-      $this->databaseContents['permission'][] = array(
-        'perm' => implode(', ', $row['permissions']),
-        'rid' => $row['rid'],
-      );
-      unset($row['permissions']);
-      $this->databaseContents['role'][] = $row;
-    }
-    $this->databaseContents['filter_formats'][] = array(
-      'format' => 1,
-      'roles' => '',
-    );
-    parent::setUp();
-  }
-
-}
diff --git a/core/modules/user/tests/src/Unit/Migrate/d6/UserPictureTest.php b/core/modules/user/tests/src/Unit/Migrate/d6/UserPictureTest.php
deleted file mode 100644
index c5f98fd..0000000
--- a/core/modules/user/tests/src/Unit/Migrate/d6/UserPictureTest.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Tests\user\Unit\Migrate\d6\UserPictureTest.
- */
-
-namespace Drupal\Tests\user\Unit\Migrate\d6;
-
-use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
-
-/**
- * Tests D6 user picture source plugin.
- *
- * @group user
- */
-class UserPictureTest extends MigrateSqlSourceTestCase {
-
-  const PLUGIN_CLASS = 'Drupal\user\Plugin\migrate\source\d6\UserPicture';
-
-  protected $migrationConfiguration = array(
-    'id' => 'test_user_picture',
-    'idlist' => array(),
-    'source' => array(
-      'plugin' => 'd6_user_picture',
-    ),
-  );
-
-  protected $expectedResults = array(
-    array(
-      'uid' => 1,
-      'access' => 1382835435,
-      'picture' => 'sites/default/files/pictures/picture-1.jpg',
-    ),
-    array(
-      'uid' => 2,
-      'access' => 1382835436,
-      'picture' => 'sites/default/files/pictures/picture-2.jpg',
-    ),
-  );
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    $this->databaseContents['users'] = $this->expectedResults;
-    parent::setUp();
-  }
-
-}
diff --git a/core/modules/user/tests/src/Unit/Migrate/d6/UserTest.php b/core/modules/user/tests/src/Unit/Migrate/d6/UserTest.php
deleted file mode 100644
index 78fad1b..0000000
--- a/core/modules/user/tests/src/Unit/Migrate/d6/UserTest.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Tests\user\Unit\Migrate\d6\UserTest.
- */
-
-namespace Drupal\Tests\user\Unit\Migrate\d6;
-
-use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
-
-/**
- * Tests D6 user source plugin.
- *
- * @group user
- */
-class UserTest extends MigrateSqlSourceTestCase {
-
-  const PLUGIN_CLASS = 'Drupal\user\Plugin\migrate\source\d6\User';
-
-  protected $migrationConfiguration = array(
-    'id' => 'test',
-    'idlist' => array(),
-    'source' => array(
-      'plugin' => 'd6_user',
-    ),
-  );
-
-  protected $expectedResults = array(
-    array(
-      'uid' => 2,
-      'name' => 'admin',
-      // @todo d6 hash?
-      'pass' => '1234',
-      'mail' => 'admin@example.com',
-      'theme' => '',
-      'signature' => '',
-      'signature_format' => 0,
-      'created' => 1279402616,
-      'access' => 1322981278,
-      'login' => 1322699994,
-      'status' => 0,
-      'timezone' => 'America/Lima',
-      'language' => 'en',
-      // @todo Add the file when needed.
-      'picture' => 'sites/default/files/pictures/picture-1.jpg',
-      'init' => 'admin@example.com',
-      'data' => NULL,
-    ),
-    array(
-      'uid' => 4,
-      'name' => 'alice',
-      // @todo d6 hash?
-      'pass' => '1234',
-      'mail' => 'alice@example.com',
-      'theme' => '',
-      'signature' => '',
-      'signature_format' => 0,
-      'created' => 1322981368,
-      'access' => 1322982419,
-      'login' => 132298140,
-      'status' => 0,
-      'timezone' => 'America/Lima',
-      'language' => 'en',
-      'picture' => '',
-      'init' => 'alice@example.com',
-      'data' => NULL,
-    ),
-  );
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    foreach ($this->expectedResults as $k => $row) {
-      $this->databaseContents['users'][$k] = $row;
-    }
-    // getDatabase() will not create empty tables, so we need to insert data
-    // even if it's irrelevant to the test.
-    $this->databaseContents['users_roles'] = array(
-      array(
-        'uid' => 99,
-        'rid' => 99,
-      ),
-    );
-    parent::setUp();
-  }
-
-}
diff --git a/core/modules/user/user.services.yml b/core/modules/user/user.services.yml
index 8fc9bf5..c273cb3 100644
--- a/core/modules/user/user.services.yml
+++ b/core/modules/user/user.services.yml
@@ -66,9 +66,6 @@ services:
     arguments: ['@current_user', '@entity.manager']
     tags:
       - { name: 'context_provider' }
-  password_migrate:
-    class: Drupal\user\MigratePassword
-    arguments: ['@password_original']
 
 parameters:
   user.tempstore.expire: 604800
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php
index a2daba7..f60eb0f 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php
@@ -19,17 +19,6 @@ class CacheTagsInvalidatorTest extends UnitTestCase {
 
   /**
    * @covers ::invalidateTags
-   *
-   * @expectedException \LogicException
-   * @expectedExceptionMessage Cache tags must be strings, array given.
-   */
-  public function testInvalidateTagsWithInvalidTags() {
-    $cache_tags_invalidator = new CacheTagsInvalidator();
-    $cache_tags_invalidator->invalidateTags(['node' => [2, 3, 5, 8, 13]]);
-  }
-
-  /**
-   * @covers ::invalidateTags
    * @covers ::addInvalidator
    */
   public function testInvalidateTags() {
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheTest.php
index c2e61a1..2cdc030 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheTest.php
@@ -18,48 +18,6 @@
 class CacheTest extends UnitTestCase {
 
   /**
-   * Provides a list of cache tags arrays.
-   *
-   * @return array
-   */
-  public function validateTagsProvider() {
-    return [
-      [[], FALSE],
-      [['foo'], FALSE],
-      [['foo', 'bar'], FALSE],
-      [['foo', 'bar', 'llama:2001988', 'baz', 'llama:14031991'], FALSE],
-      // Invalid.
-      [[FALSE], 'Cache tags must be strings, boolean given.'],
-      [[TRUE], 'Cache tags must be strings, boolean given.'],
-      [['foo', FALSE], 'Cache tags must be strings, boolean given.'],
-      [[NULL], 'Cache tags must be strings, NULL given.'],
-      [['foo', NULL], 'Cache tags must be strings, NULL given.'],
-      [[1337], 'Cache tags must be strings, integer given.'],
-      [['foo', 1337], 'Cache tags must be strings, integer given.'],
-      [[3.14], 'Cache tags must be strings, double given.'],
-      [['foo', 3.14], 'Cache tags must be strings, double given.'],
-      [[[]], 'Cache tags must be strings, array given.'],
-      [['foo', []], 'Cache tags must be strings, array given.'],
-      [['foo', ['bar']], 'Cache tags must be strings, array given.'],
-      [[new \stdClass()], 'Cache tags must be strings, object given.'],
-      [['foo', new \stdClass()], 'Cache tags must be strings, object given.'],
-    ];
-  }
-
-  /**
-   * @covers ::validateTags
-   *
-   * @dataProvider validateTagsProvider
-   */
-  public function testValidateTags(array $tags, $expected_exception_message) {
-    if ($expected_exception_message !== FALSE) {
-      $this->setExpectedException('LogicException', $expected_exception_message);
-    }
-    // If it doesn't throw an exception, validateTags() returns NULL.
-    $this->assertNull(Cache::validateTags($tags));
-  }
-
-  /**
    * Provides a list of pairs of cache tags arrays to be merged.
    *
    * @return array
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
index 05b51aa..b4a1310 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php
@@ -35,6 +35,7 @@ public function testMerge(CacheableMetadata $a, CacheableMetadata $b, CacheableM
     $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
+    $cache_contexts_manager->method('assertValidTokens')->willReturn(TRUE);
     $container = new ContainerBuilder();
     $container->set('cache_contexts_manager', $cache_contexts_manager);
     \Drupal::setContainer($container);
diff --git a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
index e695c79..d3293a7 100644
--- a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php
@@ -60,6 +60,7 @@ public function testMerge(BubbleableMetadata $a, CacheableMetadata $b, Bubbleabl
     $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
+    $cache_contexts_manager->method('assertValidTokens')->willReturn(TRUE);
     $container = new ContainerBuilder();
     $container->set('cache_contexts_manager', $cache_contexts_manager);
     $container->set('renderer', $renderer);
diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
index 9ab8978..71243fb 100644
--- a/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
+++ b/core/tests/Drupal/Tests/Core/Render/RendererTestBase.php
@@ -108,6 +108,7 @@ protected function setUp() {
     $this->cacheContextsManager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
+    $this->cacheContextsManager->method('assertValidTokens')->willReturn(TRUE);
     $this->cacheContextsManager->expects($this->any())
       ->method('convertTokensToKeys')
       ->willReturnCallback(function($context_tokens) {
diff --git a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
index 2e04b87..6607cb5 100644
--- a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
@@ -63,6 +63,7 @@ protected function setUp() {
     $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager')
       ->disableOriginalConstructor()
       ->getMock();
+    $cache_contexts_manager->method('assertValidTokens')->willReturn(TRUE);
     $container = new ContainerBuilder();
     $container->set('cache_contexts_manager', $cache_contexts_manager);
     \Drupal::setContainer($container);
