phpbb_functional_test_case::create_topic PHP 메소드

create_topic() 공개 메소드

Be sure to login before creating
public create_topic ( integer $forum_id, string $subject, string $message, array $additional_form_data = [], string $expected = '' ) : array | null
$forum_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
리턴 array | null post_id, topic_id if message is empty
    public function create_topic($forum_id, $subject, $message, $additional_form_data = array(), $expected = '')
    {
        $posting_url = "posting.php?mode=post&f={$forum_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_TOPIC', $form_data, $expected);
    }