mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-13 04:13:29 +02:00
[ticket/10733] Removing static from data providers
Removing static from data provider functions PHPBB3-10733
This commit is contained in:
parent
2509853ca5
commit
f5bac7686b
@ -17,7 +17,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/three_users.xml');
|
||||
}
|
||||
|
||||
public static function return_on_error_select_data()
|
||||
public function return_on_error_select_data()
|
||||
{
|
||||
return array(
|
||||
array('phpbb_users', "username_clean = 'bertie'", array(array('username_clean' => 'bertie'))),
|
||||
@ -44,7 +44,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected, $db->sql_fetchrowset($result));
|
||||
}
|
||||
|
||||
public static function fetchrow_data()
|
||||
public function fetchrow_data()
|
||||
{
|
||||
return array(
|
||||
array('', array(array('username_clean' => 'barfoo'),
|
||||
@ -95,7 +95,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
public static function fetchfield_data()
|
||||
public function fetchfield_data()
|
||||
{
|
||||
return array(
|
||||
array('', array('barfoo', 'foobar', 'bertie')),
|
||||
@ -125,7 +125,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected, $ary);
|
||||
}
|
||||
|
||||
public static function query_limit_data()
|
||||
public function query_limit_data()
|
||||
{
|
||||
return array(
|
||||
array(0, 0, array(array('username_clean' => 'barfoo'),
|
||||
@ -166,7 +166,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected, $ary);
|
||||
}
|
||||
|
||||
public static function like_expression_data()
|
||||
public function like_expression_data()
|
||||
{
|
||||
// * = any_char; # = one_char
|
||||
return array(
|
||||
@ -203,7 +203,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
public static function in_set_data()
|
||||
public function in_set_data()
|
||||
{
|
||||
return array(
|
||||
array('user_id', 3, false, false, array(array('username_clean' => 'bertie'))),
|
||||
@ -277,7 +277,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
public static function build_array_data()
|
||||
public function build_array_data()
|
||||
{
|
||||
return array(
|
||||
array(array('username_clean' => 'barfoo'), array(array('username_clean' => 'barfoo'))),
|
||||
|
@ -16,7 +16,7 @@ class phpbb_dbal_write_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml');
|
||||
}
|
||||
|
||||
public static function build_array_insert_data()
|
||||
public function build_array_insert_data()
|
||||
{
|
||||
return array(
|
||||
array(array(
|
||||
@ -104,7 +104,7 @@ class phpbb_dbal_write_test extends phpbb_database_test_case
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
public static function update_data()
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
|
@ -15,7 +15,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/group_positions.xml');
|
||||
}
|
||||
|
||||
public static function get_group_value_data()
|
||||
public function get_group_value_data()
|
||||
{
|
||||
return array(
|
||||
array('teampage', 1, 0),
|
||||
@ -38,7 +38,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected, $test_class->get_group_value($group_id));
|
||||
}
|
||||
|
||||
public static function get_group_count_data()
|
||||
public function get_group_count_data()
|
||||
{
|
||||
return array(
|
||||
array('teampage', 2),
|
||||
@ -59,7 +59,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected, $test_class->get_group_count());
|
||||
}
|
||||
|
||||
public static function add_group_data()
|
||||
public function add_group_data()
|
||||
{
|
||||
return array(
|
||||
array('teampage', 1, array(
|
||||
@ -93,7 +93,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected, $db->sql_fetchrowset($result));
|
||||
}
|
||||
|
||||
public static function delete_group_data()
|
||||
public function delete_group_data()
|
||||
{
|
||||
return array(
|
||||
array('teampage', 1, false, array(
|
||||
@ -147,7 +147,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected, $db->sql_fetchrowset($result));
|
||||
}
|
||||
|
||||
public static function move_up_data()
|
||||
public function move_up_data()
|
||||
{
|
||||
return array(
|
||||
array('teampage', 1, array(
|
||||
@ -186,7 +186,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected, $db->sql_fetchrowset($result));
|
||||
}
|
||||
|
||||
public static function move_down_data()
|
||||
public function move_down_data()
|
||||
{
|
||||
return array(
|
||||
array('teampage', 1, array(
|
||||
@ -225,7 +225,7 @@ class phpbb_group_positions_test extends phpbb_database_test_case
|
||||
$this->assertEquals($expected, $db->sql_fetchrowset($result));
|
||||
}
|
||||
|
||||
public static function move_data()
|
||||
public function move_data()
|
||||
{
|
||||
return array(
|
||||
array('teampage', 1, 1, array(
|
||||
|
@ -112,7 +112,7 @@ class phpbb_request_var_test extends phpbb_test_case
|
||||
$this->assertEquals($expected, $result, 'Testing deep access to multidimensional input arrays: ' . $path);
|
||||
}
|
||||
|
||||
public static function deep_access()
|
||||
public function deep_access()
|
||||
{
|
||||
return array(
|
||||
// array(path, default, expected result)
|
||||
@ -123,7 +123,7 @@ class phpbb_request_var_test extends phpbb_test_case
|
||||
);
|
||||
}
|
||||
|
||||
public static function request_variables()
|
||||
public function request_variables()
|
||||
{
|
||||
return array(
|
||||
// strings
|
||||
|
@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||
|
||||
class phpbb_security_extract_current_page_test extends phpbb_security_test_base
|
||||
{
|
||||
public static function security_variables()
|
||||
public function security_variables()
|
||||
{
|
||||
return array(
|
||||
array('http://localhost/phpBB/index.php', 'mark=forums&x="><script>alert(/XSS/);</script>', 'mark=forums&x=%22%3E%3Cscript%3Ealert(/XSS/);%3C/script%3E'),
|
||||
|
@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||
|
||||
class phpbb_security_redirect_test extends phpbb_security_test_base
|
||||
{
|
||||
public static function provider()
|
||||
public function provider()
|
||||
{
|
||||
// array(Input -> redirect(), expected triggered error (else false), expected returned result url (else false))
|
||||
return array(
|
||||
|
@ -14,7 +14,7 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t
|
||||
/**
|
||||
* @todo put test data into templates/xyz.test
|
||||
*/
|
||||
public static function template_data()
|
||||
public function template_data()
|
||||
{
|
||||
return array(
|
||||
// First element of the array is test name - keep them distinct
|
||||
|
@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/template_test_case.php';
|
||||
|
||||
class phpbb_template_template_locate_test extends phpbb_template_template_test_case
|
||||
{
|
||||
public static function template_data()
|
||||
public function template_data()
|
||||
{
|
||||
return array(
|
||||
// First element of the array is test name - keep them distinct
|
||||
|
@ -15,7 +15,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
|
||||
/**
|
||||
* @todo put test data into templates/xyz.test
|
||||
*/
|
||||
public static function template_data()
|
||||
public function template_data()
|
||||
{
|
||||
return array(
|
||||
/*
|
||||
@ -394,7 +394,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
|
||||
$this->run_template('php.html', array(), array(), array(), 'test', $cache_file);
|
||||
}
|
||||
|
||||
public static function alter_block_array_data()
|
||||
public function alter_block_array_data()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
|
@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
|
||||
|
||||
class phpbb_text_processing_make_clickable_test extends phpbb_test_case
|
||||
{
|
||||
public static function make_clickable_data()
|
||||
public function make_clickable_data()
|
||||
{
|
||||
// value => whether it should work
|
||||
$prefix_texts = array(
|
||||
|
@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
|
||||
|
||||
class phpbb_utf_utf8_clean_string_test extends phpbb_test_case
|
||||
{
|
||||
public static function cleanable_strings()
|
||||
public function cleanable_strings()
|
||||
{
|
||||
return array(
|
||||
array('MiXed CaSe', 'mixed case', 'Checking case folding'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user