$this->assertRaw(t('The selected file %file could not be uploaded. Only JPEG, PNG and GIF images are allowed.',array('%file'=>basename($img_path))),'The uploaded file was not an image.');
variable_set('user_pictures',$old_pic_set);
// do we have to check users roles?
// delete test user and roles
}
/*
* Do one test if ImageGDToolkit is installed
*/
/*
* Do the test:
* GD Toolkit is installed
* Picture has invalid dimension
*
* results: The image should be uploaded because ImageGDToolkit resizes the picture
$text=t('The uploaded image is too large; the maximum dimensions are %dimensions pixels.',array('%dimensions'=>variable_get('user_picture_dimensions','85x85')));
$this->assertText($text,'Checking response on invalid image (dimensions).');
$text=t('The uploaded image is too large; the maximum dimensions are %dimensions pixels.',array('%dimensions'=>variable_get('user_picture_dimensions','85x85')));
$this->assertText($text,t('Checking response on invalid image (dimensions).'));
// check if file is not uploaded
$this->assertFalse(is_file($pic_path),t('File is not uploaded'));