mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 07:18:08 +02: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:
@@ -29,7 +29,6 @@ class phpbb_functional_auth_test extends phpbb_functional_test_case
|
|||||||
$crawler = $this->request('GET', 'index.php');
|
$crawler = $this->request('GET', 'index.php');
|
||||||
$this->assert_response_success();
|
$this->assert_response_success();
|
||||||
$this->assertContains('anothertestuser', $crawler->filter('.icon-logout')->text());
|
$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
|
* 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
|
* @param string $username Also doubles up as the user's password
|
||||||
* @return int ID of created user
|
* @return int ID of created user
|
||||||
*/
|
*/
|
||||||
@@ -266,18 +263,6 @@ class phpbb_functional_test_case extends phpbb_test_case
|
|||||||
return user_add($user_row);
|
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')
|
protected function login($username = 'admin')
|
||||||
{
|
{
|
||||||
$this->add_lang('ucp');
|
$this->add_lang('ucp');
|
||||||
|
Reference in New Issue
Block a user