Changeset 48220 for trunk/tests/phpunit/tests/ajax/DeleteComment.php
- Timestamp:
- 06/30/2020 12:41:30 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ajax/DeleteComment.php
r47198 r48220 17 17 18 18 /** 19 * List of comments 19 * List of comments. 20 20 * 21 21 * @var array … … 38 38 39 39 /** 40 * Clear the POST actions in between requests40 * Clears the POST actions in between requests. 41 41 */ 42 42 protected function _clear_post_action() { … … 54 54 55 55 /** 56 * Test as a privilged user (administrator)57 * Expects test to pass58 * 59 * @param mixed $comment Comment object60 * @param string action trash, untrash, etc.61 * @ return void56 * Tests as a privileged user (administrator). 57 * 58 * Expects test to pass. 59 * 60 * @param WP_Comment $comment Comment object. 61 * @param string $action Action: 'trash', 'untrash', etc. 62 62 */ 63 63 public function _test_as_admin( $comment, $action ) { … … 113 113 114 114 /** 115 * Test as a non-privileged user (subscriber)116 * Expects test to fail117 * 118 * @param mixed $comment Comment object119 * @param string action trash, untrash, etc.120 * @ return void115 * Tests as a non-privileged user (subscriber). 116 * 117 * Expects test to fail. 118 * 119 * @param WP_Comment $comment Comment object. 120 * @param string $action Action: 'trash', 'untrash', etc. 121 121 */ 122 122 public function _test_as_subscriber( $comment, $action ) { … … 144 144 145 145 /** 146 * Test with a bad nonce147 * Expects test to fail148 * 149 * @param mixed $comment Comment object150 * @param string action trash, untrash, etc.151 * @ return void146 * Tests with a bad nonce. 147 * 148 * Expects test to fail. 149 * 150 * @param WP_Comment $comment Comment object. 151 * @param string $action Action: 'trash', 'untrash', etc. 152 152 */ 153 153 public function _test_with_bad_nonce( $comment, $action ) { … … 174 174 175 175 /** 176 * Test with a bad id177 * Expects test to fail178 * 179 * @param mixed $comment Comment object180 * @param string action trash, untrash, etc.181 * @ return void176 * Tests with a bad ID. 177 * 178 * Expects test to fail. 179 * 180 * @param WP_Comment $comment Comment object. 181 * @param string $action Action: 'trash', 'untrash', etc. 182 182 */ 183 183 public function _test_with_bad_id( $comment, $action ) { … … 211 211 212 212 /** 213 * Test doubling the action (e.g. trash a trashed comment)214 * Expects test to fail215 * 216 * @param mixed $comment Comment object217 * @param string action trash, untrash, etc.218 * @ return void213 * Tests doubling the action (e.g. trash a trashed comment). 214 * 215 * Expects test to fail. 216 * 217 * @param WP_Comment $comment Comment object. 218 * @param string $action Action: 'trash', 'untrash', etc. 219 219 */ 220 220 public function _test_double_action( $comment, $action ) { … … 261 261 262 262 /** 263 * Delete a comment as an administrator (expects success) 264 * 265 * @return void 263 * Deletes a comment as an administrator (expects success). 266 264 */ 267 265 public function test_ajax_comment_trash_actions_as_administrator() { … … 279 277 280 278 /** 281 * Delete a comment as a subscriber (expects permission denied) 282 * 283 * @return void 279 * Deletes a comment as a subscriber (expects permission denied). 284 280 */ 285 281 public function test_ajax_comment_trash_actions_as_subscriber() { … … 297 293 298 294 /** 299 * Delete a comment with no id 300 * 301 * @return void 295 * Deletes a comment with no ID. 302 296 */ 303 297 public function test_ajax_trash_comment_no_id() { … … 315 309 316 310 /** 317 * Delete a comment with a bad nonce 318 * 319 * @return void 311 * Deletes a comment with a bad nonce. 320 312 */ 321 313 public function test_ajax_trash_comment_bad_nonce() { … … 333 325 334 326 /** 335 * Test trashing an already trashed comment, etc. 336 * 337 * @return void 327 * Tests trashing an already trashed comment, etc. 338 328 */ 339 329 public function test_ajax_trash_double_action() {
Note: See TracChangeset
for help on using the changeset viewer.