diff options
author | David King <imkingdavid@gmail.com> | 2013-05-20 11:54:39 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2013-05-20 11:54:39 -0400 |
commit | fedd9d18d2ab2c06fd584f599e685014783b9655 (patch) | |
tree | 352ca31c2a003d91a0101176c8ab92ca1021dcb0 /tests/mock | |
parent | 9fab868f0f0a420b4eb7efb42e9c4cf27e66e9b3 (diff) | |
parent | 05cd045923068b08962856ec5e0c36f72f8f831c (diff) | |
download | forums-fedd9d18d2ab2c06fd584f599e685014783b9655.tar forums-fedd9d18d2ab2c06fd584f599e685014783b9655.tar.gz forums-fedd9d18d2ab2c06fd584f599e685014783b9655.tar.bz2 forums-fedd9d18d2ab2c06fd584f599e685014783b9655.tar.xz forums-fedd9d18d2ab2c06fd584f599e685014783b9655.zip |
Merge remote-tracking branch 'EXreaction/ticket/11413' into develop
* EXreaction/ticket/11413: (23 commits)
[ticket/11413] Revert some cache service related changes from earlier
[ticket/11413] Use phpbb_user in test
[ticket/11413] $user should have been $this->user
[ticket/11413] Fix unit tests
[ticket/11413] Translate the error
[ticket/11413] Rename file to something more helpful
[ticket/11413] Remove remaining irrelevant code to this PR
[ticket/11413] Remove mock sql_insert_buffer.php (not relevant to PR)
[ticket/11413] Remove conversion of user_notifications
[ticket/11413] Correct copyright year
[ticket/11413] Remove changes for ticket 11420 from this branch
[ticket/11413] Include mock class
[ticket/11413] Don't use the database for the convert test
[ticket/11413] Test get_notification_type_id and _ids functions
[ticket/11413] Use sql_insert_buffer
[ticket/11413] Create test for notification conversion
[ticket/11413] Fix test fixtures and tests
[ticket/11413] Fix some more tests
[ticket/11413] Fix notification tests
[ticket/11413] Prevent recursive function calls
...
Diffstat (limited to 'tests/mock')
-rw-r--r-- | tests/mock/notifications_notification_manager.php | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/tests/mock/notifications_notification_manager.php b/tests/mock/notifications_notification_manager.php deleted file mode 100644 index c995afb9ab..0000000000 --- a/tests/mock/notifications_notification_manager.php +++ /dev/null @@ -1,69 +0,0 @@ -<?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; -} - -/** -* Notifications service class -* @package notifications -*/ -class phpbb_mock_notifications_notification_manager extends phpbb_notification_manager -{ - public function set_var($name, $value) - { - $this->$name = $value; - } - - // Extra dependencies for get_*_class functions - protected $auth = null; - protected $cache = null; - protected $config = null; - public function setDependencies($auth, $cache, $config) - { - $this->auth = $auth; - $this->cache = $cache; - $this->config = $config; - } - - /** - * Helper to get the notifications item type class and set it up - */ - public function get_item_type_class($item_type, $data = array()) - { - $item_type = 'phpbb_notification_type_' . $item_type; - - $item = new $item_type($this->user_loader, $this->db, $this->cache, $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table); - - $item->set_notification_manager($this); - - $item->set_initial_data($data); - - return $item; - } - - /** - * Helper to get the notifications method class and set it up - */ - public function get_method_class($method_name) - { - $method_name = 'phpbb_notification_method_' . $method_name; - - $method = new $method_name($this->user_loader, $this->db, $this->cache, $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table); - - $method->set_notification_manager($this); - - return $method; - } -} |