aboutsummaryrefslogtreecommitdiffstats
path: root/tests/event
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-10-09 13:30:10 -0400
committerMarc Alexander <admin@m-a-styles.de>2014-10-09 13:30:10 -0400
commita9ed32663ac0eeb4254a54f4fbc7db6971007d03 (patch)
tree304f773ef592110c57ec1fc6793675bb607d956e /tests/event
parent7bcf6a621f17a0072346d3d6cbe09abbc33bb511 (diff)
downloadforums-a9ed32663ac0eeb4254a54f4fbc7db6971007d03.tar
forums-a9ed32663ac0eeb4254a54f4fbc7db6971007d03.tar.gz
forums-a9ed32663ac0eeb4254a54f4fbc7db6971007d03.tar.bz2
forums-a9ed32663ac0eeb4254a54f4fbc7db6971007d03.tar.xz
forums-a9ed32663ac0eeb4254a54f4fbc7db6971007d03.zip
[ticket/13124] Add another test case as requested
PHPBB3-13124
Diffstat (limited to 'tests/event')
-rw-r--r--tests/event/fixtures/trigger_wspace.test15
-rw-r--r--tests/event/php_exporter_test.php12
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/event/fixtures/trigger_wspace.test b/tests/event/fixtures/trigger_wspace.test
new file mode 100644
index 0000000000..0334a9c80b
--- /dev/null
+++ b/tests/event/fixtures/trigger_wspace.test
@@ -0,0 +1,15 @@
+<?php
+
+ /**
+ * Event after the post data has been assigned to the template
+ *
+ * @event core.trigger
+ * @var int start Start item of this page
+ * @var int current_row_number Number of the post on this page
+ * @var int end Number of posts on this page
+ * @var array row Array with original post and user data
+ * @var array cp_row Custom profile field data of the poster
+ * @since 3.1.0-a3
+ */
+ $vars = array('start', 'current_row_number', 'end', 'row', 'cp_row');
+ extract($phpbb_dispatcher->trigger_event('core.trigger', compact($vars)));
diff --git a/tests/event/php_exporter_test.php b/tests/event/php_exporter_test.php
index 7038725e51..692a57f93c 100644
--- a/tests/event/php_exporter_test.php
+++ b/tests/event/php_exporter_test.php
@@ -62,6 +62,18 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
),
),
array(
+ 'trigger_wspace.test',
+ array(
+ 'core.trigger' => array(
+ 'event' => 'core.trigger',
+ 'file' => 'trigger_wspace.test',
+ 'arguments' => array('cp_row', 'current_row_number', 'end', 'row', 'start'),
+ 'since' => '3.1.0-a3',
+ 'description' => 'Event after the post data has been assigned to the template',
+ ),
+ ),
+ ),
+ array(
'trigger_many_vars.test',
array(
'core.posting_modify_template_vars' => array(