mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11744] Tables are not truncated in some dbms during tests
PHPBB3-11744
This commit is contained in:
parent
185d4e112e
commit
4f0dd9a752
2 changed files with 8 additions and 11 deletions
|
@ -50,8 +50,6 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas
|
||||||
|
|
||||||
// Now on to the actual test
|
// Now on to the actual test
|
||||||
|
|
||||||
$this->assertEquals(1, $this->notifications->get_notification_type_id('group_request'));
|
|
||||||
|
|
||||||
$group_id = false;
|
$group_id = false;
|
||||||
group_create($group_id, GROUP_OPEN, 'test', 'test group', array());
|
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(
|
$expected = array(
|
||||||
1 => array(
|
1 => array(
|
||||||
'notification_type_id' => 1,
|
|
||||||
'item_id' => 3, // user_id of requesting join
|
'item_id' => 3, // user_id of requesting join
|
||||||
'item_parent_id' => $group_id,
|
'item_parent_id' => $group_id,
|
||||||
'user_id' => 2,
|
'user_id' => 2,
|
||||||
|
|
|
@ -21,14 +21,14 @@ class phpbb_notification_test extends phpbb_tests_notification_base
|
||||||
public function test_get_notification_type_id()
|
public function test_get_notification_type_id()
|
||||||
{
|
{
|
||||||
// They should be inserted the first time
|
// They should be inserted the first time
|
||||||
$this->assertEquals(1, $this->notifications->get_notification_type_id('post'));
|
$post_type_id = $this->notifications->get_notification_type_id('post');
|
||||||
$this->assertEquals(2, $this->notifications->get_notification_type_id('quote'));
|
$quote_type_id = $this->notifications->get_notification_type_id('quote');
|
||||||
$this->assertEquals(3, $this->notifications->get_notification_type_id('test'));
|
$test_type_id = $this->notifications->get_notification_type_id('test');
|
||||||
|
|
||||||
$this->assertEquals(array(
|
$this->assertEquals(array(
|
||||||
'test' => 3,
|
'test' => $test_type_id,
|
||||||
'quote' => 2,
|
'quote' => $quote_type_id,
|
||||||
'post' => 1,
|
'post' => $post_type_id,
|
||||||
),
|
),
|
||||||
$this->notifications->get_notification_type_ids(array(
|
$this->notifications->get_notification_type_ids(array(
|
||||||
'test',
|
'test',
|
||||||
|
@ -36,11 +36,11 @@ class phpbb_notification_test extends phpbb_tests_notification_base
|
||||||
'post',
|
'post',
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
$this->assertEquals(2, $this->notifications->get_notification_type_id('quote'));
|
$this->assertEquals($quote_type_id, $this->notifications->get_notification_type_id('quote'));
|
||||||
|
|
||||||
try
|
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');
|
$this->fail('Non-existent type should throw an exception');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue