mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
[ticket/12273] Fix unit tests for multi line arrays
PHPBB3-12273
This commit is contained in:
parent
142fe1a0e5
commit
01e2d7c26c
2 changed files with 78 additions and 28 deletions
|
@ -39,7 +39,27 @@
|
||||||
* post_id, topic_id, forum_id, submit, preview, save, load,
|
* post_id, topic_id, forum_id, submit, preview, save, load,
|
||||||
* delete, cancel, refresh, error, page_data, message_parser
|
* delete, cancel, refresh, error, page_data, message_parser
|
||||||
*/
|
*/
|
||||||
$vars = array('post_data', 'moderators', 'mode', 'page_title', 's_topic_icons', 'form_enctype');
|
$vars = array(
|
||||||
$vars = array_merge($vars, array('s_action', 's_hidden_fields', 'post_id', 'topic_id', 'forum_id', 'submit', 'preview'));
|
'post_data',
|
||||||
$vars = array_merge($vars, array('save', 'load', 'delete', 'cancel', 'refresh', 'error', 'page_data', 'message_parser'));
|
'moderators',
|
||||||
|
'mode',
|
||||||
|
'page_title',
|
||||||
|
's_topic_icons',
|
||||||
|
'form_enctype',
|
||||||
|
's_action',
|
||||||
|
's_hidden_fields',
|
||||||
|
'post_id',
|
||||||
|
'topic_id',
|
||||||
|
'forum_id',
|
||||||
|
'submit',
|
||||||
|
'preview',
|
||||||
|
'save',
|
||||||
|
'load',
|
||||||
|
'delete',
|
||||||
|
'cancel',
|
||||||
|
'refresh',
|
||||||
|
'error',
|
||||||
|
'page_data',
|
||||||
|
'message_parser',
|
||||||
|
);
|
||||||
extract($phpbb_dispatcher->trigger_event('core.posting_modify_template_vars', compact($vars)));
|
extract($phpbb_dispatcher->trigger_event('core.posting_modify_template_vars', compact($vars)));
|
||||||
|
|
|
@ -343,47 +343,77 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'/**',
|
'/**',
|
||||||
'*/',
|
'*/',
|
||||||
'$phpbb_dispatcher->dispatch(\'test\');',
|
'$phpbb_dispatcher->trigger_event(\'test\', compact($vars));',
|
||||||
),
|
),
|
||||||
2,
|
2,
|
||||||
3,
|
1,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'/**',
|
'/**',
|
||||||
'*/',
|
'*/',
|
||||||
'$vars = $bertie;',
|
'$vars = $bertie;',
|
||||||
'$phpbb_dispatcher->dispatch(\'test\');',
|
'$phpbb_dispatcher->trigger_event(\'test\', compact($vars));',
|
||||||
),
|
),
|
||||||
3,
|
3,
|
||||||
3,
|
1,
|
||||||
),
|
|
||||||
array(
|
|
||||||
array(
|
|
||||||
'/**',
|
|
||||||
'*/',
|
|
||||||
'$vars = array();',
|
|
||||||
'$phpbb_dispatcher->dispatch(\'test\');',
|
|
||||||
),
|
|
||||||
3,
|
|
||||||
3,
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
array(
|
|
||||||
'/**',
|
|
||||||
'*/',
|
|
||||||
'$vars = array(\'test2\', \'\');',
|
|
||||||
'$phpbb_dispatcher->dispatch(\'test\');',
|
|
||||||
),
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'/**',
|
'/**',
|
||||||
'*/',
|
'*/',
|
||||||
'$vars = array(\'$bertie\');',
|
'$vars = array(\'$bertie\');',
|
||||||
'$phpbb_dispatcher->dispatch(\'test\');',
|
'$phpbb_dispatcher->trigger_event(\'test\', compact($vars));',
|
||||||
|
),
|
||||||
|
3,
|
||||||
|
1,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
array(
|
||||||
|
'/**',
|
||||||
|
'*/',
|
||||||
|
'$vars = array();',
|
||||||
|
'$phpbb_dispatcher->trigger_event(\'test\', compact($vars));',
|
||||||
|
),
|
||||||
|
3,
|
||||||
|
1,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
array(
|
||||||
|
'/**',
|
||||||
|
'*/',
|
||||||
|
'$vars = array(\'t1\', \'t2\', \'t3\', \'t4\', \'t5\', \'t6\', \'t7\');',
|
||||||
|
'$phpbb_dispatcher->trigger_event(\'test\', compact($vars));',
|
||||||
|
),
|
||||||
|
3,
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
array(
|
||||||
|
'/**',
|
||||||
|
'*/',
|
||||||
|
'$vars = array(\'test2\', \'\');',
|
||||||
|
'$phpbb_dispatcher->trigger_event(\'test\', compact($vars));',
|
||||||
|
),
|
||||||
|
3,
|
||||||
|
3,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
array(
|
||||||
|
'/**',
|
||||||
|
'*/',
|
||||||
|
'$vars = array(\'bertie\'\');',
|
||||||
|
'$phpbb_dispatcher->trigger_event(\'test\', compact($vars));',
|
||||||
|
),
|
||||||
|
3,
|
||||||
|
3,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
array(
|
||||||
|
'/**',
|
||||||
|
'*/',
|
||||||
|
'$vars = array(\'bertie\',\'basically_valid\');',
|
||||||
|
'$phpbb_dispatcher->trigger_event(\'test\', compact($vars));',
|
||||||
),
|
),
|
||||||
3,
|
3,
|
||||||
3,
|
3,
|
||||||
|
|
Loading…
Add table
Reference in a new issue