1 views_ui.test ViewsUIWizardJumpMenuTestCase::createCommentAndGetPath()

Helper function to create a comment and return its expected path.

File

core/modules/views/tests/views_ui.test, line 673
Tests Views UI Wizard.

Class

ViewsUIWizardJumpMenuTestCase
Tests the ability of the views wizard to create views with a jump menu style plugin.

Code

function createCommentAndGetPath() {
  $node = $this->backdropCreateNode();
  $comment = entity_create('comment', array(
    'cid' => NULL,
    'nid' => $node->nid,
    'pid' => 0,
    'uid' => 0,
    'status' => COMMENT_PUBLISHED,
    'subject' => $this->randomName(),
    'langcode' => LANGUAGE_NONE,
    'comment_body' => array(LANGUAGE_NONE => array($this->randomName())),
  ));
  comment_save($comment);
  return entity_uri('comment', $comment);
}