Mercurial > hg > isophonics-drupal-site
diff core/modules/comment/tests/src/Functional/CommentPreviewTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | af1871eacc83 |
line wrap: on
line diff
--- a/core/modules/comment/tests/src/Functional/CommentPreviewTest.php Mon Apr 23 09:33:26 2018 +0100 +++ b/core/modules/comment/tests/src/Functional/CommentPreviewTest.php Mon Apr 23 09:46:53 2018 +0100 @@ -60,7 +60,7 @@ // Add a user picture. $image = current($this->drupalGetTestFiles('image')); - $user_edit['files[user_picture_0]'] = drupal_realpath($image->uri); + $user_edit['files[user_picture_0]'] = \Drupal::service('file_system')->realpath($image->uri); $this->drupalPostForm('user/' . $this->webUser->id() . '/edit', $user_edit, t('Save')); // As the web user, fill in the comment form and preview the comment. @@ -117,6 +117,8 @@ // Go back and re-submit the form. $this->getSession()->getDriver()->back(); + $submit_button = $this->assertSession()->buttonExists('Save'); + $submit_button->click(); $this->assertText('Your comment has been posted.'); $elements = $this->xpath('//section[contains(@class, "comment-wrapper")]/article'); $this->assertEqual(2, count($elements));