mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/11445] Improve unit tests for get_global_subscriptions
PHPBB3-11445
This commit is contained in:
parent
572debd0e8
commit
c7687ba5aa
1 changed files with 21 additions and 0 deletions
|
@ -71,6 +71,27 @@ class phpbb_notification_test extends phpbb_tests_notification_base
|
|||
|
||||
public function test_subscriptions()
|
||||
{
|
||||
$expected_subscriptions = array(
|
||||
'post' => array(''),
|
||||
'topic' => array(''),
|
||||
'quote' => array(''),
|
||||
'bookmark' => array(''),
|
||||
'test' => array(''),
|
||||
'pm' => array(''),
|
||||
);
|
||||
|
||||
$subscriptions = $this->notifications->get_global_subscriptions(2);
|
||||
|
||||
foreach ($expected_subscriptions as $item_type => $methods)
|
||||
{
|
||||
$this->assert_array_content_equals($methods, $subscriptions[$item_type]);
|
||||
}
|
||||
|
||||
foreach ($subscriptions as $item_type => $methods)
|
||||
{
|
||||
$this->assert_array_content_equals($methods, $expected_subscriptions[$item_type]);
|
||||
}
|
||||
|
||||
$this->notifications->delete_subscription('post', 0, '', 2);
|
||||
|
||||
$this->assertArrayNotHasKey('post', $this->notifications->get_global_subscriptions(2));
|
||||
|
|
Loading…
Add table
Reference in a new issue