Make WordPress Core


Ignore:
Timestamp:
06/25/2020 11:39:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Canonical: Move trailing slash handling for robots.txt and sitemaps to a single condition.

Give the unit test a more descriptive name.

Follow-up to [48153], [48155].

See #48025.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/canonical/robots.php

    r48155 r48166  
    88class Tests_Canonical_Robots extends WP_Canonical_UnitTestCase {
    99
    10         function setUp() {
    11                 parent::setUp();
    12         }
    13 
    14         function test_robots_url() {
    15                 $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
     10        public function test_remove_trailing_slashes_for_robots_requests() {
     11                $this->set_permalink_structure( '/%postname%/' );
    1612                $this->assertCanonical( '/robots.txt', '/robots.txt' );
    1713                $this->assertCanonical( '/robots.txt/', '/robots.txt' );
Note: See TracChangeset for help on using the changeset viewer.