mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-04 14:47:52 +02:00
[ticket/12183] Add functional test for user password reset
PHPBB3-12183
This commit is contained in:
parent
c864d06ac6
commit
488bd1a1b1
35
tests/functional/user_password_reset_test.php
Normal file
35
tests/functional/user_password_reset_test.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?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_user_password_reset_test extends phpbb_functional_test_case
|
||||
{
|
||||
public function test_password_reset()
|
||||
{
|
||||
$this->add_lang('ucp');
|
||||
$this->create_user('reset-password-test-user');
|
||||
|
||||
$crawler = self::request('GET', "ucp.php?mode=sendpassword&sid={$this->sid}");
|
||||
$form = $crawler->selectButton('submit')->form(array(
|
||||
'username' => 'reset-password-test-user',
|
||||
));
|
||||
$crawler = self::submit($form);
|
||||
$this->assertContainsLang('NO_EMAIL_USER', $crawler->text());
|
||||
|
||||
$crawler = self::request('GET', "ucp.php?mode=sendpassword&sid={$this->sid}");
|
||||
$form = $crawler->selectButton('submit')->form(array(
|
||||
'username' => 'reset-password-test-user',
|
||||
'email' => 'nobody@example.com',
|
||||
));
|
||||
$crawler = self::submit($form);
|
||||
$this->assertContainsLang('PASSWORD_UPDATED', $crawler->text());
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user