mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[ticket/12056] validate_config_vars: Fix "Creating ... from empty value".
PHPBB3-12056
This commit is contained in:
@@ -11,6 +11,16 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_acp.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 +70,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 +152,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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user