diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php index 8447031..ef059c4 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserPictureTest.php @@ -96,21 +96,24 @@ function testPictureOnNodeComment() { $node = $this->drupalCreateNode(array('type' => 'article')); - // Enable user pictures on nodes. - variable_set('theme_settings', array('toggle_node_user_picture' => TRUE)); - - // Verify that the image is displayed on the user account page. + // Verify that the image is displayed on a node created by the user. $this->drupalGet('node/' . $node->nid); $this->assertRaw(file_uri_target($file->uri), 'User picture found on node page.'); // Enable user pictures on comments, instead of nodes. - variable_set('theme_settings', array('toggle_comment_user_picture' => TRUE)); + variable_set('theme_settings', array('toggle_node_user_picture' => FALSE, 'toggle_comment_user_picture' => TRUE)); $edit = array( 'comment_body[' . LANGUAGE_NOT_SPECIFIED . '][0][value]' => $this->randomString(), ); $this->drupalPost('comment/reply/' . $node->nid, $edit, t('Save')); $this->assertRaw(file_uri_target($file->uri), 'User picture found on comment.'); + + // Disable user pictures on comments and nodes. + variable_set('theme_settings', array('toggle_node_user_picture' => FALSE, 'toggle_comment_user_picture' => FALSE)); + + $this->drupalGet('node/' . $node->nid); + $this->assertNoRaw(file_uri_target($file->uri), 'User picture not found on comment or node.'); } /**