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:
parent
ec062c08fe
commit
6dba36e4ef
20
tests/phpunit/tests/canonical/robots.php
Normal file
20
tests/phpunit/tests/canonical/robots.php
Normal 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' );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user