diff options
author | Vjacheslav Trushkin <cyberalien@gmail.com> | 2013-09-26 03:38:44 -0700 |
---|---|---|
committer | Vjacheslav Trushkin <cyberalien@gmail.com> | 2013-09-26 03:38:44 -0700 |
commit | 1e1e9130e6352faaeea509b41aa10915c30d833c (patch) | |
tree | 140c3ffe8b87043e0f036fd39b4dd1e61f183e3d | |
parent | 0e6ac7511eeb795ea3236b304d697660ed9f7e43 (diff) | |
parent | b1dbd5e9928669ec87c58f919bd1ce5c56ac718f (diff) | |
download | forums-1e1e9130e6352faaeea509b41aa10915c30d833c.tar forums-1e1e9130e6352faaeea509b41aa10915c30d833c.tar.gz forums-1e1e9130e6352faaeea509b41aa10915c30d833c.tar.bz2 forums-1e1e9130e6352faaeea509b41aa10915c30d833c.tar.xz forums-1e1e9130e6352faaeea509b41aa10915c30d833c.zip |
Merge pull request #3 from nickvergessen/ticket/cyberalien/11868
Ticket/cyberalien/11868
-rw-r--r-- | tests/functional/registration_test.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/functional/registration_test.php b/tests/functional/registration_test.php new file mode 100644 index 0000000000..eb82b71fdf --- /dev/null +++ b/tests/functional/registration_test.php @@ -0,0 +1,49 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +/** +* @group functional +*/ +class phpbb_functional_registration_test extends phpbb_functional_test_case +{ + public function test_disable_captcha_on_registration() + { + $this->login(); + $this->admin_login(); + + $crawler = self::request('GET', "adm/index.php?i=acp_board&mode=registration&sid={$this->sid}"); + $form = $crawler->selectButton('Submit')->form(); + $form['config[enable_confirm]']->setValue('0'); + $crawler = self::submit($form); + + $this->assertContainsLang('CONFIG_UPDATED', $crawler->filter('#main .successbox')->text()); + } + + public function test_register_new_account() + { + $this->add_lang('ucp'); + + $crawler = self::request('GET', 'ucp.php?mode=register'); + $this->assertContainsLang('REGISTRATION', $crawler->filter('div.content h2')->text()); + + $form = $crawler->selectButton('I agree to these terms')->form(); + $crawler = self::submit($form); + + $form = $crawler->selectButton('Submit')->form(array( + 'username' => 'user-reg-test', + 'email' => 'user-reg-test@phpbb.com', + 'new_password' => 'testtest', + 'password_confirm' => 'testtest', + )); + $form['tz']->select('Europe/Berlin'); + $crawler = self::submit($form); + + $this->assertContainsLang('ACCOUNT_ADDED', $crawler->filter('#message')->text()); + } +} |