From 92f198037776e1832f6e58c93b20b3673631674f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 19 Feb 2014 18:59:45 +0100 Subject: [PATCH] [ticket/12183] Check if database columns were updated before changing them PHPBB3-12183 --- tests/functional/user_password_reset_test.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/functional/user_password_reset_test.php b/tests/functional/user_password_reset_test.php index a30efc679a..65222c1aa6 100644 --- a/tests/functional/user_password_reset_test.php +++ b/tests/functional/user_password_reset_test.php @@ -34,6 +34,11 @@ class phpbb_functional_user_password_reset_test extends phpbb_functional_test_ca $crawler = self::submit($form); $this->assertContainsLang('PASSWORD_UPDATED', $crawler->text()); + // Check if columns in database were updated for password reset + $this->get_user_data(); + $this->assertNotNull($this->user_data['user_actkey']); + $this->assertNotNull($this->user_data['user_newpasswd']); + // Make sure we know the password $db = $this->get_db(); $this->passwords_manager = $this->get_passwords_manager(); @@ -45,9 +50,6 @@ class phpbb_functional_user_password_reset_test extends phpbb_functional_test_ca public function test_login_after_reset() { - $this->get_user_data(); - $this->assertNotNull($this->user_data['user_actkey']); - $this->assertNotNull($this->user_data['user_newpasswd']); $this->login('reset-password-test-user'); }