Commit ba95508
committed
Tests/Feature #64990: Add unit tests for wp_get_abilities() filtering and rename private helper to _wp_get_abilities_match_meta
- Rename wp_get_abilities_match_meta() to _wp_get_abilities_match_meta() per WordPress private function naming convention
- Add tests/phpunit/tests/abilities-api/wpGetAbilities.php covering:
- category filter (single string, array OR logic, non-existent)
- namespace filter (prefix match, trailing-slash normalisation, non-existent)
- meta filter (single key, AND logic across keys, nested arrays, missing key)
- match_callback per-item inclusion/exclusion and argument passing
- wp_get_abilities_match filter hook exclusion and argument passing
- result_callback result reshaping and argument passing
- wp_get_abilities_result filter hook reshaping and argument passing
- Combined category + meta and namespace + match_callback filters1 parent 0350d8e commit ba95508
2 files changed
Lines changed: 688 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
| 578 | + | |
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | | - | |
| 585 | + | |
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| |||
0 commit comments