diff options
Diffstat (limited to 'tests/mock')
-rw-r--r-- | tests/mock/cache.php | 2 | ||||
-rw-r--r-- | tests/mock/notification_type_post.php | 36 | ||||
-rw-r--r-- | tests/mock/user.php | 5 |
3 files changed, 42 insertions, 1 deletions
diff --git a/tests/mock/cache.php b/tests/mock/cache.php index 83bbb8ef30..9e5914b934 100644 --- a/tests/mock/cache.php +++ b/tests/mock/cache.php @@ -140,7 +140,7 @@ class phpbb_mock_cache implements \phpbb\cache\driver\driver_interface /** * {@inheritDoc} */ - public function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl) + public function sql_save(\phpbb\db\driver\driver_interface $db, $query, $query_result, $ttl) { return $query_result; } diff --git a/tests/mock/notification_type_post.php b/tests/mock/notification_type_post.php new file mode 100644 index 0000000000..80f2afbae0 --- /dev/null +++ b/tests/mock/notification_type_post.php @@ -0,0 +1,36 @@ +<?php +/** +* +* @package notifications +* @copyright (c) 2014 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +class phpbb_mock_notification_type_post extends \phpbb\notification\type\post +{ + public function __construct($user_loader, $db, $cache, $user, $auth, $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table) + { + $this->user_loader = $user_loader; + $this->db = $db; + $this->cache = $cache; + $this->user = $user; + $this->auth = $auth; + $this->config = $config; + + $this->phpbb_root_path = $phpbb_root_path; + $this->php_ext = $php_ext; + + $this->notification_types_table = $notification_types_table; + $this->notifications_table = $notifications_table; + $this->user_notifications_table = $user_notifications_table; + } +} diff --git a/tests/mock/user.php b/tests/mock/user.php index bd547b3973..e57e86ae2f 100644 --- a/tests/mock/user.php +++ b/tests/mock/user.php @@ -46,4 +46,9 @@ class phpbb_mock_user } return false; } + + public function lang() + { + return implode(' ', func_get_args()); + } } |