Changeset 52010 for trunk/tests/phpunit/tests/xmlrpc/wp/newComment.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/newComment.php
r51331 r52010 48 48 } 49 49 50 function test_valid_comment() {50 public function test_valid_comment() { 51 51 $result = $this->myxmlrpcserver->wp_newComment( 52 52 array( … … 64 64 } 65 65 66 function test_empty_comment() {66 public function test_empty_comment() { 67 67 $result = $this->myxmlrpcserver->wp_newComment( 68 68 array( … … 140 140 } 141 141 142 function test_new_comment_post_closed() {142 public function test_new_comment_post_closed() { 143 143 $post = self::factory()->post->create_and_get( 144 144 array( … … 165 165 } 166 166 167 function test_new_comment_duplicated() {167 public function test_new_comment_duplicated() { 168 168 $comment_args = array( 169 169 1, … … 192 192 * @ticket 51595 193 193 */ 194 function test_allowed_anon_comments() {194 public function test_allowed_anon_comments() { 195 195 add_filter( 'xmlrpc_allow_anonymous_comments', '__return_true' ); 196 196 … … 217 217 * @ticket 51595 218 218 */ 219 function test_anon_comments_require_email() {219 public function test_anon_comments_require_email() { 220 220 add_filter( 'xmlrpc_allow_anonymous_comments', '__return_true' ); 221 221 … … 242 242 * @ticket 51595 243 243 */ 244 function test_username_avoids_anon_flow() {244 public function test_username_avoids_anon_flow() { 245 245 add_filter( 'xmlrpc_allow_anonymous_comments', '__return_true' ); 246 246 … … 274 274 * @param string $anon_callback Optional. Allow anonymous comment callback. Default __return_false. 275 275 */ 276 function test_comments_observe_post_permissions( $post_key, $username, $expected, $anon_callback = '__return_false' ) {276 public function test_comments_observe_post_permissions( $post_key, $username, $expected, $anon_callback = '__return_false' ) { 277 277 add_filter( 'xmlrpc_allow_anonymous_comments', $anon_callback ); 278 278 … … 309 309 * } 310 310 */ 311 function data_comments_observe_post_permissions() {311 public function data_comments_observe_post_permissions() { 312 312 return array( 313 313 // 0: Post author, password protected public post.
Note: See TracChangeset
for help on using the changeset viewer.