Initial baseline: LaraBlog core with plugin commerce surface.

Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
This commit is contained in:
ak
2026-08-12 01:15:38 +08:00
commit 263b98b218
337 changed files with 31393 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace Tests\Feature;
use App\Models\Article;
use App\Models\Category;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class BlogFrontendTest extends TestCase
{
use RefreshDatabase;
public function test_home_and_article_legacy_urls(): void
{
$user = User::factory()->create();
$category = Category::query()->create(['name' => '随笔', 'display_order' => 0]);
$article = Article::query()->create([
'category_id' => $category->id,
'user_id' => $user->id,
'title' => 'Hello',
'content' => "## Hi\n\nworld",
'content_format' => 'markdown',
'published_at' => now()->subHour(),
'visible' => true,
]);
$this->get('/')
->assertOk()
->assertSee('Hello')
->assertSee('/themes/default/style.css', false);
$this->get('/show-'.$article->id.'.shtml')->assertOk()->assertSee('Hi');
$this->get('/tburl.php')->assertStatus(410);
$this->get('/llms.txt')->assertOk()->assertSee('Guidance for AI systems');
$this->get('/robots.txt')->assertOk()->assertSee('Sitemap:');
$this->get('/rss.xml')->assertOk();
$this->get('/sitemap.xml')->assertOk();
}
}