aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/posting_test.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2016-10-03 20:20:54 +0200
committerTristan Darricau <github@nicofuma.fr>2016-10-03 20:20:54 +0200
commit7bb4e88acdb0f45f8bfbad74b558db65524cbe1a (patch)
treebe3cd03cf45d1e17e7404c0433e2be9706bc1421 /tests/functional/posting_test.php
parentb28fe0a7fa128e3fc055e8a661673cee894ceee5 (diff)
parent1ad64f89b817a42722b522f4a763424eea3b5a5f (diff)
downloadforums-7bb4e88acdb0f45f8bfbad74b558db65524cbe1a.tar
forums-7bb4e88acdb0f45f8bfbad74b558db65524cbe1a.tar.gz
forums-7bb4e88acdb0f45f8bfbad74b558db65524cbe1a.tar.bz2
forums-7bb4e88acdb0f45f8bfbad74b558db65524cbe1a.tar.xz
forums-7bb4e88acdb0f45f8bfbad74b558db65524cbe1a.zip
Merge branch '3.1.x' into 3.2.x
* 3.1.x: [ticket/14802] Add test for empty/blank lines in poll options [ticket/14802] Empty/blank lines should not be additional poll options
Diffstat (limited to 'tests/functional/posting_test.php')
-rw-r--r--tests/functional/posting_test.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index bf9e3eb51a..9dd8a1dc91 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -159,6 +159,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');