public function ProfileCrudTestCase::testUserCRUD in Drupal 7
Test profile integration with user CRUD operations.
File
- modules/
profile/ profile.test, line 509  - 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);
}