aboutsummaryrefslogtreecommitdiffstats
path: root/tests/notification
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2012-12-26 11:05:12 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2012-12-26 11:05:12 -0600
commit148463d586fa2dd7675b3e387464e02f76a0ccf4 (patch)
tree2256980f54f77fac0a51a0742ca3dfbc37f3870f /tests/notification
parent30356efab9503f44c26c6eebe6421911cd70ec64 (diff)
downloadforums-148463d586fa2dd7675b3e387464e02f76a0ccf4.tar
forums-148463d586fa2dd7675b3e387464e02f76a0ccf4.tar.gz
forums-148463d586fa2dd7675b3e387464e02f76a0ccf4.tar.bz2
forums-148463d586fa2dd7675b3e387464e02f76a0ccf4.tar.xz
forums-148463d586fa2dd7675b3e387464e02f76a0ccf4.zip
[ticket/11103] Remove global $db usage in test
PHPBB3-11103
Diffstat (limited to 'tests/notification')
-rw-r--r--tests/notification/notification.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/notification/notification.php b/tests/notification/notification.php
index e7fd8539ab..cd2080bb4d 100644
--- a/tests/notification/notification.php
+++ b/tests/notification/notification.php
@@ -20,7 +20,7 @@ class phpbb_notification_test extends phpbb_database_test_case
{
parent::setUp();
- global $phpbb_root_path, $db, $phpEx;
+ global $phpbb_root_path, $phpEx;
if (!function_exists('set_var'))
{
@@ -29,7 +29,7 @@ class phpbb_notification_test extends phpbb_database_test_case
include_once(__DIR__ . '/ext/test/notification/type/test.' . $phpEx);
- $db = $this->db = $this->new_dbal();
+ $this->db = $this->new_dbal();
$this->config = new phpbb_config(array(
'allow_privmsg' => true,
'allow_bookmarks' => true,
@@ -125,10 +125,8 @@ class phpbb_notification_test extends phpbb_database_test_case
public function test_notifications()
{
- global $db;
-
// Used to test post notifications later
- $db->sql_query('INSERT INTO ' . TOPICS_WATCH_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ $this->db->sql_query('INSERT INTO ' . TOPICS_WATCH_TABLE . ' ' . $this->db->sql_build_array('INSERT', array(
'topic_id' => 2,
'notify_status' => NOTIFY_YES,
'user_id' => 0,
@@ -171,7 +169,7 @@ class phpbb_notification_test extends phpbb_database_test_case
'forum_name' => 'Your first forum',
));
- $db->sql_query('INSERT INTO ' . BOOKMARKS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ $this->db->sql_query('INSERT INTO ' . BOOKMARKS_TABLE . ' ' . $this->db->sql_build_array('INSERT', array(
'topic_id' => 2,
'user_id' => 0,
)));