private function ExifOrientationTest::saveUserPicture in EXIF Orientation 7
Same name and namespace in other branches
- 8 tests/exif_orientation.test \ExifOrientationTest::saveUserPicture()
Uploads a user picture.
1 call to ExifOrientationTest::saveUserPicture()
- ExifOrientationTest::testUserPicture in tests/
exif_orientation.test - Test auto rotation of uploaded user profile pictures.
File
- tests/
exif_orientation.test, line 79 - Tests for exif_orientation.module.
Class
- ExifOrientationTest
- @file Tests for exif_orientation.module.
Code
private function saveUserPicture(&$account) {
$this
->drupalLogin($account);
$edit = array(
'files[picture_upload]' => drupal_realpath(drupal_get_path('module', 'exif_orientation') . '/tests/rotate90cw.jpg'),
);
$this
->drupalPost('user/' . $account->uid . '/edit', $edit, t('Save'));
$account = user_load($account->uid, TRUE);
$this
->assertTrue(isset($account->picture) && isset($account->picture->uri), 'The picture has been uploaded successfully.');
}