aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/registration_test.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-09-26 11:49:35 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-09-26 11:49:35 +0200
commitb1dbd5e9928669ec87c58f919bd1ce5c56ac718f (patch)
tree140c3ffe8b87043e0f036fd39b4dd1e61f183e3d /tests/functional/registration_test.php
parent0e6ac7511eeb795ea3236b304d697660ed9f7e43 (diff)
downloadforums-b1dbd5e9928669ec87c58f919bd1ce5c56ac718f.tar
forums-b1dbd5e9928669ec87c58f919bd1ce5c56ac718f.tar.gz
forums-b1dbd5e9928669ec87c58f919bd1ce5c56ac718f.tar.bz2
forums-b1dbd5e9928669ec87c58f919bd1ce5c56ac718f.tar.xz
forums-b1dbd5e9928669ec87c58f919bd1ce5c56ac718f.zip
[ticket/11868] Add functional test for registration
PHPBB3-11868
Diffstat (limited to 'tests/functional/registration_test.php')
-rw-r--r--tests/functional/registration_test.php49
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());
+ }
+}