mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-14 04:34:07 +02:00
[ticket/16549] Fix tests
PHPBB3-16549
This commit is contained in:
@@ -63,6 +63,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');
|
||||
|
||||
|
@@ -65,8 +65,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(
|
||||
|
@@ -55,6 +55,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,
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -66,6 +66,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(
|
||||
@@ -153,7 +154,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',
|
||||
@@ -184,7 +185,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',
|
||||
|
@@ -44,6 +44,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,
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -49,6 +49,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,
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -52,6 +52,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