mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Tests: Rename classes in phpunit/tests/sitemaps/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491]. See #53363. git-svn-id: https://develop.svn.wordpress.org/trunk@51492 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
/**
|
||||
* @group sitemaps
|
||||
*/
|
||||
class Test_Sitemaps_Functions extends WP_UnitTestCase {
|
||||
class Tests_Sitemaps_Functions extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* Test getting the correct number of URLs for a sitemap.
|
||||
*/
|
||||
@@ -60,11 +61,11 @@ class Test_Sitemaps_Functions extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get_sitemap_url() with ugly permalinks.
|
||||
* Test get_sitemap_url() with plain permalinks.
|
||||
*
|
||||
* @dataProvider ugly_permalinks_provider
|
||||
* @dataProvider plain_permalinks_provider
|
||||
*/
|
||||
public function test_get_sitemap_url_ugly_permalinks( $name, $subtype_name, $page, $expected ) {
|
||||
public function test_get_sitemap_url_plain_permalinks( $name, $subtype_name, $page, $expected ) {
|
||||
$actual = get_sitemap_url( $name, $subtype_name, $page );
|
||||
|
||||
$this->assertSame( $expected, $actual );
|
||||
@@ -84,7 +85,7 @@ class Test_Sitemaps_Functions extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for test_get_sitemap_url_ugly_permalinks.
|
||||
* Data provider for test_get_sitemap_url_plain_permalinks.
|
||||
*
|
||||
* @return array[] {
|
||||
* Data to test with.
|
||||
@@ -95,7 +96,7 @@ class Test_Sitemaps_Functions extends WP_UnitTestCase {
|
||||
* @type string|false $4 Sitemap URL.
|
||||
* }
|
||||
*/
|
||||
function ugly_permalinks_provider() {
|
||||
function plain_permalinks_provider() {
|
||||
return array(
|
||||
array( 'posts', 'post', 1, home_url( '/?sitemap=posts&sitemap-subtype=post&paged=1' ) ),
|
||||
array( 'posts', 'post', 0, home_url( '/?sitemap=posts&sitemap-subtype=post&paged=1' ) ),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Sitemaps: Sitemaps_Tests class
|
||||
* Sitemaps: Tests_Sitemaps_Sitemaps class
|
||||
*
|
||||
* Main test class.
|
||||
*
|
||||
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* @group sitemaps
|
||||
*/
|
||||
class Test_Sitemaps extends WP_UnitTestCase {
|
||||
class Tests_Sitemaps_Sitemaps extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* List of user IDs.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
/**
|
||||
* @group sitemaps
|
||||
*/
|
||||
class Test_WP_Sitemaps_Index extends WP_UnitTestCase {
|
||||
class Tests_Sitemaps_wpSitemapsIndex extends WP_UnitTestCase {
|
||||
|
||||
public function test_get_sitemap_list() {
|
||||
$registry = new WP_Sitemaps_Registry();
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
/**
|
||||
* @group sitemaps
|
||||
*/
|
||||
class Test_WP_Sitemaps_Posts extends WP_UnitTestCase {
|
||||
class Tests_Sitemaps_wpSitemapsPosts extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* Tests getting sitemap entries for post type page with 'posts' homepage.
|
||||
*
|
||||
@@ -3,7 +3,8 @@
|
||||
/**
|
||||
* @group sitemaps
|
||||
*/
|
||||
class Test_WP_Sitemaps_Registry extends WP_UnitTestCase {
|
||||
class Tests_Sitemaps_wpSitemapsRegistry extends WP_UnitTestCase {
|
||||
|
||||
public function test_add_provider() {
|
||||
$provider = new WP_Sitemaps_Test_Provider();
|
||||
$registry = new WP_Sitemaps_Registry();
|
||||
@@ -3,7 +3,8 @@
|
||||
/**
|
||||
* @group sitemaps
|
||||
*/
|
||||
class Test_WP_Sitemaps_Renderer extends WP_Test_XML_TestCase {
|
||||
class Tests_Sitemaps_wpSitemapsRenderer extends WP_Test_XML_TestCase {
|
||||
|
||||
public function test_get_sitemap_stylesheet_url() {
|
||||
$sitemap_renderer = new WP_Sitemaps_Renderer();
|
||||
$stylesheet_url = $sitemap_renderer->get_sitemap_stylesheet_url();
|
||||
@@ -3,7 +3,8 @@
|
||||
/**
|
||||
* @group sitemaps
|
||||
*/
|
||||
class Test_WP_Sitemaps_Stylesheet extends WP_UnitTestCase {
|
||||
class Tests_Sitemaps_wpSitemapsStylesheet extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* Test that stylesheet content can be filtered.
|
||||
*/
|
||||
@@ -3,7 +3,8 @@
|
||||
/**
|
||||
* @group sitemaps
|
||||
*/
|
||||
class Test_WP_Sitemaps_Taxonomies extends WP_UnitTestCase {
|
||||
class Tests_Sitemaps_wpSitemapsTaxonomies extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* List of post_tag IDs.
|
||||
*
|
||||
@@ -3,7 +3,8 @@
|
||||
/**
|
||||
* @group sitemaps
|
||||
*/
|
||||
class Test_WP_Sitemaps_Users extends WP_UnitTestCase {
|
||||
class Tests_Sitemaps_wpSitemapsUsers extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* List of user IDs.
|
||||
*
|
||||
Reference in New Issue
Block a user