diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-07-20 14:36:38 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-07-20 14:36:38 +0200 |
commit | e48f0555e9e40a9e1d3e9a60e25a9f206c565efe (patch) | |
tree | 94955be4f08954a8a9f23a9fcc70fd1bdcb78dd3 | |
parent | 96989e536dd5fc603f3598fa7a2a50414331d76c (diff) | |
download | forums-e48f0555e9e40a9e1d3e9a60e25a9f206c565efe.tar forums-e48f0555e9e40a9e1d3e9a60e25a9f206c565efe.tar.gz forums-e48f0555e9e40a9e1d3e9a60e25a9f206c565efe.tar.bz2 forums-e48f0555e9e40a9e1d3e9a60e25a9f206c565efe.tar.xz forums-e48f0555e9e40a9e1d3e9a60e25a9f206c565efe.zip |
[ticket/11531] Reduced amount of avatar functional tests to minimum
The tests were reduced to only test one case that should be correct and one
that should fail. Different test cases have been split up over the specific
test files for the acp groups, acp users, ucp groups, and ucp users page.
PHPBB3-11531
-rw-r--r-- | tests/functional/avatar_acp_groups_test.php | 89 | ||||
-rw-r--r-- | tests/functional/avatar_acp_users_test.php | 91 | ||||
-rw-r--r-- | tests/functional/avatar_ucp_groups_test.php | 80 | ||||
-rw-r--r-- | tests/functional/avatar_ucp_users_test.php | 89 |
4 files changed, 0 insertions, 349 deletions
diff --git a/tests/functional/avatar_acp_groups_test.php b/tests/functional/avatar_acp_groups_test.php index 62b7409bdb..9fdc29cc76 100644 --- a/tests/functional/avatar_acp_groups_test.php +++ b/tests/functional/avatar_acp_groups_test.php @@ -42,95 +42,6 @@ class phpbb_functional_avatar_acp_groups_test extends phpbb_functional_common_av 'avatar_gravatar_height' => 120, ), ), - // Incorrect email supplied for gravatar - array( - 'EMAIL_INVALID_EMAIL', - 'avatar_driver_gravatar', - array( - 'avatar_gravatar_email' => 'test.example.com', - 'avatar_gravatar_width' => 80, - 'avatar_gravatar_height' => 80, - ), - ), - // Upload image from remote - array( - 'GROUP_UPDATED', - 'avatar_driver_upload', - array( - 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - ), - ), - // Incorrect URL - array( - 'AVATAR_URL_INVALID', - 'avatar_driver_upload', - array( - 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?s=80', - ), - ), - /* - // Does not work due to DomCrawler issue - // Valid file upload - array( - 'GROUP_UPDATED', - 'avatar_driver_upload', - array( - 'avatar_upload_file' => array('upload', $this->path . 'valid.jpg'), - ), - ), - */ - // Correct remote avatar - array( - 'GROUP_UPDATED', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // Remote avatar with incorrect size - array( - 'The submitted avatar is 120 wide and 120 high. Avatars must be at least 20 wide and 20 high, but no larger than 90 wide and 90 high.', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 120, - 'avatar_remote_height' => 120, - ), - ), - // Wrong driver selected - array( - 'NO_AVATAR_SELECTED', - 'avatar_driver_upload', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // File does not exist, remote avatar currently does - // not check if file exists if size is specified - array( - 'GROUP_UPDATED', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://www.phpbb.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // File does not exist and remote avatar errors when - // trying to get the image size - array( - 'UNABLE_GET_IMAGE_SIZE', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://www.phpbb.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => '', - 'avatar_remote_height' => '', - ), - ), // Delete avatar image to reset group settings array( 'GROUP_UPDATED', diff --git a/tests/functional/avatar_acp_users_test.php b/tests/functional/avatar_acp_users_test.php index 38ebcc8940..0afd05e530 100644 --- a/tests/functional/avatar_acp_users_test.php +++ b/tests/functional/avatar_acp_users_test.php @@ -22,26 +22,6 @@ class phpbb_functional_avatar_acp_users_test extends phpbb_functional_common_ava public function avatar_acp_users_data() { return array( - // Correct gravatar - array( - 'USER_AVATAR_UPDATED', - 'avatar_driver_gravatar', - array( - 'avatar_gravatar_email' => 'test@example.com', - 'avatar_gravatar_width' => 80, - 'avatar_gravatar_height' => 80, - ), - ), - // Gravatar with incorrect sizes - array( - 'The submitted avatar is 120 wide and 120 high. Avatars must be at least 20 wide and 20 high, but no larger than 90 wide and 90 high.', - 'avatar_driver_gravatar', - array( - 'avatar_gravatar_email' => 'test@example.com', - 'avatar_gravatar_width' => 120, - 'avatar_gravatar_height' => 120, - ), - ), // Gravatar with incorrect email array( 'EMAIL_INVALID_EMAIL', @@ -60,77 +40,6 @@ class phpbb_functional_avatar_acp_users_test extends phpbb_functional_common_ava 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', ), ), - // Incorrect URL - array( - 'AVATAR_URL_INVALID', - 'avatar_driver_upload', - array( - 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?s=80', - ), - ), - /* - // Does not work due to DomCrawler issue - // Valid file upload - array( - 'PROFILE_UPDATED', - 'avatar_driver_upload', - array( - 'avatar_upload_file' => array('upload', $this->path . 'valid.jpg'), - ), - ), - */ - // Correct remote avatar - array( - 'USER_AVATAR_UPDATED', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // Remote avatar with incorrect size - array( - 'The submitted avatar is 120 wide and 120 high. Avatars must be at least 20 wide and 20 high, but no larger than 90 wide and 90 high.', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 120, - 'avatar_remote_height' => 120, - ), - ), - // Wrong driver selected - array( - 'NO_AVATAR_SELECTED', - 'avatar_driver_upload', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // File does not exist, remote avatar currently does - // not check if file exists if size is specified - array( - 'USER_AVATAR_UPDATED', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://www.phpbb.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // File does not exist and remote avatar errors when - // trying to get the image size - array( - 'UNABLE_GET_IMAGE_SIZE', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://www.phpbb.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => '', - 'avatar_remote_height' => '', - ), - ), // Reset avatar settings array( 'USER_AVATAR_UPDATED', diff --git a/tests/functional/avatar_ucp_groups_test.php b/tests/functional/avatar_ucp_groups_test.php index bd34f67491..233b7d36e1 100644 --- a/tests/functional/avatar_ucp_groups_test.php +++ b/tests/functional/avatar_ucp_groups_test.php @@ -22,44 +22,6 @@ class phpbb_functional_avatar_ucp_groups_test extends phpbb_functional_common_av public function avatar_ucp_groups_data() { return array( - // Gravatar with correct settings - array( - 'GROUP_UPDATED', - 'avatar_driver_gravatar', - array( - 'avatar_gravatar_email' => 'test@example.com', - 'avatar_gravatar_width' => 80, - 'avatar_gravatar_height' => 80, - ), - ), - // Gravatar with incorrect sizing - array( - 'The submitted avatar is 120 wide and 120 high. Avatars must be at least 20 wide and 20 high, but no larger than 90 wide and 90 high.', - 'avatar_driver_gravatar', - array( - 'avatar_gravatar_email' => 'test@example.com', - 'avatar_gravatar_width' => 120, - 'avatar_gravatar_height' => 120, - ), - ), - // Gravatar with incorrect email address - array( - 'EMAIL_INVALID_EMAIL', - 'avatar_driver_gravatar', - array( - 'avatar_gravatar_email' => 'test.example.com', - 'avatar_gravatar_width' => 80, - 'avatar_gravatar_height' => 80, - ), - ), - // Correct remote upload avatar - array( - 'GROUP_UPDATED', - 'avatar_driver_upload', - array( - 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - ), - ), // Incorrect URL array( 'AVATAR_URL_INVALID', @@ -89,48 +51,6 @@ class phpbb_functional_avatar_ucp_groups_test extends phpbb_functional_common_av 'avatar_remote_height' => 80, ), ), - // Remote avatar with incorrect size - array( - 'The submitted avatar is 120 wide and 120 high. Avatars must be at least 20 wide and 20 high, but no larger than 90 wide and 90 high.', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 120, - 'avatar_remote_height' => 120, - ), - ), - // Wrong driver selected - array( - 'NO_AVATAR_SELECTED', - 'avatar_driver_upload', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // File does not exist, remote avatar currently does - // not check if file exists if size is specified - array( - 'GROUP_UPDATED', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://www.phpbb.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // File does not exist and remote avatar errors when - // trying to get the image size - array( - 'UNABLE_GET_IMAGE_SIZE', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://www.phpbb.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => '', - 'avatar_remote_height' => '', - ), - ), array( 'GROUP_UPDATED', 'avatar_driver_gravatar', diff --git a/tests/functional/avatar_ucp_users_test.php b/tests/functional/avatar_ucp_users_test.php index 6b2c2344b3..fa6282abf4 100644 --- a/tests/functional/avatar_ucp_users_test.php +++ b/tests/functional/avatar_ucp_users_test.php @@ -32,73 +32,6 @@ class phpbb_functional_avatar_ucp_users_test extends phpbb_functional_common_ava 'avatar_gravatar_height' => 80, ), ), - // Gravatar with incorrect sizing - array( - 'The submitted avatar is 120 wide and 120 high. Avatars must be at least 20 wide and 20 high, but no larger than 90 wide and 90 high.', - 'avatar_driver_gravatar', - array( - 'avatar_gravatar_email' => 'test@example.com', - 'avatar_gravatar_width' => 120, - 'avatar_gravatar_height' => 120, - ), - ), - // Gravatar with incorrect email address - array( - 'EMAIL_INVALID_EMAIL', - 'avatar_driver_gravatar', - array( - 'avatar_gravatar_email' => 'test.example.com', - 'avatar_gravatar_width' => 80, - 'avatar_gravatar_height' => 80, - ), - ), - // Correct remote upload avatar - array( - 'PROFILE_UPDATED', - 'avatar_driver_upload', - array( - 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - ), - ), - // Incorrect URL - array( - 'AVATAR_URL_INVALID', - 'avatar_driver_upload', - array( - 'avatar_upload_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?s=80', - ), - ), - /* - // Does not work due to DomCrawler issue - // Valid file upload - array( - 'PROFILE_UPDATED', - 'avatar_driver_upload', - array( - 'avatar_upload_file' => array('upload', $this->path . 'valid.jpg'), - ), - ), - */ - // Correct remote avatar - array( - 'PROFILE_UPDATED', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // Remote avatar with incorrect size - array( - 'The submitted avatar is 120 wide and 120 high. Avatars must be at least 20 wide and 20 high, but no larger than 90 wide and 90 high.', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 120, - 'avatar_remote_height' => 120, - ), - ), // Wrong driver selected array( 'NO_AVATAR_SELECTED', @@ -109,28 +42,6 @@ class phpbb_functional_avatar_ucp_users_test extends phpbb_functional_common_ava 'avatar_remote_height' => 80, ), ), - // File does not exist, remote avatar currently does - // not check if file exists if size is specified - array( - 'PROFILE_UPDATED', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://www.phpbb.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => 80, - 'avatar_remote_height' => 80, - ), - ), - // File does not exist and remote avatar errors when - // trying to get the image size - array( - 'UNABLE_GET_IMAGE_SIZE', - 'avatar_driver_remote', - array( - 'avatar_remote_url' => 'https://www.phpbb.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', - 'avatar_remote_width' => '', - 'avatar_remote_height' => '', - ), - ), array( 'PROFILE_UPDATED', 'avatar_driver_gravatar', |