Changeset 51702
- Timestamp:
- 08/31/2021 05:22:32 PM (3 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/actions.php
r51403 r51702 8 8 class Tests_Actions extends WP_UnitTestCase { 9 9 10 /** 11 * @covers ::do_action 12 */ 10 13 function test_simple_action() { 11 14 $a = new MockAction(); … … 25 28 } 26 29 30 /** 31 * @covers ::remove_action 32 */ 27 33 function test_remove_action() { 28 34 $a = new MockAction(); … … 44 50 } 45 51 52 /** 53 * @covers ::has_action 54 */ 46 55 function test_has_action() { 47 56 $tag = __FUNCTION__; … … 58 67 } 59 68 60 // One tag with multiple actions. 69 /** 70 * One tag with multiple actions. 71 * 72 * @covers ::do_action 73 */ 61 74 function test_multiple_actions() { 62 75 $a1 = new MockAction(); … … 75 88 } 76 89 90 /** 91 * One tag with multiple actions. 92 * 93 * @covers ::do_action 94 */ 77 95 function test_action_args_1() { 78 96 $a = new MockAction(); … … 90 108 } 91 109 110 /** 111 * One tag with multiple actions. 112 * 113 * @covers ::do_action 114 */ 92 115 function test_action_args_2() { 93 116 $a1 = new MockAction(); … … 121 144 * @see https://core.trac.wordpress.org/ticket/17817#comment:72 122 145 * @ticket 17817 146 * 147 * @covers ::do_action 123 148 */ 124 149 function test_action_args_3() { … … 158 183 * 159 184 * @ticket 48312 185 * 186 * @covers ::do_action 160 187 */ 161 188 function test_action_args_with_php4_syntax() { … … 202 229 } 203 230 231 /** 232 * @covers ::did_action 233 */ 204 234 function test_did_action() { 205 235 $tag1 = 'action1'; … … 223 253 } 224 254 255 /** 256 * @covers ::do_action 257 */ 225 258 function test_all_action() { 226 259 $a = new MockAction(); … … 247 280 } 248 281 282 /** 283 * @covers ::remove_action 284 */ 249 285 function test_remove_all_action() { 250 286 $a = new MockAction(); … … 267 303 } 268 304 305 /** 306 * @covers ::do_action_ref_array 307 */ 269 308 function test_action_ref_array() { 270 309 $obj = new stdClass(); … … 285 324 /** 286 325 * @ticket 11241 326 * 327 * @covers ::do_action 287 328 */ 288 329 function test_action_keyed_array() { … … 310 351 } 311 352 353 /** 354 * @covers ::remove_action 355 */ 312 356 function test_action_self_removal() { 313 357 add_action( 'test_action_self_removal', array( $this, 'action_self_removal' ) ); … … 322 366 /** 323 367 * @ticket 17817 368 * 369 * @covers ::do_action 324 370 */ 325 371 function test_action_recursion() { … … 337 383 } 338 384 385 /** 386 * @covers ::do_action 387 */ 339 388 function action_that_causes_recursion( $tag ) { 340 389 static $recursing = false; … … 349 398 * @ticket 9968 350 399 * @ticket 17817 400 * 401 * @covers ::remove_action 402 * @covers ::add_action 351 403 */ 352 404 function test_action_callback_manipulation_while_running() { … … 384 436 * This specificaly addresses the concern raised at 385 437 * https://core.trac.wordpress.org/ticket/17817#comment:52 438 * 439 * @covers ::remove_filter 386 440 */ 387 441 function test_remove_anonymous_callback() { … … 417 471 * 418 472 * @ticket 17817 473 * 474 * @covers WP_Hook::offsetGet 475 * @covers WP_Hook::offsetSet 476 * @covers WP_Hook::offsetUnset 419 477 */ 420 478 function test_array_access_of_wp_filter_global() { … … 443 501 * 444 502 * @ticket 14994 503 * 504 * @covers ::current_action 445 505 */ 446 506 function test_current_action() { … … 454 514 /** 455 515 * @ticket 14994 516 * 517 * @covers ::doing_filter 456 518 */ 457 519 function test_doing_filter() { … … 473 535 /** 474 536 * @ticket 14994 537 * 538 * @covers ::doing_filter 475 539 */ 476 540 function test_doing_action() { … … 492 556 /** 493 557 * @ticket 14994 558 * 559 * @covers ::doing_filter 494 560 */ 495 561 function test_doing_filter_real() { … … 542 608 * @ticket 10441 543 609 * @expectedDeprecated tests_do_action_deprecated 610 * 611 * @covers ::do_action_deprecated 544 612 */ 545 613 public function test_do_action_deprecated() { … … 560 628 * @ticket 10441 561 629 * @expectedDeprecated tests_do_action_deprecated 630 * 631 * @covers ::do_action_deprecated 562 632 */ 563 633 public function test_do_action_deprecated_with_multiple_params() { -
trunk/tests/phpunit/tests/actions/callbacks.php
r48937 r51702 8 8 /** 9 9 * @ticket 23265 10 * 11 * @covers ::add_action 10 12 */ 11 13 function test_callback_representations() { -
trunk/tests/phpunit/tests/actions/closures.php
r51657 r51702 10 10 /** 11 11 * @ticket 10493 12 * 13 * @covers ::add_action 14 * @covers ::has_action 15 * @covers ::do_action 12 16 */ 13 17 function test_action_closure() {
Note: See TracChangeset
for help on using the changeset viewer.