diff options
| author | Nils Adermann <naderman@naderman.de> | 2014-04-10 14:14:30 -0700 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2014-04-10 14:14:30 -0700 |
| commit | 0ad98336689b12f2a7df6586c659ed6fe150de76 (patch) | |
| tree | 7e1113982e3ee4a54dbc4514b061e92e6d437c8a /tests/functional | |
| parent | e2654b34c8ca2bcd7434a24d41338605579b3ecd (diff) | |
| parent | 45e6dd23e90fb3cc65f2b2454579f738fb81d293 (diff) | |
| download | forums-0ad98336689b12f2a7df6586c659ed6fe150de76.tar forums-0ad98336689b12f2a7df6586c659ed6fe150de76.tar.gz forums-0ad98336689b12f2a7df6586c659ed6fe150de76.tar.bz2 forums-0ad98336689b12f2a7df6586c659ed6fe150de76.tar.xz forums-0ad98336689b12f2a7df6586c659ed6fe150de76.zip | |
Merge remote-tracking branch 'github-nickvergessen/ticket/12331' into develop-ascraeus
* github-nickvergessen/ticket/12331:
[ticket/12331] Add functional test for saving custom profile fields
[ticket/12331] Fix SQL error when inserting a new entry to profile field data
Diffstat (limited to 'tests/functional')
| -rw-r--r-- | tests/functional/ucp_profile_test.php | 33 |
1 files changed, 33 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..e0e6255f79 --- /dev/null +++ b/tests/functional/ucp_profile_test.php @@ -0,0 +1,33 @@ +<?php +/** +* +* @package testing +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +/** +* @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()); + } +} |
