1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 11:13:59 +02:00

[ticket/13847] Move quote generation to text_formatter.utils

PHPBB3-13847
This commit is contained in:
JoshyPHP
2015-05-17 20:15:06 +02:00
parent 6337407192
commit 8a077e0e94
5 changed files with 119 additions and 1 deletions

View File

@@ -72,6 +72,20 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
$this->assertContains('😀', $crawler->text());
}
public function test_quote()
{
$text = 'Test post </textarea>"\' &&amp;amp;';
$expected = '[quote="admin"]' . $text . '[/quote]';
$this->login();
$topic = $this->create_topic(2, 'Test Topic 1', 'Test topic');
$post = $this->create_post(2, $topic['topic_id'], 'Re: Test Topic 1', $text);
$crawler = self::request('GET', "posting.php?mode=quote&f=2&t={$post['topic_id']}&p={$post['post_id']}&sid={$this->sid}");
$this->assertContains($expected, $crawler->filter('textarea#message')->text());
}
/**
* @testdox max_quote_depth is applied to the text populating the posting form
*/