Make WordPress Core


Ignore:
Timestamp:
10/28/2022 02:08:20 PM (17 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 copied

Legend:

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

    r54642 r54710  
    33/**
    44 * @group wp
     5 *
     6 * @covers WP::remove_query_var
    57 */
    6 class Tests_WP extends WP_UnitTestCase {
     8class Tests_WP_RemoveQueryVar extends WP_UnitTestCase {
     9
    710    /**
    811     * @var WP
     
    1316        parent::set_up();
    1417        $this->wp = new WP();
    15     }
    16 
    17     public function test_add_query_var() {
    18         $public_qv_count = count( $this->wp->public_query_vars );
    19 
    20         $this->wp->add_query_var( 'test' );
    21         $this->wp->add_query_var( 'test2' );
    22         $this->wp->add_query_var( 'test' );
    23 
    24         $this->assertCount( $public_qv_count + 2, $this->wp->public_query_vars );
    25         $this->assertContains( 'test', $this->wp->public_query_vars );
    26         $this->assertContains( 'test2', $this->wp->public_query_vars );
    2718    }
    2819
Note: See TracChangeset for help on using the changeset viewer.