mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
[ticket/10972] Drop user deletion.
Users should not be deleted in tests that test user creation. Tests should use unique user names to avoid collisions. User deletion should use user_remove anyway. PHPBB3-10972
This commit is contained in:
parent
fb5c4440e5
commit
ff993ba9d3
2 changed files with 0 additions and 16 deletions
|
@ -29,7 +29,6 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
|
|||
$crawler = $this->request('GET', 'index.php');
|
||||
$this->assert_response_success();
|
||||
$this->assertContains('anothertestuser', $crawler->filter('.icon-logout')->text());
|
||||
$this->delete_user('anothertestuser');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -216,9 +216,6 @@ class phpbb_functional_test_case extends phpbb_test_case
|
|||
/**
|
||||
* Creates a new user with limited permissions
|
||||
*
|
||||
* Always call delete_user after running a test that
|
||||
* requires create_user.
|
||||
*
|
||||
* @param string $username Also doubles up as the user's password
|
||||
* @return int ID of created user
|
||||
*/
|
||||
|
@ -266,18 +263,6 @@ class phpbb_functional_test_case extends phpbb_test_case
|
|||
return user_add($user_row);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a user
|
||||
*
|
||||
* @param string $username The username of the user to delete
|
||||
*/
|
||||
protected function delete_user($username)
|
||||
{
|
||||
$db = $this->get_db();
|
||||
$query = "DELETE FROM " . self::$config['table_prefix'] . "users WHERE username = '" . $db->sql_escape($username) . "'";
|
||||
$db->sql_query($query);
|
||||
}
|
||||
|
||||
protected function login($username = 'admin')
|
||||
{
|
||||
$this->add_lang('ucp');
|
||||
|
|
Loading…
Add table
Reference in a new issue