diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-10-15 18:31:46 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-10-15 18:31:46 +0200 |
commit | 90771c1762b1302eff9df4f9335db3f382991fea (patch) | |
tree | c4b854386ea4ec5e6c9992ed6b83351570d75a2b /tests/event | |
parent | 759950c1a62923422af16f0d90414f5a5047d455 (diff) | |
parent | a9ed32663ac0eeb4254a54f4fbc7db6971007d03 (diff) | |
download | forums-90771c1762b1302eff9df4f9335db3f382991fea.tar forums-90771c1762b1302eff9df4f9335db3f382991fea.tar.gz forums-90771c1762b1302eff9df4f9335db3f382991fea.tar.bz2 forums-90771c1762b1302eff9df4f9335db3f382991fea.tar.xz forums-90771c1762b1302eff9df4f9335db3f382991fea.zip |
Merge pull request #3024 from marc1706/ticket/13124
[ticket/13124] Also trim spaces in front of comments except for first line
Diffstat (limited to 'tests/event')
-rw-r--r-- | tests/event/fixtures/trigger_wspace.test | 15 | ||||
-rw-r--r-- | tests/event/php_exporter_test.php | 16 |
2 files changed, 29 insertions, 2 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 b52d68e305..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( @@ -119,6 +131,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case array('* @since 3.1.0-b3', '3.1.0-b3'), array(' * @since 3.1.0-b3', '3.1.0-b3'), array('* @since 3.1.0-RC2', '3.1.0-RC2'), + array(' * @since 3.1.0-a1', '3.1.0-a1'), ); } @@ -133,7 +146,6 @@ class phpbb_event_php_exporter_test extends phpbb_test_case static public function validate_since_throws_data() { return array( - array(' * @since 3.1.0-a1'), array('* @since 3.1.0-a1 '), array('* @since 3.1.0-a1 bertie is cool'), array('bertie* @since 3.1.0-a1'), @@ -156,6 +168,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case return array( array('test.event', '* @event test.event', 'test.event'), array('test.event2', ' * @event test.event2', 'test.event2'), + array('test.event', ' * @event test.event', 'test.event'), ); } @@ -170,7 +183,6 @@ class phpbb_event_php_exporter_test extends phpbb_test_case static public function validate_event_throws_data() { return array( - array('test.event', ' * @event test.event', 1), array('test.event', '* @event test.event bertie is cool', 2), array('test.event', 'bertie* @event test.event', 2), ); |