diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-05 00:07:48 -0500 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-05 00:07:48 -0500 |
commit | 3f2e3ad633930744e1ed92cc529ca473ccfa09e0 (patch) | |
tree | dd66211547856d3e484aa52fefbb2f6352ee9205 /tests/notification/ext | |
parent | ceb56da965f12245bca6b735cb71f3bbaf505307 (diff) | |
download | forums-3f2e3ad633930744e1ed92cc529ca473ccfa09e0.tar forums-3f2e3ad633930744e1ed92cc529ca473ccfa09e0.tar.gz forums-3f2e3ad633930744e1ed92cc529ca473ccfa09e0.tar.bz2 forums-3f2e3ad633930744e1ed92cc529ca473ccfa09e0.tar.xz forums-3f2e3ad633930744e1ed92cc529ca473ccfa09e0.zip |
[ticket/11103] Working on test case
Fixing extension type/method naming scheme so they can be autoloaded.
Other bugs
PHPBB3-11103
Diffstat (limited to 'tests/notification/ext')
-rw-r--r-- | tests/notification/ext/test/notification/type/test.php | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/tests/notification/ext/test/notification/type/test.php b/tests/notification/ext/test/notification/type/test.php new file mode 100644 index 0000000000..812d9a7698 --- /dev/null +++ b/tests/notification/ext/test/notification/type/test.php @@ -0,0 +1,72 @@ +<?php +/** +* +* @package notifications +* @copyright (c) 2012 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +class phpbb_ext_test_notification_type_test extends phpbb_notification_type_base +{ + public $email_template = 'topic_notify'; + + public static function get_item_type() + { + return 'ext_test-test'; + } + + public static function get_item_id($post) + { + return (int) $post['post_id']; + } + + public static function get_item_parent_id($post) + { + return (int) $post['topic_id']; + } + + public function find_users_for_notification($post, $options = array()) + { + return array( + 0 => array(''), + //2 => array('', 'email'), + //3 => array('', 'email', 'jabber'), + ); + } + + public function create_insert_array($post) + { + $this->time = $post['post_time']; + + return parent::create_insert_array($post); + } + + public function get_title() + { + return 'test title'; + } + + public function users_to_query() + { + return array(); + } + + public function get_url() + { + return ''; + } + + public function get_email_template_variables() + { + return array(); + } +} |