test(legacy): align expectations with sablog canonical URLs
Build and Deploy / verify (push) Successful in 40s
Build and Deploy / deploy (push) Successful in 32s

This commit is contained in:
2026-09-16 23:06:53 +00:00
parent 38723662e2
commit b39423831c
+7 -5
View File
@@ -41,11 +41,11 @@ class LegacyRoutesTest extends TestCase
public function test_rewrite_style_urls_redirect(): void
{
$this->get('/show-12.html')->assertRedirect('/posts/legacy-post.shtml');
$this->get('/show-12-1.html')->assertRedirect('/posts/legacy-post.shtml');
$this->get('/show-12.html')->assertRedirect('/show-12.shtml');
$this->get('/show-12-1.html')->assertRedirect('/show-12.shtml');
$this->get('/category-1.html')->assertRedirect();
$this->get('/archives-'.now()->format('Ymd').'.html')->assertRedirect();
$this->get('/tagslist.html')->assertRedirect('/tags.shtml');
$this->get('/tagslist.html')->assertRedirect('/tagslist.shtml');
$this->get('/reg.shtml')->assertRedirect('/register.shtml');
}
@@ -55,9 +55,11 @@ class LegacyRoutesTest extends TestCase
$this->get('/login.shtml')->assertOk();
$this->get('/comments.shtml')->assertOk();
$this->get('/search.shtml')->assertOk();
$this->get('/tags.shtml')->assertOk();
$this->get('/tags.shtml')->assertRedirect('/tagslist.shtml');
$this->get('/tagslist.shtml')->assertOk();
$this->get('/archives.shtml')->assertOk();
$this->get('/posts/legacy-post.shtml')->assertOk();
$this->get('/posts/legacy-post.shtml')->assertRedirect('/show-12.shtml');
$this->get('/show-12.shtml')->assertOk();
}
public function test_no_suffix_urls_redirect_to_shtml(): void