Révision b4adf10d
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/modules/user/user.test | ||
---|---|---|
1127 | 1127 |
|
1128 | 1128 |
$pic_path2 = $this->saveUserPicture($image); |
1129 | 1129 |
$this->assertNotEqual($pic_path, $pic_path2, 'Filename of second picture is different.'); |
1130 |
|
|
1131 |
// Check if user picture has a valid file ID after saving the user. |
|
1132 |
$account = user_load($this->user->uid, TRUE); |
|
1133 |
$this->assertTrue(is_object($account->picture), 'User picture object is valid after user load.'); |
|
1134 |
$this->assertNotNull($account->picture->fid, 'User picture object has a FID after user load.'); |
|
1135 |
$this->assertTrue(is_file($account->picture->uri), 'File is located in proper directory after user load.'); |
|
1136 |
user_save($account); |
|
1137 |
// Verify that the user save does not destroy the user picture object. |
|
1138 |
$this->assertTrue(is_object($account->picture), 'User picture object is valid after user save.'); |
|
1139 |
$this->assertNotNull($account->picture->fid, 'User picture object has a FID after user save.'); |
|
1140 |
$this->assertTrue(is_file($account->picture->uri), 'File is located in proper directory after user save.'); |
|
1130 | 1141 |
} |
1131 | 1142 |
} |
1132 | 1143 |
|
Formats disponibles : Unified diff
Udpate to 7.33