From 6dba36e4ef8960c50e1c3354a4503e70d2539464 Mon Sep 17 00:00:00 2001 From: Jake Spurlock Date: Wed, 24 Jun 2020 00:05:21 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/canonical/robots.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/phpunit/tests/canonical/robots.php diff --git a/tests/phpunit/tests/canonical/robots.php b/tests/phpunit/tests/canonical/robots.php new file mode 100644 index 0000000000..e9cd45effc --- /dev/null +++ b/tests/phpunit/tests/canonical/robots.php @@ -0,0 +1,20 @@ +set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); + $this->assertCanonical( '/robots.txt', '/robots.txt' ); + $this->assertCanonical( '/robots.txt/', '/robots.txt' ); + } + +}