diff options
author | Daniel Sinn <daniel.p.sinn@gmail.com> | 2016-10-03 12:24:02 -0400 |
---|---|---|
committer | Daniel Sinn <daniel.p.sinn@gmail.com> | 2016-10-03 12:24:02 -0400 |
commit | bf8ee698f9275b8baf46ebe74de79cd54a30756b (patch) | |
tree | 796353e00705bbe2fcd5770ead2f48ff885e48de /tests | |
parent | 0b3951cb815986abfe5645387091d49982c138b9 (diff) | |
download | forums-bf8ee698f9275b8baf46ebe74de79cd54a30756b.tar forums-bf8ee698f9275b8baf46ebe74de79cd54a30756b.tar.gz forums-bf8ee698f9275b8baf46ebe74de79cd54a30756b.tar.bz2 forums-bf8ee698f9275b8baf46ebe74de79cd54a30756b.tar.xz forums-bf8ee698f9275b8baf46ebe74de79cd54a30756b.zip |
[ticket/14802] Add test for empty/blank lines in poll options
PHPBB3-14802
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/posting_test.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php index 33632a01e1..914233240e 100644 --- a/tests/functional/posting_test.php +++ b/tests/functional/posting_test.php @@ -130,6 +130,22 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case } } + public function test_post_poll() + { + $this->login(); + + $post = $this->create_topic( + 2, + '[ticket/14802] Test Poll Option Spacing', + 'Empty/blank lines should not be additional poll options.', + array('poll_title' => 'Poll Title', 'poll_option_text' => "\n A \nB\n\nC \n D\nE\n\n \n") + ); + + $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}"); + $this->assertEquals('Poll Title', $crawler->filter('.poll-title')->text()); + $this->assertEquals(5, $crawler->filter('*[data-poll-option-id]')->count()); + } + protected function set_quote_depth($depth) { $crawler = self::request('GET', 'adm/index.php?sid=' . $this->sid . '&i=acp_board&mode=post'); |