Canonical: Add tests for trailing slashes for robots.txt.

See #48025.

Props Toro_Unit, joostdevalk, SergeyBiryukov.


git-svn-id: https://develop.svn.wordpress.org/trunk@48155 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock 2020-06-24 00:05:21 +00:00
parent ec062c08fe
commit 6dba36e4ef
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
/**
* @group canonical
* @group rewrite
* @group query
*/
class Tests_Canonical_Robots extends WP_Canonical_UnitTestCase {
function setUp() {
parent::setUp();
}
function test_robots_url() {
$this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
$this->assertCanonical( '/robots.txt', '/robots.txt' );
$this->assertCanonical( '/robots.txt/', '/robots.txt' );
}
}