diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-01-01 09:55:34 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-01-01 09:55:34 +0100 |
commit | dfa88441de029736a5c4f6c2782e307770119aa6 (patch) | |
tree | fca375b0278cecb1795331282f79570adfae1b42 | |
parent | e0529ecfe87f8f68d51eeadb13d4999d5f453480 (diff) | |
parent | 7273e24101e9cc5d244ddda4e6c674b8960ed0ba (diff) | |
download | forums-dfa88441de029736a5c4f6c2782e307770119aa6.tar forums-dfa88441de029736a5c4f6c2782e307770119aa6.tar.gz forums-dfa88441de029736a5c4f6c2782e307770119aa6.tar.bz2 forums-dfa88441de029736a5c4f6c2782e307770119aa6.tar.xz forums-dfa88441de029736a5c4f6c2782e307770119aa6.zip |
Merge pull request #4102 from JoshyPHP/ticket/10628
[ticket/10628] http:// prepended to "www." urls
-rw-r--r-- | tests/functional/posting_test.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php index 724c42b289..bf9e3eb51a 100644 --- a/tests/functional/posting_test.php +++ b/tests/functional/posting_test.php @@ -205,4 +205,29 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case $crawler->filter('#preview .signature')->html() ); } + + /** + * @ticket PHPBB3-10628 + */ + public function test_www_links_preview() + { + $text = 'www.example.org'; + $url = 'http://' . $text; + + $this->add_lang('posting'); + $this->login(); + + $crawler = self::request('GET', 'posting.php?mode=post&f=2'); + $form = $crawler->selectButton('Preview')->form(array( + 'subject' => 'Test subject', + 'message' => $text + )); + $crawler = self::submit($form); + + // Test that the textarea remains unchanged + $this->assertEquals($text, $crawler->filter('#message')->text()); + + // Test that the preview contains the correct link + $this->assertEquals($url, $crawler->filter('#preview a')->attr('href')); + } } |