phpbb_functional_test_case::create_post PHP Method

create_post() public method

Be sure to login before creating
public create_post ( integer $forum_id, integer $topic_id, string $subject, string $message, array $additional_form_data = [], string $expected = '' ) : array | null
$forum_id integer
$topic_id integer
$subject string
$message string
$additional_form_data array Any additional form data to be sent in the request
$expected string Lang var of expected message after posting
return array | null post_id, topic_id if message is empty
    public function create_post($forum_id, $topic_id, $subject, $message, $additional_form_data = array(), $expected = '')
    {
        $posting_url = "posting.php?mode=reply&f={$forum_id}&t={$topic_id}&sid={$this->sid}";
        $form_data = array_merge(array('subject' => $subject, 'message' => $message, 'post' => true), $additional_form_data);
        return self::submit_post($posting_url, 'POST_REPLY', $form_data, $expected);
    }