aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/ucp_profile_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/ucp_profile_test.php')
-rw-r--r--tests/functional/ucp_profile_test.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/functional/ucp_profile_test.php b/tests/functional/ucp_profile_test.php
new file mode 100644
index 0000000000..ea08eece78
--- /dev/null
+++ b/tests/functional/ucp_profile_test.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+/**
+* @group functional
+*/
+class phpbb_functional_ucp_profile_test extends phpbb_functional_test_case
+{
+ public function test_submitting_profile_info()
+ {
+ $this->add_lang('ucp');
+ $this->login();
+
+ $crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=profile_info');
+ $this->assertContainsLang('UCP_PROFILE_PROFILE_INFO', $crawler->filter('#cp-main h2')->text());
+
+ $form = $crawler->selectButton('Submit')->form(array(
+ 'pf_phpbb_location' => 'Bertie“s Empire',
+ ));
+ $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('Bertie“s Empire', $form->get('pf_phpbb_location')->getValue());
+ }
+}