function ViewsUIWizardJumpMenuTestCase::createCommentAndGetPath

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

File

tests/views_ui.test, line 789

Class

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

Code

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