aboutsummaryrefslogtreecommitdiffstats
path: root/tests/notification
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-07-26 14:51:46 -0500
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-07-26 14:51:46 -0500
commit4f0dd9a752c79004acdfbedce92234c6818b9765 (patch)
treecc3e3006f67d7c5ba63ef2e03691eb0752b632cb /tests/notification
parent185d4e112e2f1d01364aad36eb540294fa7c953b (diff)
downloadforums-4f0dd9a752c79004acdfbedce92234c6818b9765.tar
forums-4f0dd9a752c79004acdfbedce92234c6818b9765.tar.gz
forums-4f0dd9a752c79004acdfbedce92234c6818b9765.tar.bz2
forums-4f0dd9a752c79004acdfbedce92234c6818b9765.tar.xz
forums-4f0dd9a752c79004acdfbedce92234c6818b9765.zip
[ticket/11744] Tables are not truncated in some dbms during tests
PHPBB3-11744
Diffstat (limited to 'tests/notification')
-rw-r--r--tests/notification/group_request_test.php3
-rw-r--r--tests/notification/notification_test.php16
2 files changed, 8 insertions, 11 deletions
diff --git a/tests/notification/group_request_test.php b/tests/notification/group_request_test.php
index dffdc771b1..d36864cc27 100644
--- a/tests/notification/group_request_test.php
+++ b/tests/notification/group_request_test.php
@@ -50,8 +50,6 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas
// Now on to the actual test
- $this->assertEquals(1, $this->notifications->get_notification_type_id('group_request'));
-
$group_id = false;
group_create($group_id, GROUP_OPEN, 'test', 'test group', array());
@@ -68,7 +66,6 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas
$expected = array(
1 => array(
- 'notification_type_id' => 1,
'item_id' => 3, // user_id of requesting join
'item_parent_id' => $group_id,
'user_id' => 2,
diff --git a/tests/notification/notification_test.php b/tests/notification/notification_test.php
index 39073c2602..94453fe201 100644
--- a/tests/notification/notification_test.php
+++ b/tests/notification/notification_test.php
@@ -21,14 +21,14 @@ class phpbb_notification_test extends phpbb_tests_notification_base
public function test_get_notification_type_id()
{
// They should be inserted the first time
- $this->assertEquals(1, $this->notifications->get_notification_type_id('post'));
- $this->assertEquals(2, $this->notifications->get_notification_type_id('quote'));
- $this->assertEquals(3, $this->notifications->get_notification_type_id('test'));
+ $post_type_id = $this->notifications->get_notification_type_id('post');
+ $quote_type_id = $this->notifications->get_notification_type_id('quote');
+ $test_type_id = $this->notifications->get_notification_type_id('test');
$this->assertEquals(array(
- 'test' => 3,
- 'quote' => 2,
- 'post' => 1,
+ 'test' => $test_type_id,
+ 'quote' => $quote_type_id,
+ 'post' => $post_type_id,
),
$this->notifications->get_notification_type_ids(array(
'test',
@@ -36,11 +36,11 @@ class phpbb_notification_test extends phpbb_tests_notification_base
'post',
)
));
- $this->assertEquals(2, $this->notifications->get_notification_type_id('quote'));
+ $this->assertEquals($quote_type_id, $this->notifications->get_notification_type_id('quote'));
try
{
- $this->assertEquals(3, $this->notifications->get_notification_type_id('fail'));
+ $this->assertEquals(false, $this->notifications->get_notification_type_id('fail'));
$this->fail('Non-existent type should throw an exception');
}