Make WordPress Core

Changeset 51492


Ignore:
Timestamp:
07/26/2021 07:09:41 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/tests/phpunit/tests/sitemaps
Files:
2 edited
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/sitemaps/functions.php

    r51436 r51492  
    44 * @group sitemaps
    55 */
    6 class Test_Sitemaps_Functions extends WP_UnitTestCase {
     6class Tests_Sitemaps_Functions extends WP_UnitTestCase {
     7
    78        /**
    89         * Test getting the correct number of URLs for a sitemap.
     
    6162
    6263        /**
    63          * Test get_sitemap_url() with ugly permalinks.
     64         * Test get_sitemap_url() with plain permalinks.
    6465         *
    65          * @dataProvider ugly_permalinks_provider
     66         * @dataProvider plain_permalinks_provider
    6667         */
    67         public function test_get_sitemap_url_ugly_permalinks( $name, $subtype_name, $page, $expected ) {
     68        public function test_get_sitemap_url_plain_permalinks( $name, $subtype_name, $page, $expected ) {
    6869                $actual = get_sitemap_url( $name, $subtype_name, $page );
    6970
     
    8586
    8687        /**
    87          * Data provider for test_get_sitemap_url_ugly_permalinks.
     88         * Data provider for test_get_sitemap_url_plain_permalinks.
    8889         *
    8990         * @return array[] {
     
    9697         * }
    9798         */
    98         function ugly_permalinks_provider() {
     99        function plain_permalinks_provider() {
    99100                return array(
    100101                        array( 'posts', 'post', 1, home_url( '/?sitemap=posts&sitemap-subtype=post&paged=1' ) ),
  • trunk/tests/phpunit/tests/sitemaps/sitemaps.php

    r51462 r51492  
    11<?php
    22/**
    3  * Sitemaps: Sitemaps_Tests class
     3 * Sitemaps: Tests_Sitemaps_Sitemaps class
    44 *
    55 * Main test class.
     
    1616 * @group sitemaps
    1717 */
    18 class Test_Sitemaps extends WP_UnitTestCase {
     18class Tests_Sitemaps_Sitemaps extends WP_UnitTestCase {
    1919
    2020        /**
  • trunk/tests/phpunit/tests/sitemaps/wpSitemapsIndex.php

    r51491 r51492  
    44 * @group sitemaps
    55 */
    6 class Test_WP_Sitemaps_Index extends WP_UnitTestCase {
     6class Tests_Sitemaps_wpSitemapsIndex extends WP_UnitTestCase {
     7
    78        public function test_get_sitemap_list() {
    89                $registry = new WP_Sitemaps_Registry();
  • trunk/tests/phpunit/tests/sitemaps/wpSitemapsPosts.php

    r51491 r51492  
    44 * @group sitemaps
    55 */
    6 class Test_WP_Sitemaps_Posts extends WP_UnitTestCase {
     6class Tests_Sitemaps_wpSitemapsPosts extends WP_UnitTestCase {
     7
    78        /**
    89         * Tests getting sitemap entries for post type page with 'posts' homepage.
  • trunk/tests/phpunit/tests/sitemaps/wpSitemapsRegistry.php

    r51491 r51492  
    44 * @group sitemaps
    55 */
    6 class Test_WP_Sitemaps_Registry extends WP_UnitTestCase {
     6class Tests_Sitemaps_wpSitemapsRegistry extends WP_UnitTestCase {
     7
    78        public function test_add_provider() {
    89                $provider = new WP_Sitemaps_Test_Provider();
  • trunk/tests/phpunit/tests/sitemaps/wpSitemapsRenderer.php

    r51491 r51492  
    44 * @group sitemaps
    55 */
    6 class Test_WP_Sitemaps_Renderer extends WP_Test_XML_TestCase {
     6class Tests_Sitemaps_wpSitemapsRenderer extends WP_Test_XML_TestCase {
     7
    78        public function test_get_sitemap_stylesheet_url() {
    89                $sitemap_renderer = new WP_Sitemaps_Renderer();
  • trunk/tests/phpunit/tests/sitemaps/wpSitemapsStylesheet.php

    r51491 r51492  
    44 * @group sitemaps
    55 */
    6 class Test_WP_Sitemaps_Stylesheet extends WP_UnitTestCase {
     6class Tests_Sitemaps_wpSitemapsStylesheet extends WP_UnitTestCase {
     7
    78        /**
    89         * Test that stylesheet content can be filtered.
  • trunk/tests/phpunit/tests/sitemaps/wpSitemapsTaxonomies.php

    r51491 r51492  
    44 * @group sitemaps
    55 */
    6 class Test_WP_Sitemaps_Taxonomies extends WP_UnitTestCase {
     6class Tests_Sitemaps_wpSitemapsTaxonomies extends WP_UnitTestCase {
     7
    78        /**
    89         * List of post_tag IDs.
  • trunk/tests/phpunit/tests/sitemaps/wpSitemapsUsers.php

    r51491 r51492  
    44 * @group sitemaps
    55 */
    6 class Test_WP_Sitemaps_Users extends WP_UnitTestCase {
     6class Tests_Sitemaps_wpSitemapsUsers extends WP_UnitTestCase {
     7
    78        /**
    89         * List of user IDs.
Note: See TracChangeset for help on using the changeset viewer.