Error message
You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).function UserPictureTestCase::testNoPicture
File
-
modules/
user/ user.test, line 1394
Class
Code
function testNoPicture() {
$this->drupalLogin ($this->user );
// Try to upload a file that is not an image for the user picture.
$not_an_image = $this->drupalGetTestFiles ('html');
$this->saveUserPicture ($not_an_image[1]);
$this->assertRaw (t ('Only JPEG, PNG and GIF images are allowed.'), 'Non-image files are not accepted.');
$this->assertNoRaw (t ('Only files with the following extensions are allowed:'), 'Additional error message not displayed.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.