Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (3 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Add visibility to methods in tests/phpunit/tests/.

Adds a public visibility to test fixtures, tests, data providers, and callbacks methods.

Adds a private visibility to helper methods within test classes.

Renames callbacks and helpers that previously started with a _ prefix. Why? For consistency and to leverage using the method visibility. Further naming standardizations is beyond the scope of this commit.

Props costdev, jrf, hellofromTonya.
Fixes #54177.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/term/cache.php

    r51568 r52010  
    55 */
    66class Tests_Term_Cache extends WP_UnitTestCase {
    7     function set_up() {
     7    public function set_up() {
    88        parent::set_up();
    99
     
    1414     * @ticket 25711
    1515     */
    16     function test_category_children_cache() {
     16    public function test_category_children_cache() {
    1717        // Test with only one Parent => Child.
    1818        $term_id1       = self::factory()->category->create();
     
    3939     * @ticket 22526
    4040     */
    41     function test_category_name_change() {
     41    public function test_category_name_change() {
    4242        $term    = self::factory()->category->create_and_get( array( 'name' => 'Foo' ) );
    4343        $post_id = self::factory()->post->create();
     
    5656     * @ticket 14485
    5757     */
    58     function test_hierachy_invalidation() {
     58    public function test_hierachy_invalidation() {
    5959        $tax = 'burrito';
    6060        register_taxonomy( $tax, 'post', array( 'hierarchical' => true ) );
     
    242242     * @ticket 21760
    243243     */
    244     function test_get_term_by_slug_cache() {
     244    public function test_get_term_by_slug_cache() {
    245245        global $wpdb;
    246246
     
    273273     * @ticket 21760
    274274     */
    275     function test_get_term_by_slug_cache_update() {
     275    public function test_get_term_by_slug_cache_update() {
    276276        global $wpdb;
    277277
     
    311311     * @ticket 21760
    312312     */
    313     function test_get_term_by_name_cache() {
     313    public function test_get_term_by_name_cache() {
    314314        global $wpdb;
    315315
     
    340340     * @ticket 21760
    341341     */
    342     function test_get_term_by_name_cache_update() {
     342    public function test_get_term_by_name_cache_update() {
    343343        global $wpdb;
    344344
     
    375375     * @ticket 21760
    376376     */
    377     function test_invalidating_term_caches_should_fail_when_invalidation_is_suspended() {
     377    public function test_invalidating_term_caches_should_fail_when_invalidation_is_suspended() {
    378378        global $wpdb;
    379379
Note: See TracChangeset for help on using the changeset viewer.