? .DS_Store
? .cache
? .cvsignore
? .git
? .project
? .settings
? hook_file_10.patch
? test
? modules/.DS_Store
? modules/simpletest/.DS_Store
? sites/all/modules
? sites/default/files
? sites/default/settings.php
? sites/default/test
Index: modules/user/user.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.test,v
retrieving revision 1.15
diff -u -p -r1.15 user.test
--- modules/user/user.test	20 Sep 2008 20:22:25 -0000	1.15
+++ modules/user/user.test	29 Sep 2008 07:53:03 -0000
@@ -257,19 +257,19 @@ class UserPictureTestCase extends Drupal
         $image = current($this->drupalGetTestFiles('image'));
         $info = image_get_info($image->filename);
 
-        // set new variables;
-        $test_size = floor(filesize($image->filename) / 1000) + 1;
+        // Set new variables: valid filesize, invalid dimensions.
         $test_dim = ($info['width'] - 10) . 'x' . ($info['height'] - 10);
+        $test_size = floor(filesize($image->filename) / 1024) + 1;
         variable_set('user_picture_dimensions', $test_dim);
         variable_set('user_picture_file_size', $test_size);
 
         $pic_path = $this->saveUserPicture($image);
 
-        // check if image is displayed in user's profile page
-        $this->assertRaw(file_create_url($pic_path), "Image is displayed in user's profile page");
+        // Check if image is displayed in user's profile page.
+        $this->assertRaw(file_create_url($pic_path), t("Image is displayed in user's profile page"));
 
-        // check if file is located in proper directory
-        $this->assertTrue(is_file($pic_path), "File is located in proper directory");
+        // Check if file is located in proper directory.
+        $this->assertTrue(is_file($pic_path), t("File is located in proper directory"));
       }
   }
 
@@ -289,9 +289,9 @@ class UserPictureTestCase extends Drupal
         $image = current($this->drupalGetTestFiles('image'));
         $info = image_get_info($image->filename);
 
-        // Set new variables.
+        // Set new variables: valid dimensions, invalid filesize.
         $test_dim = ($info['width'] + 10) . 'x' . ($info['height'] + 10);
-        $test_size = filesize($image->filename);
+        $test_size = floor(filesize($image->filename) / 1024) + 1;
         variable_set('user_picture_dimensions', $test_dim);
         variable_set('user_picture_file_size', $test_size);
 
@@ -322,9 +322,9 @@ class UserPictureTestCase extends Drupal
         $image = current($this->drupalGetTestFiles('image'));
         $info = image_get_info($image->filename);
 
-        // Set new variables.
-        $test_size = floor(filesize($image->filename) / 1000) + 1;
+        // Set new variables: invalid dimensions, valid filesize.
         $test_dim = ($info['width'] - 10) . 'x' . ($info['height'] - 10);
+        $test_size = floor(filesize($image->filename) / 1024) + 1;
         variable_set('user_picture_dimensions', $test_dim);
         variable_set('user_picture_file_size', $test_size);
 
@@ -352,10 +352,10 @@ class UserPictureTestCase extends Drupal
         $image = current($this->drupalGetTestFiles('image'));
         $image->filename = realpath("modules/tests/image-2.jpg");
         $info = image_get_info($image->filename);
-        // invalid size
-        // restore one and set another
+
+        // Set new variables: invalid filesize, valid dimensions.
         $test_dim = ($info['width'] + 10) . 'x' . ($info['height'] + 10);
-        $test_size = floor(filesize($image->filename) / 1000) - 1;
+        $test_size = floor(filesize($image->filename) / 1024) - 1;
         variable_set('user_picture_dimensions', $test_dim);
         variable_set('user_picture_file_size', $test_size);
 
@@ -381,10 +381,9 @@ class UserPictureTestCase extends Drupal
       $image = current($this->drupalGetTestFiles('image'));
       $info = image_get_info($image->filename);
 
-      // valid size & dimensions
-      // restore one and set another
+      // Set new variables: valid filesize, valid dimensions.
       $test_dim = ($info['width'] + 10) . 'x' . ($info['height'] + 10);
-      $test_size = floor(filesize($image->filename) / 1000) + 1;
+      $test_size = floor(filesize($image->filename) / 1024) + 1;
       variable_set('user_picture_dimensions', $test_dim);
       variable_set('user_picture_file_size', $test_size);
 
