diff options
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/fileupload_form_test.php | 2 | ||||
-rw-r--r-- | tests/functional/fileupload_remote_test.php | 2 | ||||
-rw-r--r-- | tests/functional/forgot_password_test.php | 2 | ||||
-rw-r--r-- | tests/functional/paging_test.php | 4 | ||||
-rw-r--r-- | tests/functional/plupload_test.php | 2 | ||||
-rw-r--r-- | tests/functional/posting_test.php | 23 | ||||
-rw-r--r-- | tests/functional/ucp_profile_test.php | 12 | ||||
-rw-r--r-- | tests/functional/visibility_softdelete_test.php | 8 |
8 files changed, 53 insertions, 2 deletions
diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php index cf36a0523f..b9d55fbd3c 100644 --- a/tests/functional/fileupload_form_test.php +++ b/tests/functional/fileupload_form_test.php @@ -42,6 +42,8 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case unlink($fileinfo->getPathname()); } + + parent::tearDown(); } private function upload_file($filename, $mimetype) diff --git a/tests/functional/fileupload_remote_test.php b/tests/functional/fileupload_remote_test.php index f904258a5c..b170fc051f 100644 --- a/tests/functional/fileupload_remote_test.php +++ b/tests/functional/fileupload_remote_test.php @@ -43,6 +43,8 @@ class phpbb_functional_fileupload_remote_test extends phpbb_functional_test_case global $config, $user; $user = null; $config = array(); + + parent::tearDown(); } public function test_invalid_extension() diff --git a/tests/functional/forgot_password_test.php b/tests/functional/forgot_password_test.php index 64fa19557f..c95efc5b2e 100644 --- a/tests/functional/forgot_password_test.php +++ b/tests/functional/forgot_password_test.php @@ -57,5 +57,7 @@ class phpbb_functional_forgot_password_test extends phpbb_functional_test_case 'config[allow_password_reset]' => 1, )); $crawler = self::submit($form); + + parent::tearDown(); } } diff --git a/tests/functional/paging_test.php b/tests/functional/paging_test.php index 97ce822fdf..cfaf9104a8 100644 --- a/tests/functional/paging_test.php +++ b/tests/functional/paging_test.php @@ -30,12 +30,12 @@ class phpbb_functional_paging_test extends phpbb_functional_test_case $this->assertContains('post no4', $crawler->text()); $this->assertNotContains('post no16', $crawler->text()); - $next_link = $crawler->filter('#viewtopic > fieldset > a.arrow-right')->attr('href'); + $next_link = $crawler->filter('.pagination > ul > li.next > a')->attr('href'); $crawler = self::request('GET', $next_link); $this->assertNotContains('post no4', $crawler->text()); $this->assertContains('post no16', $crawler->text()); - $prev_link = $crawler->filter('#viewtopic > fieldset > a.arrow-left')->attr('href'); + $prev_link = $crawler->filter('.pagination > ul > li.previous > a')->attr('href'); $crawler = self::request('GET', $prev_link); $this->assertContains('post no4', $crawler->text()); $this->assertNotContains('post no16', $crawler->text()); diff --git a/tests/functional/plupload_test.php b/tests/functional/plupload_test.php index ee71597ffc..d9faec035c 100644 --- a/tests/functional/plupload_test.php +++ b/tests/functional/plupload_test.php @@ -57,6 +57,8 @@ class phpbb_functional_plupload_test extends phpbb_functional_test_case unlink($fileinfo->getPathname()); } + + parent::tearDown(); } public function get_urls() diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php index 2611ef7bf1..fd802eed45 100644 --- a/tests/functional/posting_test.php +++ b/tests/functional/posting_test.php @@ -36,4 +36,27 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case $crawler = self::request('GET', "posting.php?mode=quote&f=2&t={$post2['topic_id']}&p={$post2['post_id']}&sid={$this->sid}"); $this->assertContains('This is a test post posted by the testing framework.', $crawler->filter('html')->text()); } + + public function test_unsupported_characters() + { + $this->login(); + + $this->add_lang('posting'); + + 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' + ); + } } diff --git a/tests/functional/ucp_profile_test.php b/tests/functional/ucp_profile_test.php index ea08eece78..e7abba9255 100644 --- a/tests/functional/ucp_profile_test.php +++ b/tests/functional/ucp_profile_test.php @@ -25,13 +25,25 @@ class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case $this->assertContainsLang('UCP_PROFILE_PROFILE_INFO', $crawler->filter('#cp-main h2')->text()); $form = $crawler->selectButton('Submit')->form(array( + 'pf_phpbb_facebook' => 'phpbb', + 'pf_phpbb_googleplus' => 'phpbb', 'pf_phpbb_location' => 'Bertie“s Empire', + 'pf_phpbb_skype' => 'phpbb.skype.account', + 'pf_phpbb_twitter' => 'phpbb_twitter', + 'pf_phpbb_youtube' => 'phpbb.youtube', )); + $crawler = self::submit($form); $this->assertContainsLang('PROFILE_UPDATED', $crawler->filter('#message')->text()); $crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info'); $form = $crawler->selectButton('Submit')->form(); + + $this->assertEquals('phpbb', $form->get('pf_phpbb_facebook')->getValue()); + $this->assertEquals('phpbb', $form->get('pf_phpbb_googleplus')->getValue()); $this->assertEquals('Bertie“s Empire', $form->get('pf_phpbb_location')->getValue()); + $this->assertEquals('phpbb.skype.account', $form->get('pf_phpbb_skype')->getValue()); + $this->assertEquals('phpbb_twitter', $form->get('pf_phpbb_twitter')->getValue()); + $this->assertEquals('phpbb.youtube', $form->get('pf_phpbb_youtube')->getValue()); } } diff --git a/tests/functional/visibility_softdelete_test.php b/tests/functional/visibility_softdelete_test.php index bc722ea043..5b5f09905c 100644 --- a/tests/functional/visibility_softdelete_test.php +++ b/tests/functional/visibility_softdelete_test.php @@ -595,8 +595,15 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_ 'forum_last_post_id' => $this->data['posts']['Soft Delete Topic #1'], ), 'before merging #1'); + $this->add_lang('viewtopic'); $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #2']}&sid={$this->sid}"); + $bookmark_tag = $crawler->filter('a.bookmark-link'); + $this->assertContainsLang('BOOKMARK_TOPIC', $bookmark_tag->text()); + $bookmark_link = $bookmark_tag->attr('href'); + $crawler_bookmark = self::request('GET', $bookmark_link); + $this->assertContainsLang('BOOKMARK_ADDED', $crawler_bookmark->text()); + $this->add_lang('mcp'); $form = $crawler->selectButton('Go')->eq(1)->form(); $form['action']->select('merge_topic'); @@ -613,6 +620,7 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_ $crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}"); $this->assertContains('Soft Delete Topic #1', $crawler->filter('h2')->text()); $this->assertContainsLang('POST_DELETED_ACTION', $crawler->filter('body')->text()); + $this->assertContainsLang('BOOKMARK_TOPIC_REMOVE', $crawler->filter('body')->text()); $this->assert_forum_details($this->data['forums']['Soft Delete #1'], array( 'forum_posts_approved' => 1, |