mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge remote-tracking branch 'bantu/ticket/12056-develop' into develop
* bantu/ticket/12056-develop: [ticket/12056] group_user_attributes: Fix "Creating ... from empty value". [ticket/12056] Fix "Call to undefined function ...\utf8_normalize_nfc()" [ticket/12056] Fix "Call to undefined function ...\utf8_clean_string()" [ticket/12056] Fix "Call to a member function trigger_event() on a non-object". [ticket/12056] Fix "Call to undefined function phpbb\phpbb_get_plural_form()". [ticket/12056] Fix "undefined function phpbb_pcre_utf8_support()". [ticket/12056] validate_config_vars: Fix ".. undefined function utf8_strlen()" [ticket/12056] validate_config_vars: Fix "Creating ... from empty value". [ticket/12056] validate_range: Fix "Creating default object from empty value" [ticket/12056] build_select: Fix "Creating default object from empty value" [ticket/12056] h_radio test: Fix "Creating default object from empty value"
This commit is contained in:
commit
fa33abaf0d
11 changed files with 53 additions and 35 deletions
|
@ -8,6 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||||
|
require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
|
||||||
|
|
||||||
class phpbb_auth_provider_apache_test extends phpbb_database_test_case
|
class phpbb_auth_provider_apache_test extends phpbb_database_test_case
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||||
|
require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
|
||||||
|
|
||||||
class phpbb_auth_provider_db_test extends phpbb_database_test_case
|
class phpbb_auth_provider_db_test extends phpbb_database_test_case
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php';
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php';
|
||||||
require_once dirname(__FILE__) . '/validate_data_helper.php';
|
require_once dirname(__FILE__) . '/validate_data_helper.php';
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,16 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
|
||||||
|
|
||||||
class phpbb_functions_acp_built_select_test extends phpbb_test_case
|
class phpbb_functions_acp_built_select_test extends phpbb_test_case
|
||||||
{
|
{
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
global $user;
|
||||||
|
|
||||||
|
$user = new phpbb_mock_user();
|
||||||
|
$user->lang = new phpbb_mock_lang();
|
||||||
|
}
|
||||||
|
|
||||||
public function build_select_data()
|
public function build_select_data()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
@ -46,10 +56,6 @@ class phpbb_functions_acp_built_select_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_build_select($option_ary, $option_default, $expected)
|
public function test_build_select($option_ary, $option_default, $expected)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$user->lang = new phpbb_mock_lang();
|
|
||||||
|
|
||||||
$this->assertEquals($expected, build_select($option_ary, $option_default));
|
$this->assertEquals($expected, build_select($option_ary, $option_default));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,16 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
|
||||||
|
|
||||||
class phpbb_functions_acp_h_radio_test extends phpbb_test_case
|
class phpbb_functions_acp_h_radio_test extends phpbb_test_case
|
||||||
{
|
{
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
global $user;
|
||||||
|
|
||||||
|
$user = new phpbb_mock_user();
|
||||||
|
$user->lang = new phpbb_mock_lang();
|
||||||
|
}
|
||||||
|
|
||||||
public function h_radio_data()
|
public function h_radio_data()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
@ -111,10 +121,6 @@ class phpbb_functions_acp_h_radio_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_h_radio($name, $input_ary, $input_default, $id, $key, $expected)
|
public function test_h_radio($name, $input_ary, $input_default, $id, $key, $expected)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$user->lang = new phpbb_mock_lang();
|
|
||||||
|
|
||||||
$this->assertEquals($expected, h_radio($name, $input_ary, $input_default, $id, $key));
|
$this->assertEquals($expected, h_radio($name, $input_ary, $input_default, $id, $key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,20 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
|
||||||
|
require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
|
||||||
|
|
||||||
class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
|
class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
|
||||||
{
|
{
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
global $user;
|
||||||
|
|
||||||
|
$user = new phpbb_mock_user();
|
||||||
|
$user->lang = new phpbb_mock_lang();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data sets that don't throw an error.
|
* Data sets that don't throw an error.
|
||||||
*/
|
*/
|
||||||
|
@ -60,10 +71,6 @@ class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_validate_config_vars_fit($test_data, $cfg_array)
|
public function test_validate_config_vars_fit($test_data, $cfg_array)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$user->lang = new phpbb_mock_lang();
|
|
||||||
|
|
||||||
$phpbb_error = array();
|
$phpbb_error = array();
|
||||||
validate_config_vars($test_data, $cfg_array, $phpbb_error);
|
validate_config_vars($test_data, $cfg_array, $phpbb_error);
|
||||||
|
|
||||||
|
@ -146,10 +153,6 @@ class phpbb_functions_acp_validate_config_vars_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_validate_config_vars_error($test_data, $cfg_array, $expected)
|
public function test_validate_config_vars_error($test_data, $cfg_array, $expected)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$user->lang = new phpbb_mock_lang();
|
|
||||||
|
|
||||||
$phpbb_error = array();
|
$phpbb_error = array();
|
||||||
validate_config_vars($test_data, $cfg_array, $phpbb_error);
|
validate_config_vars($test_data, $cfg_array, $phpbb_error);
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,16 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.php';
|
||||||
|
|
||||||
class phpbb_functions_acp_validate_range_test extends phpbb_test_case
|
class phpbb_functions_acp_validate_range_test extends phpbb_test_case
|
||||||
{
|
{
|
||||||
|
protected function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
global $user;
|
||||||
|
|
||||||
|
$user = new phpbb_mock_user();
|
||||||
|
$user->lang = new phpbb_mock_lang();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Data sets that don't throw an error.
|
* Data sets that don't throw an error.
|
||||||
*/
|
*/
|
||||||
|
@ -52,10 +62,6 @@ class phpbb_functions_acp_validate_range_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_validate_range_fit($test_data)
|
public function test_validate_range_fit($test_data)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$user->lang = new phpbb_mock_lang();
|
|
||||||
|
|
||||||
$phpbb_error = array();
|
$phpbb_error = array();
|
||||||
validate_range($test_data, $phpbb_error);
|
validate_range($test_data, $phpbb_error);
|
||||||
|
|
||||||
|
@ -91,10 +97,6 @@ class phpbb_functions_acp_validate_range_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_validate_range_too_low($test_data)
|
public function test_validate_range_too_low($test_data)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$user->lang = new phpbb_mock_lang();
|
|
||||||
|
|
||||||
$phpbb_error = array();
|
$phpbb_error = array();
|
||||||
validate_range($test_data, $phpbb_error);
|
validate_range($test_data, $phpbb_error);
|
||||||
|
|
||||||
|
@ -130,10 +132,6 @@ class phpbb_functions_acp_validate_range_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_validate_range_too_big($test_data)
|
public function test_validate_range_too_big($test_data)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$user->lang = new phpbb_mock_lang();
|
|
||||||
|
|
||||||
$phpbb_error = array();
|
$phpbb_error = array();
|
||||||
validate_range($test_data, $phpbb_error);
|
validate_range($test_data, $phpbb_error);
|
||||||
|
|
||||||
|
@ -158,10 +156,6 @@ class phpbb_functions_acp_validate_range_test extends phpbb_test_case
|
||||||
*/
|
*/
|
||||||
public function test_validate_range_too_long($test_data)
|
public function test_validate_range_too_long($test_data)
|
||||||
{
|
{
|
||||||
global $user;
|
|
||||||
|
|
||||||
$user->lang = new phpbb_mock_lang();
|
|
||||||
|
|
||||||
$phpbb_error = array();
|
$phpbb_error = array();
|
||||||
validate_range($test_data, $phpbb_error);
|
validate_range($test_data, $phpbb_error);
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,7 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes
|
||||||
{
|
{
|
||||||
global $auth, $cache, $db, $phpbb_dispatcher, $user, $phpbb_container, $phpbb_log, $phpbb_root_path, $phpEx;
|
global $auth, $cache, $db, $phpbb_dispatcher, $user, $phpbb_container, $phpbb_log, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
|
$user = new phpbb_mock_user;
|
||||||
$user->ip = '';
|
$user->ip = '';
|
||||||
$cache = new phpbb_mock_cache;
|
$cache = new phpbb_mock_cache;
|
||||||
$db = $this->new_dbal();
|
$db = $this->new_dbal();
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php';
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php';
|
||||||
|
|
||||||
class phpbb_password_complexity_test extends phpbb_test_case
|
class phpbb_password_complexity_test extends phpbb_test_case
|
||||||
|
|
|
@ -16,7 +16,7 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca
|
||||||
{
|
{
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
global $cache, $user;
|
global $cache, $user, $phpbb_dispatcher;
|
||||||
|
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca
|
||||||
|
|
||||||
$user = new phpbb_mock_user;
|
$user = new phpbb_mock_user;
|
||||||
$user->optionset('viewcensors', false);
|
$user->optionset('viewcensors', false);
|
||||||
|
|
||||||
|
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_empty_string()
|
public function test_empty_string()
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||||
|
|
||||||
class phpbb_user_lang_test extends phpbb_test_case
|
class phpbb_user_lang_test extends phpbb_test_case
|
||||||
{
|
{
|
||||||
public function test_user_lang_sprintf()
|
public function test_user_lang_sprintf()
|
||||||
|
|
Loading…
Add table
Reference in a new issue