mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 08:17:47 +02:00
[ticket/17422] Adjust tests code
PHPBB-17422
This commit is contained in:
@@ -117,15 +117,13 @@ abstract class phpbb_functional_search_base extends phpbb_functional_test_case
|
||||
$this->add_lang('common');
|
||||
|
||||
// Create a new standard user if needed, topic and post to test searh for author
|
||||
$searchforauthoruser_name = 'searchforauthoruser';
|
||||
$searchforauthoruser_id = null; // if the user exists, array with user_id will be returned
|
||||
if (!$this->user_exists($searchforauthoruser_name, $searchforauthoruser_id))
|
||||
if (!$searchforauthoruser_id = $this->user_exists('searchforauthoruser'))
|
||||
{
|
||||
$searchforauthoruser_id = $this->create_user('searchforauthoruser');
|
||||
}
|
||||
else
|
||||
{
|
||||
$searchforauthoruser_id = (int) $searchforauthoruser_id[0];
|
||||
$searchforauthoruser_id = key($searchforauthoruser_id);
|
||||
}
|
||||
$this->remove_user_group('NEWLY_REGISTERED', ['searchforauthoruser']);
|
||||
$this->set_flood_interval(0);
|
||||
|
@@ -24,8 +24,7 @@ class phpbb_functional_ucp_attachments_test extends phpbb_functional_test_case
|
||||
$this->path = __DIR__ . '/fixtures/files/';
|
||||
$this->add_lang('posting');
|
||||
|
||||
$username = 'ucp-file-test';
|
||||
if (!$this->user_exists($username))
|
||||
if (!$this->user_exists('ucp-file-test'))
|
||||
{
|
||||
$this->create_user('ucp-file-test');
|
||||
}
|
||||
|
Reference in New Issue
Block a user