diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-06-08 19:50:54 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-06-08 19:50:54 +0000 |
commit | 76aedbefe05d9f5b8aad9573635a07045efa392a (patch) | |
tree | cb2c8ac6e18a1d7abd3eee4d799db9643ce44466 /modules/user | |
parent | caa2e7e1d1d72bfc2873339206b885e9f8a7b788 (diff) | |
download | brdo-76aedbefe05d9f5b8aad9573635a07045efa392a.tar.gz brdo-76aedbefe05d9f5b8aad9573635a07045efa392a.tar.bz2 |
- Patch #267813 by alpritt: fixed some user module tests.
Diffstat (limited to 'modules/user')
-rw-r--r-- | modules/user/user.test | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/user/user.test b/modules/user/user.test index 937a4db95..fe9c9f59b 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -302,7 +302,7 @@ class UserPictureTestCase extends DrupalWebTestCase { $this->assertText(t('The changes have been saved.')); // Check if image is displayed in user's profile page. - $this->assertRaw(file_create_url($picture_url), t("Image is displayed in user's profile page")); + $this->assertRaw(file_create_url($picture_path), t("Image is displayed in user's profile page")); // Check if file is located in proper directory. $this->assertTrue(is_file($picture_path), t('File is located in proper directory')); @@ -404,9 +404,10 @@ class UserPictureTestCase extends DrupalWebTestCase { function saveUserPicture($image) { $edit = array('files[picture_upload]' => realpath($image->filename)); $this->drupalPost('user/' . $this->user->uid.'/edit', $edit, t('Save')); - + + $img_info = image_get_info($image->filename); $picture_dir = variable_get('user_picture_path', 'pictures'); - $pic_path = file_directory_path() .'/'.$picture_dir .'/picture-'.$this->user->uid.'.jpg'; + $pic_path = file_directory_path() . '/' . $picture_dir . '/picture-' . $this->user->uid . '.' . $img_info['extension']; return $pic_path; } |