1.20.x user.test | UserPictureTestCase::testNoPicture() |
File
- modules/
user/ tests/ user.test, line 1004 - Tests for user.module.
Class
Code
function testNoPicture() {
$this->backdropLogin($this->user);
// Try to upload a file that is not an image for the user picture.
$not_an_image = current($this->backdropGetTestFiles('html'));
$this->saveUserPicture($not_an_image);
$this->assertRaw(t('Only JPEG, PNG and GIF images are allowed.'), 'Non-image files are not accepted.');
}