mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54710 602fd350-edb4-49c9-b593-d223f7449a82
30 lines
561 B
PHP
30 lines
561 B
PHP
<?php
|
|
|
|
/**
|
|
* @group wp
|
|
*
|
|
* @covers WP::remove_query_var
|
|
*/
|
|
class Tests_WP_RemoveQueryVar extends WP_UnitTestCase {
|
|
|
|
/**
|
|
* @var WP
|
|
*/
|
|
protected $wp;
|
|
|
|
public function set_up() {
|
|
parent::set_up();
|
|
$this->wp = new WP();
|
|
}
|
|
|
|
public function test_remove_query_var() {
|
|
$public_qv_count = count( $this->wp->public_query_vars );
|
|
|
|
$this->wp->add_query_var( 'test' );
|
|
$this->assertContains( 'test', $this->wp->public_query_vars );
|
|
$this->wp->remove_query_var( 'test' );
|
|
|
|
$this->assertCount( $public_qv_count, $this->wp->public_query_vars );
|
|
}
|
|
}
|