mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-15 05:04:09 +02:00
[ticket/16549] Fix tests
PHPBB3-16549
This commit is contained in:
@@ -66,6 +66,8 @@ class manager_test extends phpbb_database_test_case
|
||||
$language = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx));
|
||||
$collection = new \phpbb\di\service_collection($container);
|
||||
$user = new \phpbb\user($language, '\phpbb\datetime');
|
||||
$user->data['user_id'] = 2;
|
||||
$user->ip = '';
|
||||
|
||||
$this->log = new \phpbb\log\log($this->db, $user, $auth, $dispatcher, $phpbb_root_path, 'adm/', $phpEx, $table_prefix . 'log');
|
||||
|
||||
|
@@ -67,8 +67,10 @@ class phpbb_profilefield_type_bool_test extends phpbb_test_case
|
||||
'lang_id' => 1,
|
||||
'lang_name' => 'field',
|
||||
'field_required' => false,
|
||||
'field_default_value' => 1,
|
||||
'field_length' => 1,
|
||||
'field_default_value' => 1,
|
||||
'field_length' => 1,
|
||||
'field_show_novalue' => null,
|
||||
'field_novalue' => null,
|
||||
);
|
||||
|
||||
$this->options = array(
|
||||
|
@@ -61,6 +61,8 @@ class phpbb_profilefield_type_date_test extends phpbb_test_case
|
||||
'lang_id' => 1,
|
||||
'lang_name' => 'field',
|
||||
'field_required' => false,
|
||||
'field_show_novalue' => null,
|
||||
'field_novalue' => null,
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -69,6 +69,7 @@ class phpbb_profilefield_type_dropdown_test extends phpbb_test_case
|
||||
'field_required' => false,
|
||||
'field_validation' => '.*',
|
||||
'field_novalue' => 0,
|
||||
'field_show_novalue' => null,
|
||||
);
|
||||
|
||||
$this->dropdown_options = array(
|
||||
@@ -156,7 +157,7 @@ class phpbb_profilefield_type_dropdown_test extends phpbb_test_case
|
||||
'Field should output nothing for empty value',
|
||||
),
|
||||
array(
|
||||
'',
|
||||
null, // Since PHP 8, '' == 0 returns false, hence use null instead of '' (empty string)
|
||||
array('field_show_novalue' => false),
|
||||
null,
|
||||
'Field should simply output null for empty value',
|
||||
@@ -187,7 +188,7 @@ class phpbb_profilefield_type_dropdown_test extends phpbb_test_case
|
||||
'Field should return the correct raw value',
|
||||
),
|
||||
array(
|
||||
'',
|
||||
null, // Since PHP 8, '' == 0 returns false, hence use null instead of '' (empty string)
|
||||
array('field_show_novalue' => false),
|
||||
null,
|
||||
'Field should null for empty value without show_novalue',
|
||||
|
@@ -50,6 +50,10 @@ class phpbb_profilefield_type_int_test extends phpbb_test_case
|
||||
'lang_id' => 1,
|
||||
'lang_name' => 'field',
|
||||
'field_required' => false,
|
||||
'field_show_novalue' => null,
|
||||
'field_novalue' => null,
|
||||
'field_minlen' => null,
|
||||
'field_maxlen' => null,
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -53,6 +53,10 @@ class phpbb_profilefield_type_string_test extends phpbb_test_case
|
||||
'lang_name' => 'field',
|
||||
'field_required' => false,
|
||||
'field_validation' => '.*',
|
||||
'field_show_novalue' => null,
|
||||
'field_novalue' => null,
|
||||
'field_minlen' => null,
|
||||
'field_maxlen' => null,
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -56,6 +56,10 @@ class phpbb_profilefield_type_url_test extends phpbb_test_case
|
||||
'lang_id' => 1,
|
||||
'lang_name' => 'field',
|
||||
'field_required' => false,
|
||||
'field_show_novalue' => null,
|
||||
'field_novalue' => null,
|
||||
'field_minlen' => null,
|
||||
'field_maxlen' => null,
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user