1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

[ticket/10620] Fixed functional tests to account for newlines

PHPBB3-10620
This commit is contained in:
JoshyPHP
2015-06-24 23:42:36 +02:00
parent 5a55ce3f68
commit 1f6b9bc048
2 changed files with 4 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
public function test_quote()
{
$text = 'Test post </textarea>"\' &&amp;amp;';
$expected = '([quote=admin[^]]*\\]' . preg_quote($text) . '\\[/quote\\])';
$expected = "(\\[quote=admin[^\\]]*\\]\n" . preg_quote($text) . "\n\\[/quote\\])";
$this->login();
$topic = $this->create_topic(2, 'Test Topic 1', 'Test topic');
@@ -110,7 +110,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
$this->set_quote_depth($quote_depth);
$crawler = self::request('GET', $quote_url);
$this->assertRegexp(
'(\\[quote=admin[^]]*\\]' . preg_quote($expected_text) . '\\[/quote\\])',
"(\\[quote=admin[^\\]]*\\]\n?" . preg_quote($expected_text) . "\n?\\[/quote\\])",
$crawler->filter('textarea#message')->text()
);
}