You are here

public function MigrateUserContactSettingsTest::testUserContactSettings in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Tests/Migrate/d6/MigrateUserContactSettingsTest.php \Drupal\user\Tests\Migrate\d6\MigrateUserContactSettingsTest::testUserContactSettings()

Tests the Drupal6 user contact settings migration.

File

core/modules/user/src/Tests/Migrate/d6/MigrateUserContactSettingsTest.php, line 37
Contains \Drupal\user\Tests\Migrate\d6\MigrateUserContactSettingsTest.

Class

MigrateUserContactSettingsTest
Users contact settings migration.

Namespace

Drupal\user\Tests\Migrate\d6

Code

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);
}