mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/11460] Add test for whether post_email and topic_email are checked.
PHPBB3-11460
This commit is contained in:
parent
15aec0bbb2
commit
69df6b49db
1 changed files with 46 additions and 0 deletions
46
tests/functional/notification_test.php
Normal file
46
tests/functional/notification_test.php
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package testing
|
||||||
|
* @copyright (c) 2013 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group functional
|
||||||
|
*/
|
||||||
|
class phpbb_functional_notification_test extends phpbb_functional_test_case
|
||||||
|
{
|
||||||
|
static public function user_subscription_data()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
array('post_notification', true),
|
||||||
|
array('topic_notification', true),
|
||||||
|
|
||||||
|
// PHPBB3-11460
|
||||||
|
array('post_email', true),
|
||||||
|
array('topic_email', true),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider user_subscription_data
|
||||||
|
*/
|
||||||
|
public function test_user_subscriptions($checkbox_name, $expected_status)
|
||||||
|
{
|
||||||
|
$this->login();
|
||||||
|
$crawler = $this->request('GET', 'ucp.php?i=ucp_notifications&mode=notification_options');
|
||||||
|
$this->assert_response_success();
|
||||||
|
|
||||||
|
$cplist = $crawler->filter('.cplist');
|
||||||
|
if ($expected_status)
|
||||||
|
{
|
||||||
|
$this->assert_checkbox_is_checked($cplist, $checkbox_name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->assert_checkbox_is_unchecked($cplist, $checkbox_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue