mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -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' );
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user