The setUp() method in the test class UserPictureTest (UserPictureTestCase in Drupal 7) is checking that the user picture directory exists and is writable.

$pic_check = file_prepare_directory($picture_path, FILE_CREATE_DIRECTORY);
$this->_directory_test = is_writable($picture_path);
$this->assertTrue($this->_directory_test, "The directory $picture_path doesn't exist or is not writable. Further tests won't be made.");

The check is actually made twise as "file_prepare_directory()" is also checking if the directory is writable.

The assertTrue call after this will check that the $this->_directory_test variable is TRUE, and it should be true if the picture directory is writeable.
Tho the message tells the user that the directory doesn't exists or is not writeable and that further tests won't be made.

I have made two patches, one for D8 and one for D7.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, negative-test-message.d7.patch, failed testing.

anon’s picture

Status: Needs work » Needs review

gaah, testbot..

EDIT: Ok I learned my lesson, I will use the "-do-not-test.patch" next time..

anon’s picture

Issue summary: View changes

Updated issue summary.

The last submitted patch, negative-test-message.d8.patch, failed testing.

jhedstrom’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs reroll
vmartins’s picture

Assigned: Unassigned » vmartins
vmartins’s picture

Assigned: vmartins » Unassigned
lokapujya’s picture

Version: 8.0.x-dev » 7.x-dev

No such test anymore on D8.

leopathu’s picture

Status: Needs work » Needs review
FileSize
852 bytes

Hi,
I think, This patch will pass the testing

lokapujya’s picture

Issue tags: -Needs reroll
+++ b/modules/user/user.test
@@ -1014,9 +1014,8 @@ class UserPictureTestCase extends DrupalWebTestCase {
+    $this->assertTrue($this->_directory_test, "The directory $picture_path exist and is writable.");

As written in the 3rd person "exist" should actually be "exists".