public function ProfileCrudTestCase::testUserCRUD

7.x profile.test public ProfileCrudTestCase::testUserCRUD()

Test profile integration with user CRUD operations.

File

drupal-7.x/modules/profile/profile.test, line 499
Tests for profile.module.

Class

ProfileCrudTestCase
Test profile integration with user CRUD operations.

Code

public function testUserCRUD() {
  // @todo Add profile fields in addition to base user properties.
  $edit = array(
    'name' => 'Test user',
    'mail' => 'test@example.com',
  );

  // Create.
  // @todo Add assertions.
  $account = user_save(NULL, $edit);

  // Read.
  // @todo Add assertions.
  $account = user_load($account->uid);

  // Update.
  // @todo Add assertions.
  $account = user_save($account, $edit);

  // Delete.
  // @todo Add assertions.
  user_delete($account->uid);
}