X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FFunctional%2FCommentPreviewTest.php;h=91544b636767b3fe6d34c3f6e0271d1c6338da93;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=89ac6681de0be5fc0ee02ed4cf3e2d5ce2474e23;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/modules/comment/tests/src/Functional/CommentPreviewTest.php b/web/core/modules/comment/tests/src/Functional/CommentPreviewTest.php index 89ac6681d..91544b636 100644 --- a/web/core/modules/comment/tests/src/Functional/CommentPreviewTest.php +++ b/web/core/modules/comment/tests/src/Functional/CommentPreviewTest.php @@ -60,7 +60,7 @@ class CommentPreviewTest extends CommentTestBase { // 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 @@ class CommentPreviewTest extends CommentTestBase { // 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));