1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-25 09:30:46 +02:00

[ticket/17535] Convert config files, make data providers static

PHPBB-17535
This commit is contained in:
rxu
2025-07-16 17:36:45 +07:00
parent d7db296eab
commit 8a99024087
199 changed files with 879 additions and 852 deletions

View File

@@ -15,7 +15,7 @@ use phpbb\template\asset;
class phpbb_template_asset_test extends phpbb_test_case
{
public function set_path_data()
public static function set_path_data()
{
return array(
// array(phpbb_root_path, given path, expected path),

View File

@@ -43,7 +43,7 @@ class context_test extends phpbb_test_case
}
}
public function retrieve_block_vars_data()
public static function retrieve_block_vars_data()
{
return array(
array('foo', array(), array()), // non-existent top-level block

View File

@@ -142,7 +142,7 @@ class phpbb_template_extension_test extends phpbb_template_template_test_case
]);
}
public function data_template_extensions()
public static function data_template_extensions()
{
return [
[
@@ -333,7 +333,7 @@ class phpbb_template_extension_test extends phpbb_template_template_test_case
$this->run_template($file, $vars, $block_vars, $destroy_array, $expected, $lang_vars);
}
public function data_template_icon_extension()
public static function data_template_icon_extension()
{
return [
/** Font: default */

View File

@@ -15,7 +15,7 @@ require_once __DIR__ . '/template_test_case.php';
class phpbb_template_template_events_test extends phpbb_template_template_test_case
{
public function template_data()
public static function template_data()
{
return array(
/*

View File

@@ -85,7 +85,7 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
$this->template->set_custom_style('tests', array($this->template_path, $this->parent_template_path));
}
public function template_data()
public static function template_data()
{
return array(
/*

View File

@@ -15,10 +15,8 @@ require_once __DIR__ . '/template_test_case_with_tree.php';
class phpbb_template_template_includejs_test extends phpbb_template_template_test_case_with_tree
{
public function template_data()
public static function template_data()
{
$this->setup_engine();
return array(
/*
array(

View File

@@ -18,7 +18,7 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t
/**
* @todo put test data into templates/xyz.test
*/
public function template_data()
public static function template_data()
{
return array(
// First element of the array is test name - keep them distinct

View File

@@ -18,7 +18,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
/**
* @todo put test data into templates/xyz.test
*/
public function template_data()
public static function template_data()
{
return array(
/*
@@ -637,7 +637,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
$this->assertEquals(array('POSITION' => 'O3M2', 'ONE' => true, 'TWO' => 'two', 'THREE' => 3), $this->template->retrieve_block_vars('outer[2].middle[1]', array()), 'Retrieve all vars from a block in the template');
}
public function alter_block_array_data()
public static function alter_block_array_data()
{
return array(
array(
@@ -1030,7 +1030,7 @@ EOT
$this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Inserting another inner block in the same place');
}
public function assign_block_vars_array_data()
public static function assign_block_vars_array_data()
{
return array(
array(

View File

@@ -100,7 +100,7 @@ class twig_test extends \phpbb_test_case
$run_set_user_closure($this->user);
}
public function data_get_user_style(): array
public static function data_get_user_style(): array
{
return [
[['style_path' => 'prosilver', 'style_parent_id' => 0], ['prosilver']],