aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/posting_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-06-09 18:57:05 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-06-09 18:57:05 +0200
commit65884bf2bd754343410a5b3d8b4eea2343dc42e9 (patch)
tree6003d6c6324c616130b06f85693101ac0e6b9482 /tests/functional/posting_test.php
parentb8151b1299c02506ffa0d665461d85e32cd4cd10 (diff)
downloadforums-65884bf2bd754343410a5b3d8b4eea2343dc42e9.tar
forums-65884bf2bd754343410a5b3d8b4eea2343dc42e9.tar.gz
forums-65884bf2bd754343410a5b3d8b4eea2343dc42e9.tar.bz2
forums-65884bf2bd754343410a5b3d8b4eea2343dc42e9.tar.xz
forums-65884bf2bd754343410a5b3d8b4eea2343dc42e9.zip
[ticket/11711] Reduce size of tests and also test topic titles
PHPBB3-11711
Diffstat (limited to 'tests/functional/posting_test.php')
-rw-r--r--tests/functional/posting_test.php43
1 files changed, 13 insertions, 30 deletions
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index 430a6496a0..b0a2f069e1 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -43,35 +43,18 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
$this->add_lang('posting');
- $crawler = self::request('GET', "posting.php?mode=reply&f=2&t=1&sid={$this->sid}");
-
- $form = $crawler->selectButton('Submit')->form();
-
- $hidden_fields = array(
- $crawler->filter('[type="hidden"]')->each(function ($node, $i) {
- return array('name' => $node->attr('name'), 'value' => $node->attr('value'));
- }),
- );
-
- foreach ($hidden_fields as $fields)
- {
- foreach($fields as $field)
- {
- $form_data[$field['name']] = $field['value'];
- }
- }
-
- // Bypass time restriction that said that if the lastclick time (i.e. time when the form was opened)
- // is not at least 2 seconds before submission, cancel the form
- $form_data['lastclick'] = 0;
-
- $form_data += array(
- 'subject' => 'Unsupported characters',
- 'message' => 'This is a test with these weird characters: 👅👅👅',
- 'post' => true,
- );
- $crawler = self::request('POST', "posting.php?mode=reply&f=2&t=1&sid={$this->sid}", $form_data);
-
- $this->assertContains('Your message contains the following unsupported characters', $crawler->text());
+ self::create_post(2,
+ 1,
+ 'Unsupported characters',
+ "This is a test with these weird characters: \xF0\x9F\x88\xB3 \xF0\x9F\x9A\xB6",
+ array(),
+ 'Your message contains the following unsupported characters');
+
+ self::create_post(2,
+ 1,
+ "Unsupported: \xF0\x9F\x88\xB3 \xF0\x9F\x9A\xB6",
+ 'This is a test with emoji characters in the topic title.',
+ array(),
+ 'Your subject contains the following unsupported characters');
}
}