Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 29 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| phpbb_functional_avatar_acp_users_test | |
0.00% |
0 / 29 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| get_url | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| avatar_acp_users_data | |
0.00% |
0 / 27 |
|
0.00% |
0 / 1 |
2 | |||
| test_avatar_acp_users | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * |
| 4 | * This file is part of the phpBB Forum Software package. |
| 5 | * |
| 6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
| 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 8 | * |
| 9 | * For full copyright and license information, please see |
| 10 | * the docs/CREDITS.txt file. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | require_once __DIR__ . '/common_avatar_test_case.php'; |
| 15 | |
| 16 | /** |
| 17 | * @group functional |
| 18 | */ |
| 19 | class phpbb_functional_avatar_acp_users_test extends phpbb_functional_common_avatar_test_case |
| 20 | { |
| 21 | public function get_url() |
| 22 | { |
| 23 | return 'adm/index.php?i=acp_users&u=2&mode=avatar'; |
| 24 | } |
| 25 | |
| 26 | public static function avatar_acp_users_data() |
| 27 | { |
| 28 | return array( |
| 29 | // Gravatar with incorrect email |
| 30 | array( |
| 31 | 'EMAIL_INVALID_EMAIL', |
| 32 | 'avatar_driver_gravatar', |
| 33 | array( |
| 34 | 'avatar_gravatar_email' => 'test.example.com', |
| 35 | 'avatar_gravatar_width' => 80, |
| 36 | 'avatar_gravatar_height' => 80, |
| 37 | ), |
| 38 | ), |
| 39 | // Remote avatar with correct link |
| 40 | array( |
| 41 | 'USER_AVATAR_UPDATED', |
| 42 | 'avatar_driver_gravatar', |
| 43 | array( |
| 44 | 'avatar_gravatar_email' => 'test@example.com', |
| 45 | 'avatar_gravatar_width' => 80, |
| 46 | 'avatar_gravatar_height' => 80, |
| 47 | ), |
| 48 | ), |
| 49 | // Reset avatar settings |
| 50 | array( |
| 51 | array('CONFIRM_AVATAR_DELETE', 'USER_AVATAR_UPDATED'), |
| 52 | 'avatar_driver_gravatar', |
| 53 | array( |
| 54 | 'avatar_delete' => array('tick', ''), |
| 55 | ), |
| 56 | ), |
| 57 | ); |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * @dataProvider avatar_acp_users_data |
| 62 | */ |
| 63 | public function test_avatar_acp_users($expected, $avatar_type, $data) |
| 64 | { |
| 65 | $this->assert_avatar_submit($expected, $avatar_type, $data); |
| 66 | } |
| 67 | } |