function MigrateUserContactSettingsTest::testUserContactSettings
Same name in other branches
- 9 core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php \Drupal\Tests\user\Kernel\Migrate\d6\MigrateUserContactSettingsTest::testUserContactSettings()
- 10 core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php \Drupal\Tests\user\Kernel\Migrate\d6\MigrateUserContactSettingsTest::testUserContactSettings()
- 11.x core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserContactSettingsTest.php \Drupal\Tests\user\Kernel\Migrate\d6\MigrateUserContactSettingsTest::testUserContactSettings()
Tests the Drupal6 user contact settings migration.
File
-
core/
modules/ user/ tests/ src/ Kernel/ Migrate/ d6/ MigrateUserContactSettingsTest.php, line 32
Class
- MigrateUserContactSettingsTest
- Users contact settings migration.
Namespace
Drupal\Tests\user\Kernel\Migrate\d6Code
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.