From 4cd0914f8976913de0ec46cc78c8ac5731415838 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Mon, 29 Apr 2013 22:16:46 -0500 Subject: [ticket/11413] Fix notification tests Send types/methods the cache service, not the driver (not sure why the driver was sent before) PHPBB3-11413 --- tests/mock/notifications_notification_manager.php | 69 ----------------------- 1 file changed, 69 deletions(-) delete mode 100644 tests/mock/notifications_notification_manager.php (limited to 'tests/mock') 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 @@ -$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; - } -} -- cgit v1.2.1 From 900467681077b7c4cd48529b53f083c8ea0334f6 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Tue, 30 Apr 2013 21:53:16 -0500 Subject: [ticket/11413] Include mock class PHPBB3-11413 --- tests/mock/sql_insert_buffer.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/mock/sql_insert_buffer.php (limited to 'tests/mock') diff --git a/tests/mock/sql_insert_buffer.php b/tests/mock/sql_insert_buffer.php new file mode 100644 index 0000000000..ba09aa8d7f --- /dev/null +++ b/tests/mock/sql_insert_buffer.php @@ -0,0 +1,21 @@ +buffer)) ? true : false; + } + + public function get_buffer() + { + return $this->buffer; + } +} -- cgit v1.2.1 From 77147b53c119706f5fb6ea6036056aed554adf8c Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Fri, 3 May 2013 08:38:00 -0500 Subject: [ticket/11413] Remove mock sql_insert_buffer.php (not relevant to PR) PHPBB3-11413 --- tests/mock/sql_insert_buffer.php | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 tests/mock/sql_insert_buffer.php (limited to 'tests/mock') diff --git a/tests/mock/sql_insert_buffer.php b/tests/mock/sql_insert_buffer.php deleted file mode 100644 index ba09aa8d7f..0000000000 --- a/tests/mock/sql_insert_buffer.php +++ /dev/null @@ -1,21 +0,0 @@ -buffer)) ? true : false; - } - - public function get_buffer() - { - return $this->buffer; - } -} -- cgit v1.2.1