Make WordPress Core


Ignore:
Timestamp:
10/28/2022 02:08:20 PM (16 months ago)
Author:
SergeyBiryukov
Message:

Tests: Move the tests for WP class methods to the wp directory.

This aims to bring some consistency to the location of the tests for this class.

Includes adding the missing @covers tags.

Follow-up to [36177], [51622], [54250].

Props pbearne, SergeyBiryukov.
See #56793, #56782.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/wp/addQueryVar.php

    r54642 r54710  
    33/**
    44 * @group wp
     5 *
     6 * @covers WP::add_query_var
    57 */
    6 class Tests_WP extends WP_UnitTestCase {
     8class Tests_WP_AddQueryVar extends WP_UnitTestCase {
     9
    710    /**
    811     * @var WP
     
    2629        $this->assertContains( 'test2', $this->wp->public_query_vars );
    2730    }
    28 
    29     public function test_remove_query_var() {
    30         $public_qv_count = count( $this->wp->public_query_vars );
    31 
    32         $this->wp->add_query_var( 'test' );
    33         $this->assertContains( 'test', $this->wp->public_query_vars );
    34         $this->wp->remove_query_var( 'test' );
    35 
    36         $this->assertCount( $public_qv_count, $this->wp->public_query_vars );
    37     }
    3831}
Note: See TracChangeset for help on using the changeset viewer.