1 user.test | UserPictureTestCase::saveUserPicture($image) |
File
- core/
modules/ user/ tests/ user.test, line 1370 - Tests for user.module.
Class
Code
function saveUserPicture($image) {
$edit = array('files[picture_upload]' => backdrop_realpath($image->uri));
$this->backdropPost('user/' . $this->user->uid . '/edit', $edit, t('Save'));
// Load actual user data from database.
$account = user_load($this->user->uid, TRUE);
return !empty($account->picture) ? $account->picture->uri : NULL;
}