// 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.
// 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));